Ever wanted to talk to some of the greatest writers in brazilian literature? You still can't, he's dead. But you can talk to my tekegram bot based on his texts, spoiler: it sucks .
Ever wanted to talk to some of the greatest writers in Brazilian literature? You still can't, he's dead. But you can talk to my telegram bot based on his texts, spoiler: it sucks.
To run the bot on your own server, just execute
python3 bot.py
And it will run with the architecture specified (the code already ships with trained weights). Make sure to have a valid access token in the code though. Check [this link] (https://core.telegram.org/bots) if you have any doubts.
To train the network with your own texts you fist need to preprocess it specifying the text file in preprocessing.py
to remove noise, and then the preprocessed file in model.py
.
Then just run:
python3 model.py
Note that this performs a grid search to find the best network architecture and then trains it, so it might take some time.
This work builds upon the one presented below, if you are interested please check this blog post.
- This project is highly based on this blog post
- Additional Readings:
- The Unreasonable Effectiveness of Recurrent Neural Networks
- A Brief Summary of Maths Behind RNN
- How many LSTM cells should I use?
- What's the difference between a bidirectional LSTM and an LSTM?
- An Introduction to Dropout for Regularizing Deep Neural Networks one presented below, if you are interested please check this blog post .