TokenCollectionExtension extension
Extension methods on a collection of Token.
Properties
-
allTerms
→ List<
String> -
Available on Iterable<
Returns a list of all the terms from the collection of Tokens, in the same order as they occur in the SourceText.Token> , provided by the TokenCollectionExtension extensionno setter -
terms
→ Set<
String> -
Available on Iterable<
Returns the set of unique terms from the collection of Tokens.Token> , provided by the TokenCollectionExtension extensionno setter
Methods
-
byTerm(
Term term) → Iterable< Token> -
Available on Iterable<
Filters the collection for tokens with Token.term ==Token> , provided by the TokenCollectionExtension extensionterm. -
firstPosition(
Term term) → int -
Available on Iterable<
Returns the lowest Token.termPosition where Token.term ==Token> , provided by the TokenCollectionExtension extensionterm. -
kGrams(
[int k = 2]) → Map< KGram, Set< Term> > -
Available on Iterable<
Returns a hashmap of k-grams to terms from the collection of tokens.Token> , provided by the TokenCollectionExtension extension -
lastPosition(
Term term) → int -
Available on Iterable<
Returns the highest Token.termPosition where Token.term ==Token> , provided by the TokenCollectionExtension extensionterm. -
termCount(
Term term) → int -
Available on Iterable<
Returns the count where Token.term ==Token> , provided by the TokenCollectionExtension extensionterm.