Home Work #1

Morphological Structure Discovery

Part A


Corpus Pruning Trials and Effects

First, I merged the data from blogs and newspapers from Heliohost, in a one large corpus file using the following command.
cat Hi_Newspapers.txt >> corpus
cat Hi_Blogs.txt >> corpus

Then to convert the corpus in a clean frequency word file I wrote a Python Script In initial trials, there was lot of junk words like dates,alphanumeric words,special character were coming but then on improving the python script I was able to prune all non-hindi characters and successfully created a frequency word file. The file is sorted depending upon the frequency of each word. This file is named as "freq_all_4".Then this file was used as an input to the program "UnsupervisedWordSegmentation.cpp".

UnDivide++ parameters used

#define SMALL_ROOT_LENGTH 3
#define LOW_FREQUENCY_DROPOUTS 2
#define LOW_FREQUENCY_DROPOUTS_LEARNING 2
#define SUFFIX_CUTOFF_THRESHOLD 70
#define PREFIX_CUTOFF_THRESHOLD 55
#define COMPOSITE_SUFFIX_THRESHOLD 0.65
#define WRFR_SUFFIX_THRESHOLD 6
#define WRFR_PREFIX_THRESHOLD 1.5
#define SLS_NORMALIZATION_CONSTANT 6
#define ALLOMORPH_REPLACEMENT_THRESHOLD 3
#define ALLOMORPH_DELETION_THRESHOLD 3
#define ALLOMORPH_ADDITION_THRESHOLD 3
#define PROMOTE_LONG_SEGMENTATION 0
#define PROMOTE_LONG_SEGMENTATION_LENGTH 12
#define INDUCE_OUTOFVOCABULARY_ROOTS 0
#define INDUCE_OUTOFVOCABULARY_ROOTS_THRESHOLD 5
Run command used ./a.out file_name 1 1 1 1 0

Reason for using above values :

Precision/Recall/F-score results

hits(H) = 305 , insertions(I) = 148 , deletions(D) = 76

Discussion of error cases

Error were mainly due to 4 reasons:

Part B


Hand Annotated Test corpus.

For the hand-annotated test corpus, the link is Download
Content:

Part C


Code for handling the corpus and the test data

The code(all python scripts used) for handling the corpus and data, the link is Download