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
 void call(int[] ngram, int startPos, int endPos, V value, String words)
          Called for each n-gram
 void cleanup()
          Called once all reading is done.
 

Method Detail

call

void call(int[] ngram,
          int startPos,
          int endPos,
          V value,
          String words)
Called for each n-gram

Parameters:
ngram - The integer representation of the words as given by the provided WordIndexer
value - The value of the n-gram
words - The string representation of the n-gram (space separated)

cleanup

void cleanup()
Called once all reading is done.