public String [ ] [ ] lemmatize ( int numTaggings , String [ ] toks , String [ ] tags ) { Sequence [ ] bestSequences = model . bestSequences ( numTaggings , toks , new Object [ ] { tags } , contextGenerator , sequenceValidator ) ; String [ ] [ ] lemmaClasses = new String [ bestSequences . length ] [ ] ; for ( int i = 0 ; i < lemmaClasses . length ; i ++ ) { List < String > t = bestSequences [ i ] . getOutcomes ( ) ; lemmaClasses [ i ] = t . toArray ( new String [ t . size ( ) ] ) ; } return lemmaClasses ; }
Generates a specified number of lemma classes for the input tokens and tags .