public Span [ ] [ ] tag ( final int numTaggings , final String [ ] tokens ) { final Sequence [ ] bestSequences = this . model . bestSequences ( numTaggings , tokens , null , this . contextGenerator , this . sequenceValidator ) ; final Span [ ] [ ] tags = new Span [ bestSequences . length ] [ ] ; for ( int i = 0 ; i < tags . length ; i ++ ) { final List < String > c = bestSequences [ i ] . getOutcomes ( ) ; this . contextGenerator . updateAdaptiveData ( tokens , c . toArray ( new String [ c . size ( ) ] ) ) ; final Span [ ] spans = this . seqCodec . decode ( c ) ; tags [ i ] = spans ; } return tags ; }
Returns at most the specified number of taggings for the specified sentence .