Reputation: 11
Is there a way in python (by using NLTK or SpaCy or any other library) that I can predict the POS tag of the word that are likely to follow the words so far I have entered.
Eg- If i input
I am going to
It shows the POS tag of the next most likely word
eg NN, becuase college can come after this
Upvotes: 1
Views: 475
Reputation: 411
I would recommend to familiarize yourself with CoNNL-U Format. http://universaldependencies.org/format.html
And possibly also UDPipe https://lindat.mff.cuni.cz/services/udpipe/
Upvotes: 0
Reputation: 633
You may train a simple language model on POS tag data using LSTMs. That is, say, using Spacy, convert your corpus to POS tag corpus. Train the model using the new corpus. Predict the POS on evaluation. Another way to do it is by building a language model on your data, generate the next word and find its POS.
Upvotes: 2