How can I extract noun phrases from text using spacy?
I am not referring to part of speech tags.
In the documentation I cannot find anything about noun phrases or regul
If you want to specify more exactly which kind of noun phrase you want to extract, you can use textacy's matches function. You can pass any combination of POS tags. For example,
textacy.extract.matches(doc, "POS:ADP POS:DET:? POS:ADJ:? POS:NOUN:+")
will return any nouns that are preceded by a preposition and optionally by a determiner and/or adjective.
Textacy was built on spacy, so they should work perfectly together.