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 text.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(
String term) → Iterable< Token> -
Available on Iterable<
Filters the collection for tokens with Token.term ==Token> , provided by the TokenCollectionExtension extensionterm
. -
firstPosition(
String term) → int -
Available on Iterable<
Returns the lowest Token.termPosition where Token.term ==Token> , provided by the TokenCollectionExtension extensionterm
. -
kGrams(
[int k = 2]) → Map< String, Set< String> > -
Available on Iterable<
Returns a hashmap of k-grams to terms from the collection of tokens.Token> , provided by the TokenCollectionExtension extension -
lastPosition(
String term) → int -
Available on Iterable<
Returns the highest Token.termPosition where Token.term ==Token> , provided by the TokenCollectionExtension extensionterm
. -
termCount(
String term) → int -
Available on Iterable<
Returns the count where Token.term ==Token> , provided by the TokenCollectionExtension extensionterm
. -
toKeywordScores(
) → Map< String, double> -
Available on Iterable<
Returns a mapping of the terms in the collection to their RAKE scores.Token> , provided by the TokenCollectionExtension extension -
toPhrases(
) → Set< List< String> > -
Available on Iterable<
Returns a list of unique phrases from the terms in the collection.Token> , provided by the TokenCollectionExtension extension