Created
September 27, 2021 18:28
-
-
Save AayushSameerShah/6b896005288f0efe002b53727fa1ad67 to your computer and use it in GitHub Desktop.
This will give the list of words tagged by part of speech directly! Amazing! #NLP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tokens = nltk.word_tokenize(text.lower()) | |
| text = nltk.Text(tokens) | |
| tags = nltk.pos_tag(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From this question: https://stackoverflow.com/questions/10674832/count-verbs-nouns-and-other-parts-of-speech-with-pythons-nltk