[
https://issues.apache.org/jira/browse/OPENNLP-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085926#comment-13085926
]
William Colen commented on OPENNLP-226:
---------------------------------------
Yes, thank you! I couldn't see that it was that simple. It should be something
like this:
public void evaluateSample(NameSample reference) {
String[] sentence = reference.getSentence();
Span predictedNames[] = nameFinder.find(sentence);
Span references[] = reference.getNames();
fmeasure.updateScores(references, predictedNames);
if (this.sampleListener != null && !Arrays.equals(references,
predictedNames)) {
NameSample predicted = new NameSample(sentence, predictedNames,
reference.isClearAdaptiveDataSet());
this.sampleListener.missclassified(reference, predicted);
}
}
> Evaluators should allow tools to register a misclassified report interface
> --------------------------------------------------------------------------
>
> Key: OPENNLP-226
> URL: https://issues.apache.org/jira/browse/OPENNLP-226
> Project: OpenNLP
> Issue Type: New Feature
> Components: Chunker, Command Line Interface, Name Finder, POS
> Tagger, Sentence Detector, Tokenizer
> Affects Versions: tools-1.5.2-incubating
> Reporter: William Colen
> Assignee: William Colen
> Priority: Minor
> Fix For: tools-1.5.2-incubating
>
>
> OPENNLP-220 introduced the -misclassified argument that enables evaluators to
> print misclassified items while using the command line evaluators. We should
> expand it to allow any other tool that uses evaluators to register an
> interface to get that information.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira