public abstract class BaseLanguageModel extends Object implements LanguageModel
GOOGLE_SENTENCE_END, GOOGLE_SENTENCE_START
Constructor and Description |
---|
BaseLanguageModel() |
Modifier and Type | Method and Description |
---|---|
abstract long |
getCount(List<String> tokens)
Get the occurrence count for the given token sequence.
|
abstract long |
getCount(String token1)
Get the occurrence count for
token . |
Probability |
getPseudoProbability(List<String> context)
This is not always guaranteed to be a real probability (0.0 to 1.0).
|
Probability |
getPseudoProbabilityStupidBackoff(List<String> context) |
abstract long |
getTotalTokenCount() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public Probability getPseudoProbabilityStupidBackoff(List<String> context)
public Probability getPseudoProbability(List<String> context)
LanguageModel
getPseudoProbability
in interface LanguageModel
public abstract long getCount(String token1)
token
.public abstract long getCount(List<String> tokens)
public abstract long getTotalTokenCount()