Class TextReader<W>

    • Constructor Summary

      Constructors 
      Constructor Description
      TextReader​(java.lang.Iterable<java.lang.String> lineIterator, WordIndexer<W> wordIndexer)  
      TextReader​(java.util.List<java.lang.String> inputFiles, WordIndexer<W> wordIndexer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void parse​(LmReaderCallback<LongRef> callback)
      Reads newline-separated plain text from inputFiles, and writes an ARPA lm file to outputFile.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextReader

        public TextReader​(java.util.List<java.lang.String> inputFiles,
                          WordIndexer<W> wordIndexer)
      • TextReader

        public TextReader​(java.lang.Iterable<java.lang.String> lineIterator,
                          WordIndexer<W> wordIndexer)
    • Method Detail

      • parse

        public void parse​(LmReaderCallback<LongRef> callback)
        Reads newline-separated plain text from inputFiles, and writes an ARPA lm file to outputFile. If files have a .gz suffix, then they will be (un)zipped as necessary.
        Specified by:
        parse in interface LmReader<LongRef,​LmReaderCallback<LongRef>>
        Parameters:
        inputFiles -
        outputFile -