donnerpeter commented on a change in pull request #4: URL: https://github.com/apache/lucene/pull/4#discussion_r591651869
########## File path: lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/GeneratingSuggester.java ########## @@ -60,9 +63,15 @@ String word, WordCase originalCase) { Comparator<Weighted<Root<String>>> natural = Comparator.naturalOrder(); PriorityQueue<Weighted<Root<String>>> roots = new PriorityQueue<>(natural.reversed()); - List<Root<String>> entries = new ArrayList<>(); + EntryFilter filter = new EntryFilter(dictionary); boolean ignoreTitleCaseRoots = originalCase == WordCase.LOWER && !dictionary.hasLanguage("de"); - TrigramAutomaton automaton = new TrigramAutomaton(word); + TrigramAutomaton automaton = + new TrigramAutomaton(word) { + @Override + char transformChar(char c) { + return dictionary.caseFold(c); Review comment: We don't lowercase the entire string before calculating ngrams anymore, we lowercase each character as we process it ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org