W - public class MosesPhraseTableReaderCallback<W> extends java.lang.Object implements LmReaderCallback<PhraseTableCounts>
| Constructor and Description |
|---|
MosesPhraseTableReaderCallback(WordIndexer<W> wordIndexer) |
| Modifier and Type | Method and Description |
|---|---|
void |
call(int[] ngram,
int startPos,
int endPos,
PhraseTableCounts value,
java.lang.String words)
Called for each n-gram
|
void |
cleanup()
Called once all reading is done.
|
HashNgramMap<PhraseTableValueContainer.PhraseTableValues> |
getMap() |
public MosesPhraseTableReaderCallback(WordIndexer<W> wordIndexer)
public void call(int[] ngram,
int startPos,
int endPos,
PhraseTableCounts value,
java.lang.String words)
LmReaderCallbackcall in interface LmReaderCallback<PhraseTableCounts>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)public void cleanup()
LmReaderCallbackcleanup in interface LmReaderCallback<PhraseTableCounts>public HashNgramMap<PhraseTableValueContainer.PhraseTableValues> getMap()