public interface ContextEncodedLmCache
extends java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
int |
capacity() |
float |
getCached(long contextOffset,
int contextOrder,
int word,
int hash,
ContextEncodedNgramLanguageModel.LmContextInfo outputPrefix)
Should return Float.NaN if requested n-gram is not in the cache.
|
void |
putCached(long contextOffset,
int contextOrder,
int word,
float prob,
int hash,
ContextEncodedNgramLanguageModel.LmContextInfo outputPrefix) |
float getCached(long contextOffset,
int contextOrder,
int word,
int hash,
ContextEncodedNgramLanguageModel.LmContextInfo outputPrefix)
contextOffset - contextOrder - word - hash - outputPrefix - void putCached(long contextOffset,
int contextOrder,
int word,
float prob,
int hash,
ContextEncodedNgramLanguageModel.LmContextInfo outputPrefix)
int capacity()