Representing a 2nd order model with my 20,000-element dictionary required an 8 trillion-element array. It scales as O(n^3). I had to pare the dictionary down to a token alphabet of 1,000 to get it running. With 1/20th the dictionary size performance went down, even with the higher order model.