public class NgramTrie
extends java.lang.Object
| Constructor and Description |
|---|
NgramTrie(int[] counts,
int quantProbBoLen,
int quantProbLen) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getMem()
Getter for allocated byte array to which trie is mapped
|
float |
readNgramBackoff(int wordId,
int orderMinusTwo,
NgramTrieModel.TrieRange range,
NgramTrieQuant quant)
Finds ngram of cerain order in specified range and reads it's backoff.
|
float |
readNgramProb(int wordId,
int orderMinusTwo,
NgramTrieModel.TrieRange range,
NgramTrieQuant quant)
Finds ngram of cerain order in specified range and reads it's probability.
|
public byte[] getMem()
public float readNgramBackoff(int wordId,
int orderMinusTwo,
NgramTrieModel.TrieRange range,
NgramTrieQuant quant)
wordId - - word id to look fororderMinusTwo - - order of ngram minus tworange - - range to look in, contains ngram successors after function executionquant - - quantation object to decode compressed backoff stored in triepublic float readNgramProb(int wordId,
int orderMinusTwo,
NgramTrieModel.TrieRange range,
NgramTrieQuant quant)
wordId - - word id to look fororderMinusTwo - - order of ngram minus tworange - - range to look in, contains ngram successors after function executionquant - - quantation object to decode compressed probability stored in trie