To predict the next word
Here we will predict the next word using our data set ,we will use numpy library for fetching the data set and then we will go line by line in data if something matches with the user input then it will predict next word and if there is not any similar sentence then it will say unable to predict.
- List out the libraries imported ->numpy
We need to make large data set previously in which variety of sentences should be present.Then we need to import library and the run the script so if it is able to predict then it will but unable to do so then it will say unable to predict.
Here the most important thing is that we need to create a proper dataset from which we are going to predict,so our data set should be large. Next thing is importing the numpy library and then going line by line for predicting the word.
Neel Shah