kylm.model.ngram.reader
Class ArpaNgramReader

java.lang.Object
  extended by kylm.model.ngram.reader.NgramReader
      extended by kylm.model.ngram.reader.ArpaNgramReader

public class ArpaNgramReader
extends NgramReader

A class to read n-gram language models from ARPA files

Author:
neubig

Constructor Summary
ArpaNgramReader()
           
 
Method Summary
 NgramLM read(java.io.BufferedReader br)
           
 NgramLM read(java.io.InputStream is)
          Read a language model from an input stream
 
Methods inherited from class kylm.model.ngram.reader.NgramReader
read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArpaNgramReader

public ArpaNgramReader()
Method Detail

read

public NgramLM read(java.io.InputStream is)
             throws java.io.IOException
Description copied from class: NgramReader
Read a language model from an input stream

Specified by:
read in class NgramReader
Parameters:
is - The input stream to read the model from
Returns:
The model that has been read
Throws:
java.io.IOException - If the file could not be read from

read

public NgramLM read(java.io.BufferedReader br)
             throws java.io.IOException
Throws:
java.io.IOException