private void findErrors ( final Span references [ ] , final Span predictions [ ] , final List < Span > falseNegatives , final List < Span > falsePositives ) { falseNegatives . addAll ( Arrays . asList ( references ) ) ; falsePositives . addAll ( Arrays . asList ( predictions ) ) ; for ( final Span referenceName : references ) { for ( final Span prediction : predictions ) { if ( referenceName . equals ( prediction ) ) { // got it, remove from fn and fp falseNegatives . remove ( referenceName ) ; falsePositives . remove ( prediction ) ; } } } }
Outputs falseNegatives and falsePositives spans from the references and predictions list .