A simple NLP project for word prediction using N-grams.
Read the text corpus from a local file using Python.
Remove specific patterns from the text for preprocessing.
Create a clean text file as the standard dataset for further processing.
Create matrices for tokens, bigrams, and trigrams from the clean dataset.
Predict the next word based on the last word entered by the user using bigrams.
Predict the next word based on the last two words entered by the user using trigrams.
Display the final results of word prediction with probabilities for bigrams and trigrams.