This repository contains the implementation of a Next Word Prediction model using Bidirectional Long Short-Term Memory (BiLSTM) in PyTorch. The model is trained on a dataset of Medium article titles to predict the next word in a given sentence.
The dataset used is the Medium Articles Dataset from Kaggle, containing article titles. The data is preprocessed using NLTK tokenization.
To set up the project locally, follow these steps:
git clone https://github.com/yourusername/Next-word-predictor-BiLSTM-pytorch.git
cd Next-word-predictor-BiLSTM-pytorch
- Embedding Layer: Converts words into dense vector representations.
- BiLSTM Layer: Captures long-term dependencies in both forward and backward directions.
- Fully Connected Layer: Outputs the probability distribution of the next word.
The model achieves reasonable accuracy on predicting the next word given an input phrase. More evaluation metrics and fine-tuning results will be added.
Anshul Katiyar
GitHub: Anshul21107
LinkedIn: Anshul Katiyar