Miscellaneous code for doing NLP with Theano