public Span [ ] tag ( final String [ ] tokens , final String [ ] [ ] additionalContext ) { this . additionalContextFeatureGenerator . setCurrentContext ( additionalContext ) ; this . bestSequence = this . model . bestSequence ( tokens , additionalContext , this . contextGenerator , this . sequenceValidator ) ; final List < String > c = this . bestSequence . getOutcomes ( ) ; this . contextGenerator . updateAdaptiveData ( tokens , c . toArray ( new String [ c . size ( ) ] ) ) ; Span [ ] spans = this . seqCodec . decode ( c ) ; spans = setProbs ( spans ) ; return spans ; }
Generates sequence tags for the given sequence returning spans for any identified sequences .