I figured it out how to get FP and FN annotations
List<AnnotationDiffer.Pairing> differ= annotationDiffer.calculateDiff(goldAnnotSet, systemAnnotSet);
for(Annotation fnAnnotation:annotationDiffer.missingAnnotations)
{
System.out.println("FN=>"+fnAnnotation);
}
for(Annotation fpAnnotation:annotationDiffer.spuriousAnnotations)
{
System.out.println("FP=>"+fpAnnotation);
}
Based on offsets of fnAnnotation
or fpAnnotations
, I can easily get the surrounding sentences and create a nice html report.