Package edu.berkeley.nlp.lm.io
Interface LmReaderCallback<V>
-
- Type Parameters:
V
- Value type for each n-gram (either count of prob/backoff)
- All Known Subinterfaces:
ArpaLmReaderCallback<V>
,NgramOrderedLmReaderCallback<V>
- All Known Implementing Classes:
FirstPassCallback
,KneserNeyFileWritingLmReaderCallback
,KneserNeyLmReaderCallback
,MosesPhraseTableReaderCallback
,NgramMapAddingCallback
public interface LmReaderCallback<V>
Callback that is called for each n-gram in the collection- Author:
- adampauls
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
call(int[] ngram, int startPos, int endPos, V value, java.lang.String words)
Called for each n-gramvoid
cleanup()
Called once all reading is done.
-
-
-
Method Detail
-
call
void call(int[] ngram, int startPos, int endPos, V value, java.lang.String words)
Called for each n-gram- Parameters:
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)
-
cleanup
void cleanup()
Called once all reading is done.
-
-