Skip to content

HasanatJahan/NLP-MLE-Language-Models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homework 1 - CS381 - Maximum Likelihood Estimate Language Modeling in Python

Pre-requisites

  1. Must have Python 3 installed
  2. Files data/train.txt and data/test.txt should be present
  3. Directory named "data" should be present in the same directory as main.py file
  4. Have an output file "output.txt" present, this can also be any file you prefer

To run for output and view

  1. Open Terminal and enter directory containing main.py, data directory and output.txt file
  2. In terminal, type in below command to display print output of the code to output.txt file
python3 main.py > output.txt

"output.txt" can also be replaced by any other txt file preferable for outputs

Or to simply view results in the terminal do command:

python3 main.py
  1. Open output.txt to view results