mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
* Add attr relation in base NP detection
This commit is contained in:
parent
4988356cf0
commit
eb7138c761
|
@ -158,7 +158,7 @@ cdef class Doc:
|
|||
def noun_chunks(self):
|
||||
"""Yield spans for base noun phrases."""
|
||||
cdef const TokenC* word
|
||||
labels = ['nsubj', 'dobj', 'nsubjpass', 'pcomp', 'pobj', 'conj']
|
||||
labels = ['nsubj', 'dobj', 'nsubjpass', 'pcomp', 'pobj', 'conj', 'attr']
|
||||
np_deps = [self.vocab.strings[label] for label in labels]
|
||||
np_label = self.vocab.strings['NP']
|
||||
for i in range(self.length):
|
||||
|
|
Loading…
Reference in New Issue
Block a user