diff options
Diffstat (limited to 'spellchecker/src/SpellCorrector.java')
-rw-r--r-- | spellchecker/src/SpellCorrector.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spellchecker/src/SpellCorrector.java b/spellchecker/src/SpellCorrector.java index a178a44..92f7479 100644 --- a/spellchecker/src/SpellCorrector.java +++ b/spellchecker/src/SpellCorrector.java @@ -41,7 +41,7 @@ public class SpellCorrector { // tries to add word2 to the list of words. This word2 was generated // from "word" by changing "error" to "correct". TriFunction<String, String, String> push = (word2, error, correct) -> { - if (!cr.inVocabulary(word2)) { + if (!cr.inVocabulary(word2) || word.equals(word2)) { return; } |