Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#10 Better compound word support by COMPOUNDRULE

open
None
5
2007-06-21
2006-02-09
Harri Pitkänen
No

This is the same issue I reported on the mailing list
a couple of weeks ago. Since the issue is still
present in Hunspell version 1.1.4 I'll copy the
information here so it doesn't get lost.

Hunmorph (in Hunspell versions 1.1.3 and 1.1.4)
crashes when I do the following:

harri@c2:~/tmp/hunspell-bug$ cat test.aff
COMPOUNDRULE 1
COMPOUNDRULE CC
SFX S Y 1
SFX S 0 s . +S
harri@c2:~/tmp/hunspell-bug$ cat test.dic
1
abc/CS [WORD]
harri@c2:~/tmp/hunspell-bug$ cat test.txt
abcabcs
harri@c2:~/tmp/hunspell-bug$ hunmorph test.aff
test.dic test.txt
> abcabcs
Segmentation fault

Hunspell does not crash with the same input. We (at
the Finnish dictionary project) tried to figure out
what is causing this and it seems that something is
wrong at lines 2113-2118 in affixmgr.cxx (in version
1.1.4):

char * m = NULL;
if (compoundflag) m =
affix_check_morph((word+i),strlen(word+i),
compoundflag);
if ((!m || *m == '\0') && compoundend)
m = affix_check_morph((word+i),strlen(word+i),
compoundend);
strcat(*result, presult);
line_uniq(m);

The null pointer gets passed to line_uniq(). We just
can't figure out what is the correct way to fix this.

Discussion

    • assigned_to: nobody --> nemethl
     
  • Logged In: YES
    user_id=726595

    Hi Harri,

    Unfortunatelly, I haven't synchronised then new COMPOUNDRULE
    function with the morphological analysis, yet. I will fix it
    in the next version of Hunspell.

    I will also rewrite the morphological data handling in the
    next couple of months.

    Many thanks for your detailed bug report!

    Laci

     
  • Logged In: YES
    user_id=726595
    Originator: NO

    Segmentation fault is fixed, but morphological analysis is still missing with COMPOUNDRULE.

     
    • summary: Segmentation fault using hunmorph --> Better compound word support by COMPOUNDRULE
     
  • Logged In: YES
    user_id=726595
    Originator: NO

    Crash has fixed. New summary about better COMPOUNDRULE support.