Class LangModel
java.lang.Object
org.apache.tika.eval.core.tokens.LangModel
The set of "common tokens" for a single language, backed by a Bloom filter.
Membership is approximate: contains(String) may occasionally return true
for a token that is not actually common (a false positive), but never returns false
for one that is. See CommonTokensBloom for the rationale and false-positive rate.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LangModelModel used when a language has no common-tokens resource; nothing is "common". -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMPTY_MODEL
Model used when a language has no common-tokens resource; nothing is "common".
-
-
Constructor Details
-
LangModel
public LangModel(org.apache.commons.collections4.bloomfilter.BloomFilter filter)
-
-
Method Details
-
contains
- Returns:
trueiftokenis (probably) one of the common tokens for this language;falsemeans it is definitely not.
-