A list of all the resources used

Execution Instructions

Setup

# Setup python virtual environment
$ virtualenv venv --python=python3
$ source venv/bin/activate

# change directory to the repo where we have requirements file
$ cd N-gram_Language_Models/

# Install python dependencies
$ pip3 install  -r requirements.txt 

Run

Use the following commands in the current directory for various models.

python3 src/main.py data/train/ data/dev/ output/results_dev_unsmoothed.csv --unsmoothed

python3 src/main.py data/train/ data/dev/ output/results_dev_laplace.csv --laplace

python3 src/main.py data/train/ data/dev/ output/results_dev_laplace.csv --laplace

Data

The assignment’s training data can be found in data/train and the development data can be found in data/dev.

Output

The output is stored in csv files corresponding to each model and can be found in the output directory.

When there is no optional argument passed, the program exits by displaying a message “No optional argument passed. Pass an optional argument to choose a model to run. “


GitHub

View Github