Skip to content

totuta/modlm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modlm: A toolkit for mixture of distributions language models

by Graham Neubig (neubig@is.naist.jp)

Install

First, in terms of standard libraries, you must have autotools, libtool, and Boost. If you are on Ubuntu/Debian linux, you can install them below:

$ sudo apt-get install autotools libtool libboost-all

You must install Eigen and cnn separately. Follow the directions on the cnn page, which also explain about installing Eigen. Note that you should use the "v2" branch of cnn.

Once these two packages are installed, run the following commands, specifying the correct paths for cnn and Eigen.

$ autoreconf -i
$ ./configure --with-cnn=/path/to/cnn --with-eigen=/path/to/eigen
$ make

In the instructions below, you can see how to use modlm to train and use language models.

Citation

More information about the method used in the toolkit can be found in the following paper:

Generalizing and Hybridizing Count-based and Neural Language Models Graham Neubig and Chris Dyer. ArXiv Preprint.

Training

You can find an example of how to run the toolkit in the example directory, which will reproduce our main experiments from the paper. Our main experiments can be run by the following process:

  • Enter the directory with cd example.
  • Decompress the training data with bunzip2 data-ptb/*.bz2
  • Run preproc.sh to train count-based language models
  • Run process.sh to train neurally interpolated n-gram, standard LSTM language model, and neural/ngram hybrid models

Log files and models will be written out to the result-ptb

Further instructions about how to use the program are currently in preparation.

About

modlm: A toolkit for mixture of distributions language models

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages