Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saritaphd/next_word_prediction_using_lstm
This project aims to develop a deep learning model for predicting the next word in a given sequence of words. The model is built using Long Short-Term Memory (LSTM) networks, which are well-suited for sequence prediction tasks
https://github.com/saritaphd/next_word_prediction_using_lstm
Last synced: 3 days ago
JSON representation
This project aims to develop a deep learning model for predicting the next word in a given sequence of words. The model is built using Long Short-Term Memory (LSTM) networks, which are well-suited for sequence prediction tasks
- Host: GitHub
- URL: https://github.com/saritaphd/next_word_prediction_using_lstm
- Owner: SaritaPhD
- License: mit
- Created: 2024-08-01T07:56:14.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T03:08:45.000Z (10 days ago)
- Last Synced: 2024-11-09T04:18:00.535Z (10 days ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 24.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Project Description: Next Word Prediction Using LSTM
#### Project Overview:This project aims to develop a deep learning model for predicting the next word in a given sequence of words. The model is built using Long Short-Term Memory (LSTM) networks, which are well-suited for sequence prediction tasks. The project includes the following steps:
1- Data Collection: We use the text of Shakespeare's "Hamlet" as our dataset. This rich, complex text provides a good challenge for our model.
2- Data Preprocessing: The text data is tokenized, converted into sequences, and padded to ensure uniform input lengths. The sequences are then split into training and testing sets.
3- Model Building: An LSTM model is constructed with an embedding layer, two LSTM layers, and a dense output layer with a softmax activation function to predict the probability of the next word.
4- Model Training: The model is trained using the prepared sequences, with early stopping implemented to prevent overfitting. Early stopping monitors the validation loss and stops training when the loss stops improving.
5- Model Evaluation: The model is evaluated using a set of example sentences to test its ability to predict the next word accurately.
6- Deployment: A Streamlit web application is developed to allow users to input a sequence of words and get the predicted next word in real-time.
![alt text]()