morfologik / morfologik-stemming

Tools for finite state automata construction and dictionary-based morphological dictionaries. Includes Polish stemming dictionary.
BSD 3-Clause "New" or "Revised" License
187 stars 44 forks source link

uppercase suggestion prevents other good suggestion #94

Closed danielnaber closed 6 years ago

danielnaber commented 7 years ago

German "schänke" should suggest "schenke" and "Schänke", but it only suggests "Schänke". The issue seems to be that "Schänke" is found first and then if (candidates.isEmpty()) isn't true anymore. Here's a test:

https://github.com/languagetool-org/languagetool/blob/6fba53be36bc66ddf3ed8d7410b91430912c563f/languagetool-language-modules/de/src/test/java/org/languagetool/rules/de/GermanSpellerRuleTest.java#L409-L427

dweiss commented 7 years ago

I don't know much about the Speller module; @jaumeortola ?

dweiss commented 7 years ago

Is this issue still valid? Daniel -- you seem to know more about the speller than I do; if you can modify the code and provide a patch, please go ahead!

danielnaber commented 7 years ago

The issue is still valid. I'll see if I can provide a patch.