donnerpeter commented on a change in pull request #2260:
URL: https://github.com/apache/lucene-solr/pull/2260#discussion_r566639675
##########
File path:
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Stemmer.java
##########
@@ -158,14 +173,52 @@ WordCase caseOf(char[] word, int length) {
return null;
}
+ List<char[]> sharpSVariations(char[] word, int length) {
+ if (!dictionary.checkSharpS) return Collections.emptyList();
+
+ Stream<String> result =
Review comment:
The anonymous class serves two purposes: avoiding auxiliary methods
polluting class namespace and avoiding passing `char[] word, int length` in
them. If you think the verbosity isn't worth that, I can make the methods
static.
Streams actually seem more natural to me for such a recursive enumeration. I
can do the same with lists, but that will probably be a bit more verbose (and
probably allocate a bit more, although that shouldn't matter much here). Should
I?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]