donnerpeter commented on code in PR #11893: URL: https://github.com/apache/lucene/pull/11893#discussion_r1009734992
########## lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Hunspell.java: ########## @@ -72,10 +77,29 @@ public Hunspell(Dictionary dictionary) { * or suggestion generation by throwing an exception */ public Hunspell(Dictionary dictionary, TimeoutPolicy policy, Runnable checkCanceled) { + this(dictionary, policy, checkCanceled, new Stemmer(dictionary), false); + } + + private Hunspell( + Dictionary dictionary, + TimeoutPolicy policy, + Runnable checkCanceled, + Stemmer stemmer, + boolean cacheSuggestibleEntries) { this.dictionary = dictionary; this.policy = policy; this.checkCanceled = checkCanceled; - stemmer = new Stemmer(dictionary); + this.stemmer = stemmer; + this.cacheSuggestibleEntries = cacheSuggestibleEntries; + } + + /** + * Returns a copy of this Hunspell instance with better suggestion performance but using more Review Comment: I've considered this, but then again, there can be different time-memory tradeoffs in difference places (and I'm planning another one soon), so I'd name them more specifically. -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org 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