TokenCollectionExtension extension Null safety
Extension methods on a collection of Token.
Properties
Methods
-
byTerm(
Term term) → Iterable< Token> -
Filters the collection for tokens with Token.term ==
term. -
firstPosition(
Term term) → int -
Returns the lowest Token.termPosition where Token.term ==
term. -
kGrams(
[int k = 2]) → Map< KGram, Set< Term> > - Returns a hashmap of k-grams to terms from the collection of tokens.
-
lastPosition(
Term term) → int -
Returns the highest Token.termPosition where Token.term ==
term.@Deprecated('The [maxIndex] extension method will be removed.') -
termCount(
Term term) → int -
Returns the count where Token.term ==
term.