explosion / spacy-stanza

💥 Use the latest Stanza (StanfordNLP) research models directly in spaCy
MIT License
723 stars 59 forks source link

Other API in SpaCy like noun_chunk #9

Closed zhengyi123456 closed 5 years ago

zhengyi123456 commented 5 years ago

can other APIs also be used in spacy command line but with stanford nlp model

ines commented 5 years ago

In theory, yes. The Doc.noun_chunks iterator uses the dependency labels and part-of-speech tags to generate the noun chunks. See here for an example: https://github.com/explosion/spaCy/blob/master/spacy/lang/en/syntax_iterators.py

However, it might not work out-of-the-box for languages where the StanfordNLP models use a different label scheme. If the labels are not the same as spaCy's, the noun chunks iterate won't produce any results.