Sometimes, we want to pull out keywords or keyphrases from a larger body of text quickly. This helps us mentally paint a picture of what this text is about. This is particularly helpful in the analysis of texts, like long emails or essays.
As a quick hack, we can pull out all relevant nouns. This is because most keywords are in fact nouns of some form:
example_text = 'Bansoori is an Indian classical instrument. Tom plays Bansoori and Guitar.'
doc = nlp(example_text)
We need noun chunks. Noun chunks are noun phrases – not single words, but a short phrase which describes the noun. For example, the blue skies or the world's largest conglomerate.
To get the noun chunks from a document, simply iterate ...