Welcome to the coding part for the HW2!
Example running command:
python language_model.py --N 2 --k 0.1
Here, the arguments N is the order of the language model and k is the parameter for smoothing.
As part of the coding part of the homework, you need to complete all the TODO blocks divided into several tasks.
We provide a unit test code to help you debug. After you implement the TODO blocks, you can run
python test.py
If successful, you will see outputs like
....
----------------------------------------------------------------------
Ran 4 tests in 23.027s
OK