I am struggling at the moment with Mallet's ridiculously poor documentation regarding HMMs. I have managed to import the data into instances(adapted from the ImportExample.java snippet) and I was just wondering how they can be used to train an HMM model. I first started by creating an HMM instance but I wasn't sure whether to go for:
HMM hmm = new HMM(instances.getDataAlphabet(), instances.getTargetAlphabet());
Or use the same data alphabet twice like so:
HMM hmm = new HMM(instances.getDataAlphabet(), instances.getDataAlphabet());
Either way when I get to
hmm.train(instances);
I get the following error:
cc.mallet.types.FeatureVector cannot be cast to cc.mallet.types.FeatureVectorSequence
I would be grateful for any help you can provide.
Cheers