11-14-2011
Daniel Solow

Step by step guide:

1. Download the SRILM source at: http://www-speech.sri.com/projects/srilm/download.html
	-You'll have to enter an "organization" and email, but I don't think this is so important because we're not using it for profit.
2. In the top level directory, there is an INSTALL file with detailed instructions; all I had to do was:
	-Open the makefile in the top level directory and change the SRILM variable to the top level directory's path.
	-After that, run 'make World' in the top level directory.
3. Wait. It takes a while to build.
4. After completing, you should have binaries in /bin/macosx (assuming you're using a lab machine).
	-Note that these binaries won't work on machines with different architecture; you can't, for example, install on a lab machine, ssh to prism and run SRILM from there.
	-Move the corpora you need to this directory.
	
At this point, you've done enough to get our code running. Go back to the top level readme.
The rest describes how to build specific language models.
	
5. To collect n-gram counts, do './ngram-count -order [2] -text [corpusfile] -write [countsfile]'
	-The order options specifies the n-gram to count. We care about bigrams.
	-After running, countsfile should contain a bunch of bigrams and their counts. It's human readable.
6. To estimate the language model, do './ngram-count -order [2] -read [countsfile] -lm [languageModelFile]'
	-You might get some warnings, it's okay.
	-This estimates a "Katz Backoff Model," check wikipedia if you're curious.
	-The languageModelFile is also human readable. It maps backoff weights and log (base 10) probabilities to n-grams.
7. To run the language model as a server, do './ngram -order [2] -lm [languageModeFile] -server-port [port] &'
	-Wait a bit for the language model to be loaded into memory.
8. To test the server, you'll need a text file with 1 sentence per line:
	-Do './ngram -use-server [port]@[addr] -ppl [sentenceFile.txt]'
	-You should get log probabilities and perplexities as a result.
	
Resources:
FAQ (describes how to run a server): http://www-speech.sri.com/projects/srilm/manpages/srilm-faq.7.html
Manual Pages (has detailed information for all the options): http://www-speech.sri.com/projects/srilm/manpages/