Assignment 2 : NLP


n-gram Based Language Models


Part A

The output of the given sample input file hi-wordseg.txt, with groundtruth as hi-wseg-gt.txt is shown below.

True positive
False positive
False negetive
Precision
Recall
1-gram
752
302
154
71.3472485769
83.0022075055
2-gram
667
225
239
74.7757847534
73.6203090508


Part B

2. edit distance matrix with the frequency of the errors is in Error frequency link .

Links

Error frequency
Code : code.