Building a text generator using LSTMs