krickert commented on code in PR #1003:
URL: https://github.com/apache/opennlp/pull/1003#discussion_r3058801663
##########
opennlp-core/opennlp-runtime/src/main/java/opennlp/tools/chunker/ChunkerME.java:
##########
@@ -93,8 +102,13 @@ public ChunkerME(ChunkerModel model) {
@Override
public String[] chunk(String[] toks, String[] tags) {
TokenTag[] tuples = TokenTag.create(toks, tags);
- bestSequence = model.bestSequence(tuples, new Object[] {},
contextGenerator, sequenceValidator);
- List<String> c = bestSequence.getOutcomes();
+ Sequence seq = model.bestSequence(tuples,
+ new Object[] {}, contextGenerator, sequenceValidator);
+ this.bestSequence = seq;
Review Comment:
Done. `chunk()` 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]