kylm.model.ngram.writer
Class SerializedNgramWriter

java.lang.Object
  extended by kylm.model.ngram.writer.NgramWriter
      extended by kylm.model.ngram.writer.SerializedNgramWriter

public class SerializedNgramWriter
extends NgramWriter

A class to write language models to binary files

Author:
neubig

Constructor Summary
SerializedNgramWriter()
           
 
Method Summary
 void write(NgramLM lm, java.io.OutputStream os)
          Write the language model to a generic output stream
 
Methods inherited from class kylm.model.ngram.writer.NgramWriter
write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializedNgramWriter

public SerializedNgramWriter()
Method Detail

write

public void write(NgramLM lm,
                  java.io.OutputStream os)
           throws java.io.IOException
Description copied from class: NgramWriter
Write the language model to a generic output stream

Specified by:
write in class NgramWriter
Parameters:
lm - The language model to write
os - The output stream to write to
Throws:
java.io.IOException - If there was an error during output