LSTM stands for long short-term memory networks, used in the field of Deep Learning. It is a variety of recurrent neural networks (RNNs) that are capable of learning long-term dependencies, especially in sequence prediction problems.
In this program, I built a simple LSTM to predict complete sentences. As like google search suggestion. Though for my machine's limitations, I train with my little dataset which is ta2.txt . To get a better result, you should use a large text corpus.
Some examples of our test -
Input -> I
Output -> drink rice
I drink rice was not in our dataset. That means the model learned something