public interface ArrayEncodedLmCache
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
int |
capacity()
How n-grams can be cached (at most).
|
void |
clear() |
float |
getCached(int[] ngram,
int startPos,
int endPos,
int hash)
Should return Float.NaN if the requested n-gram is not in the cache
|
void |
putCached(int[] ngram,
int startPos,
int endPos,
float f,
int hash) |
float getCached(int[] ngram, int startPos, int endPos, int hash)
ngram
- startPos
- endPos
- shortHash
- void clear()
void putCached(int[] ngram, int startPos, int endPos, float f, int hash)
int capacity()