Skip to content

Fahma623/Next-Word-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Next Word Prediction

This project demonstrates the implementation of a next word prediction model using TensorFlow and Keras. The model achieves a high accuracy rate of 96.68% in predicting the next word in a given text sequence.

Features

  • High Accuracy: Achieved 96.68% accuracy in next word prediction tasks.

  • Efficient Preprocessing: Enhanced model efficiency through effective text tokenization and preprocessing.

  • Optimized Architecture: Utilized advanced LSTM layers in a sequential neural network to streamline prediction processes and reduce computational time.

Implementation Details

  • Text Preprocessing: Tokenized and preprocessed the text data to convert it into sequences of integers. This involved removing punctuation, converting text to lowercase, and creating a word index.
  • Model Architecture: Built a sequential neural network model using an Embedding layer, an LSTM layer with 128 units, and a Dense layer with softmax activation. The model was compiled using categorical cross-entropy loss and the Adam optimizer.
  • Training: The model was trained on a large dataset with multiple epochs to ensure convergence and accuracy.
  • Prediction: After training, the model was used to predict the next word in a given sequence of words by selecting the word with the highest probability.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published