If the sentence has a token at position tokenIndex
, then this returns the
singleton sequence containing that token.
If the sentence has a token at position tokenIndex
, then this returns the
singleton sequence containing that token. Otherwise, this returns an empty sequence.
the sentence
the index of the desired token in the sentence
a singleton sequence containing the specified token (if it exists); otherwise an empty sequence
The KeywordFeature maps a token to its word representation, if its word appears in the argument set
keywords
. Otherwise its apply function will return an empty set.See the definition of TokenFeature (above) for more details about the interface.