edu.berkeley.nlp.lm.cache
Interface ArrayEncodedLmCache
- All Superinterfaces:
- Serializable
- All Known Implementing Classes:
- ArrayEncodedDirectMappedLmCache
public interface ArrayEncodedLmCache
- extends Serializable
Method Summary |
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)
|
getCached
float getCached(int[] ngram,
int startPos,
int endPos,
int hash)
- Should return Float.NaN if the requested n-gram is not in the cache
- Parameters:
ngram
- startPos
- endPos
- shortHash
-
- Returns:
clear
void clear()
putCached
void putCached(int[] ngram,
int startPos,
int endPos,
float f,
int hash)
capacity
int capacity()
- How n-grams can be cached (at most).
- Returns: