I intend to apply Kevin Murphy's Hidden markov model (HMM) toolbox. I have a set of production rules(arbitrary) $A_0 \to AB [p=1]$, $A\to aC [p=1]$, $B\to bbC [p=0.5]$, $B\to b [p=0.5]$ where $A_0$ is the start symbol, A, B, C are the non terminals, and a and b are the terminals and the probabilities are put in brackets. The observation is {aabc}.
I do not know how to use the Viterbi parsing algorithm and cannot understand what all values in the parameters to use in the toolbox. Can anyone explain with a simple example how to use the program so as to select a maximum likelihood parse and how to train?
The objective is to classify a language or a text string. Any other example apart from language would also help. Primary question is how to feed in all these data in the toolbox so as to train the HMM and how to use it for the task since evrything in it uses rand function, how do I customize it?
- Number of states Q=4 ? ($A_0$, A, B, C)
- Number of observation symbols of length T=4; number of sequences nex=1?