kinow commented on code in PR #385:
URL: https://github.com/apache/opennlp/pull/385#discussion_r1026909511


##########
opennlp-morfologik-addon/src/main/java/opennlp/morfologik/lemmatizer/MorfologikLemmatizer.java:
##########
@@ -47,7 +47,7 @@ public MorfologikLemmatizer(Dictionary dictionary) throws 
IllegalArgumentExcepti
     dictLookup = new DictionaryLookup(dictionary);
   }
 
-  private List<String> lemmatize(String word, String postag) {
+  private synchronized List<String> lemmatize(String word, String postag) {

Review Comment:
   >That would avoid the synchronization cost. Wdyt?
   
   That sounds like a good option to me. Avoids the `synchronized`, shouldn't 
add too much overhead, and the lib developers suggest it too. +1, thanks @rzo1 !



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