October 2018
Intermediate to advanced
472 pages
10h 57m
English
Let's extract all of the nouns present in the corpus. This is very useful practice when you want to extract something specific. We are using NN, NNS, NNP, and NNPS tags to extract the nouns:
nouns = [] for tag in tagged_wt:nouns.append([k for k,v in tag if v in ['NN','NNS','NNP','NNPS']])[['way', 'text', 'words'], ['processes', 'text', 'words', 'tokenization', 'words', 'tokens'], ['Punctuation', 'marks', 'tokens'], ['token', 'sentence', 'analysis'], ['part', 'speech', 'word', 'example', 'nouns', 'person', 'place', 'thing', 'verbs', 'actions', 'occurences', 'adjectives', 'words', 'describe', 'nouns'], ['attributes', 'summary', 'piece', 'text', 'nouns', 'verbs', 'adjectives']]
Read now
Unlock full access