krickert commented on code in PR #1138:
URL: https://github.com/apache/opennlp/pull/1138#discussion_r3594053274


##########
opennlp-core/opennlp-runtime/src/main/java/opennlp/tools/util/normalizer/TermAnalyzer.java:
##########
@@ -188,9 +189,7 @@ String apply(Dimension dimension, String input, String 
posTag) {
         }
         final String[] lemmas = lemmatizer.lemmatize(new String[] {input}, new 
String[] {posTag});
         if (lemmas == null || lemmas.length == 0 || lemmas[0] == null) {
-          // A contract-violating Lemmatizer must fail loud here: a null 
cached under LEMMA would
-          // read as "absent" in Term.at's lazy cache and recompute through 
normalized() forever,
-          // surfacing as a StackOverflowError far from the cause.
+          // A contract-violating Lemmatizer must fail loud here rather than 
caching a null lemma.

Review Comment:
   Apologies, Moving it back.  I was looking for comments that I thought were 
too wordy.  I'll avoid extending past it next time



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to