Java implementation of a document / word language model.