LSTM Text Generation using Tensorflow
- In Tensorflow, LSTM is used to generate texts.
- Dataset file is
adele.txt
. - In order to preprocess dataset and build train data,
Tokenizer
, which you can importfrom tensorflow.keras.preprocessing.text
and which is used to convert text data to sequences, is utilized. - Simple LSTM model is used to produce text. In addition, different LSTM approaches are illustrated in code.
- If you aim to produce more realistic text, you can enlarge your dataset so that quality of texts that you can generate can be improved.