How to get all noun phrases in Spacy
问题 I am new to Spacy and I would like to extract "all" the noun phrases from a sentence. I'm wondering how I can do it. I have the following code: import spacy nlp = spacy.load("en") file = open("E:/test.txt", "r") doc = nlp(file.read()) for np in doc.noun_chunks: print(np.text) But it returns only the base noun phrases, that is, phrases which don't have any other NP in them. That is, for the following phrase, I get the result below: Phrase: We try to explicitly describe the geometry of the