Menu

#265 Hunspell analyse output fails in some cases with compounds

v1.0 (example)
open
nobody
None
5
2015-04-26
2015-04-26
No

Consider the following situation.

Affix file:

SET ISO8859-1

COMPOUNDBEGIN x
COMPOUNDEND z
COMPOUNDPERMITFLAG c
ONLYINCOMPOUND o

SFX j Y 1
SFX j 0 0/xc .

Dictinary file:

2
Arbeits/j tt:test1
fundament/z tt:test2

In Hunspell 1.3.3 the result of analyze is:

analyze(Arbeitsfundament) = pa:fundament st:fundament tt:test2

But it should be:

analyze(Arbeitsfundament) = pa:Arbeits st:Arbeits tt:test1 fl:j pa:fundament st:fundament tt:test2

Discussion

  • Lukas Sommer

    Lukas Sommer - 2015-04-26

    In spell checking mode, Hunspell correctly recognizes “Arbeitsfundament” as correctly written word. So this bug affects only the analyze mode, but not the spell checking mode.

     
  • Lukas Sommer

    Lukas Sommer - 2015-04-26

    If you remove the flag “o” of the last line in the affix file

    SET ISO8859-1

    COMPOUNDBEGIN x
    COMPOUNDEND z
    COMPOUNDPERMITFLAG c
    ONLYINCOMPOUND o

    SFX j Y 1
    SFX j 0 0/xc .

    then you get the correct analyze result.

     
  • Lukas Sommer

    Lukas Sommer - 2015-04-26

    Alternatively, you can also modify the dictionary file

    2
    Arbeits/xoc tt:test1
    fundament/z tt:test2

    and you get correctly

    analyze(Arbeitsfundament) = pa:Arbeits st:Arbeits tt:test1 pa:fundament st:fundament tt:test2

     
  • Lukas Sommer

    Lukas Sommer - 2015-04-26

    By the way: This is a real-world example. The data is an extract of the german de_DE_frami dictionary.