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


##########
opennlp-core/opennlp-runtime/src/main/java/opennlp/tools/util/featuregen/AdditionalContextFeatureGenerator.java:
##########
@@ -28,11 +28,12 @@ public class AdditionalContextFeatureGenerator implements 
AdaptiveFeatureGenerat
 
   private static final String PREFIX = "ne=";
 
-  private String[][] additionalContext;
+  private final ThreadLocal<String[][]> threadState = new ThreadLocal<>();

Review Comment:
   Added a one-liner above the `ThreadLocal` field spelling out that it holds 
the per-token additional context (same role as the old `currentContext` field). 
Pushed in 4334043.



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