See {@link edu.berkeley.nlp.lm.io.LmReaders} for documentation and the examples/ directory for some simple scripts.