I still have to check. The thing is that I like the approach where you can design your own probability matrix without the "learning" process. There's an advantage if you just sit and write down how many times you want "A" to be followed by "B" and etc...
As for the machine learning approach, your markov design is flawless and extremely versatile and I've put it in my library already