Markov-chain-based trained text generator implementation. Next token prediction uses two previous tokens.