WordNet is the lexical database i.e. dictionary for the English language, specifically designed for natural language processing.
Code #1 : Creating class to look up words in WordNet.
This WordNetTagger class will count the no. of each POS tag found in the Synsets for a word and then, the most common tag is to treebank tag using internal mapping.
Code #2 : Using a simple WordNetTagger()
Accuracy of WordNetTagger : 0.17914876598160262
Using Code 3, we can improve the accuracy.
Code #3 : WordNetTagger class at the end of an NgramTagger backoff chain
Accuracy : 0.8848262464925534
- NLP | WuPalmer - WordNet Similarity
- NLP | Synsets for a word in WordNet
- How to get synonyms/antonyms from NLTK WordNet in Python?
- NLP | Classifier-based tagging
- NLP | Trigrams'n'Tags (TnT) Tagging
- NLP | Regex and Affix tagging
- NLP | Distributed Tagging with Execnet - Part 2
- NLP | Distributed Tagging with Execnet - Part 1
- Python | PoS Tagging and Lemmatization using spaCy
- NLP | Part of Speech - Default Tagging
- NLP | Backoff Tagging to combine taggers
- Python | Part of Speech Tagging using TextBlob
- Part of Speech Tagging with Stop words using NLTK in python
- Python | Numpy dstack() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.