You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/11/01 08:00:55 UTC
[GitHub] [lucene] dweiss commented on a diff in pull request #11893: hunspell: allow for faster dictionary iteration during 'suggest' by using more memory (opt-in)
dweiss commented on code in PR #11893:
URL: https://github.com/apache/lucene/pull/11893#discussion_r1010183268
##########
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:
Fair enough.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org