-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
This looks wrong, it uses getOutputConversionPairs()
if it's empty, shouldn't it be the other way round?
morfologik-stemming/morfologik-speller/src/main/java/morfologik/speller/Speller.java
Lines 340 to 345 in dc8dde7
if (!dictionaryMetadata.getOutputConversionPairs().isEmpty()) { | |
candidates.add(firstCh + " " + original.subSequence(i, original.length())); | |
} else { | |
candidates.add(DictionaryLookup.applyReplacements(firstCh + " " + original.subSequence(i, original.length()), | |
dictionaryMetadata.getOutputConversionPairs()).toString()); | |
} |
I'm not sure if applyReplacements()
makes sense at all. We've just checked that both parts are in the dictionary, should replacements still be applied? The if isn't tested, remove it and testRunonWords()
still works.
Ping @milekpl, seems this was originally your code.
Metadata
Metadata
Assignees
Labels
No labels