V
- Value type for each n-gram (either count of prob/backoff)public interface LmReaderCallback<V>
Modifier and Type | Method and Description |
---|---|
void |
call(int[] ngram,
int startPos,
int endPos,
V value,
java.lang.String words)
Called for each n-gram
|
void |
cleanup()
Called once all reading is done.
|
void call(int[] ngram, int startPos, int endPos, V value, java.lang.String words)
ngram
- The integer representation of the words as given by the
provided WordIndexervalue
- The value of the n-gramwords
- The string representation of the n-gram (space separated)void cleanup()