LSTM text generation by word. Used to generate multiple sentence suggestions based on the input words or a sentence. For more information about the project details, see this blog post associated with this project.
Input: hydrant requires repair
Output: hydrant requires repair is not working
Input: describe the problem
Output: describe the problem please attend to
Input: door and window
Output: door and window in the kitchen is not working in the
Input: machine is leaking
Output: machine is leaking and needs to be replaced
Input: modus to install
Output: modus to install and integrate not wifi
Input: please fix the
Output:
please fix the door in the
please fix the door is not
please fix the issue and connections
please fix the door is blocked
please fix the door is broken
Input: mens bathroom door
Output:
mens bathroom door is not working
mens bathroom door is broken and
mens bathroom door is broken in
mens bathroom door is broken please
Input: please fix the light
Output:
please fix the light bulb in the
please fix the light out in the
please fix the light out at judges
please fix the light out at level
please fix the light out in chambers
Input: tap in bathroom
Output:
tap in bathroom is not working
tap in bathroom is leaking and
tap in bathroom is leaking in
tap in bathroom is leaking at
Input: drainage pipe is leaking
Output:
drainage pipe is leaking and needs to
drainage pipe is leaking and needs replacing
drainage pipe is leaking at female toilets
drainage pipe is leaking and needs repairing
drainage pipe is leaking in the mens
- Python 3.7
- Tensorflow 1.14
To re-train the model, run the model.py
file and fit the model.
To test the model we have to situations either we can generate only described number of words or we can also generate multiple sentences as suggestions. To generate words run word_pred.py
and to generate multiple sentences run beam_search_beta.py
.
- 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