No description
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| output.ron | ||
| README.md | ||
Simple Trigram Language Model
To install:
- Make sure you have cargo/rust installed (if not, install from here: https://rustup.rs/)
- Install with the following command:
(if you've already installed once before and are trying to update, run it with thecargo install --git https://git.sojuhokari.com/sojuhokari/ngram.git--forceflag)
Calculate parameters
To calculate parameters based on a corpus, save some text as a text file (e.g. hello.txt). Then, run the following command to create parameters based on that file:
ngram estimate hello.txt -o parameters.ron
Produce language
To produce a sentence, run the following:
ngram produce parameters.ron
Alternatively, run the following in order to use the pre-calculated parameters based on my honors thesis:
ngram produce