I need to classify words into their parts of speech. Like a verb, a noun, an adverb etc.. I used the
nltk.word_tokenize() #to identify word in a sentence nltk.
This will work
for sent in chunked_sentences: for chunk in sent: if hasattr(chunk, "label"): print(chunk.label())