donnerpeter commented on a change in pull request #2397:
URL: https://github.com/apache/lucene-solr/pull/2397#discussion_r578346118



##########
File path: 
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Stemmer.java
##########
@@ -540,8 +533,8 @@ private boolean isAffixCompatible(
       if (!isPrefix && dictionary.hasFlag(append, dictionary.compoundForbid)) {
         return false;
       }
-      WordContext allowed = isPrefix ? WordContext.COMPOUND_BEGIN : 
WordContext.COMPOUND_END;
-      if (context != allowed && !dictionary.hasFlag(append, 
dictionary.compoundPermit)) {
+      if (!context.isAffixAllowedWithoutSpecialPermit(isPrefix)

Review comment:
       This check becomes a bit more complicated with the addition of a new 
context, so it's extracted to a method




----------------------------------------------------------------
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

Reply via email to