kinow commented on a change in pull request #385:
URL: https://github.com/apache/opennlp/pull/385#discussion_r541267388



##########
File path: 
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:
       I wonder if that's the best option we have. We could also investigate 
locking only on `dictLookup` (which is the only data structure in this method 
that is outside of its context I think?). Or using a different structure for 
`dictLookup` if possible. But I haven't looked at the rest of the code in a 
long 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.

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


Reply via email to