backward and forward states fixed for semi-markov CRF
debug functions for transitions added
debug print added for semi-markov CRF