protected void printError ( final String references [ ] , final String predictions [ ] , final T referenceSample , final T predictedSample , final String [ ] sentenceTokens ) { final List < String > filteredDoc = new ArrayList < String > ( ) ; final List < String > filteredRefs = new ArrayList < String > ( ) ; final List < String > filteredPreds = new ArrayList < String > ( ) ; for ( int i = 0 ; i < references . length ; i ++ ) { if ( ! references [ i ] . equals ( predictions [ i ] ) ) { filteredDoc . add ( sentenceTokens [ i ] ) ; filteredRefs . add ( references [ i ] ) ; filteredPreds . add ( predictions [ i ] ) ; } } if ( filteredDoc . size ( ) > 0 ) { printSamples ( referenceSample , predictedSample ) ; printErrors ( filteredDoc , filteredRefs , filteredPreds ) ; } }
for pos tagger