public abstract class AbstractStatisticalTokenDistance extends AbstractTokenizedStringDistance
| Modifier and Type | Field and Description |
|---|---|
protected int |
collectionSize |
protected Map |
documentFrequency |
protected int |
totalTokenCount |
tokenizer| Constructor and Description |
|---|
AbstractStatisticalTokenDistance() |
AbstractStatisticalTokenDistance(Tokenizer tokenizer) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkTrainingHasHappened(StringWrapper s,
StringWrapper t) |
int |
getDocumentFrequency(Token tok) |
Iterator |
tokenIterator() |
void |
train(StringWrapperIterator i)
Accumulate statistics on how often each token value occurs
|
asBagOfTokens, prepare, setStringWrapperPooladdExample, doMain, explainScore, explainScore, getDistance, hasNextQuery, nextQuery, prepare, prepare, score, score, setDistanceInstancePoolprotected Map documentFrequency
protected int collectionSize
protected int totalTokenCount
public AbstractStatisticalTokenDistance(Tokenizer tokenizer)
public AbstractStatisticalTokenDistance()
public void train(StringWrapperIterator i)
train in class AbstractTokenizedStringDistanceprotected void checkTrainingHasHappened(StringWrapper s, StringWrapper t)
public int getDocumentFrequency(Token tok)
public Iterator tokenIterator()
Copyright © 2016. All rights reserved.