Skip to content

kiarashrahmani/Word-Prediction-Using-Ngrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word Predictor using N-Gram

A simple NLP project for word prediction using N-grams.

Step 0: Importing our Corpus

Read the text corpus from a local file using Python.

Step 1: Preprocessing

Remove specific patterns from the text for preprocessing.

Step 2: Creating Our Standard Dataset

Create a clean text file as the standard dataset for further processing.

Step 3: Create Our Matrices

Create matrices for tokens, bigrams, and trigrams from the clean dataset.

Step 4: Word Predicting

4-1: Bigram

Predict the next word based on the last word entered by the user using bigrams.

4-2: Trigram

Predict the next word based on the last two words entered by the user using trigrams.

Step 5: Final Results

Display the final results of word prediction with probabilities for bigrams and trigrams.

About

A simple NLP project for word prediction using N-grams.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published