I haven&#x27;t looked at the code, but glancing at the results leaves me thinking it might need more work.<p>The output seems to me around the level a Markov chain might produce. Karpathy&#x27;s RNN code produces much, much better results[1].<p>I wonder if manually extracting features and training the RNN on that is a mistake? RNN&#x27;s tend to work well on text because they encode understanding of the parse tree themselves.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;karpathy&#x2F;char-rnn" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;karpathy&#x2F;char-rnn</a>