krickert commented on code in PR #1003:
URL: https://github.com/apache/opennlp/pull/1003#discussion_r3058816908
##########
opennlp-core/opennlp-runtime/src/main/java/opennlp/tools/namefind/NameFinderME.java:
##########
@@ -112,9 +121,14 @@ public Span[] find(String[] tokens) {
public Span[] find(String[] tokens, String[][] additionalContext) {
additionalContextFeatureGenerator.setCurrentContext(additionalContext);
- bestSequence = model.bestSequence(tokens, additionalContext,
contextGenerator, sequenceValidator);
+ Sequence seq = model.bestSequence(tokens,
+ additionalContext, contextGenerator, sequenceValidator);
+ this.bestSequence = seq;
Review Comment:
Done. `find()` now assigns `bestSequence` only after the null check. Pushed
in 6673a0a.
--
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]