/Basic-HMM

Basic Hidden markov model, built off plain python code. Not optimised for maximal efficiency

Primary LanguagePython

Basic-HMM

Basic implementation of hidden markov model.
Part 1 is for estimating any of the data set's tags using purely emission probabilities
Part 2 is for computing first order transmission parameters
Part 3 is for tag estimation using viterbi algorithm using Parts 1 and 2 for the parameters.
Part 4a contains your second order transmission parameter estimation
Part 4b contains your viterbi, changed up for second order viterbi computation
evalResult.py contains a evaluator that was bundled with teh questions provided.
Part 5a/5b are essentially the same as part 4a and 4b, but with an extended context window.

Requirements

Python >3.4

Training

python3 Part<>.py "DATASET directory"
If you aren't going to use these datasets, please ensure test set files are named dev.in and training files are named train
Both should be located inside the appropriate folder.

Evaluation

evalResult.py "Model Answer" "Generated Answer"

important note: Format of the file has to be the exact same as the provided examples, or it won't work.