mirror of https://github.com/explosion/spaCy.git
Merge pull request #1689 from mpuels/patch-3
doc: Replace 'is not' with '!=' in code example
This commit is contained in:
commit
2ae4755def
|
@ -264,7 +264,7 @@ p
|
||||||
def dependency_labels_to_root(token):
|
def dependency_labels_to_root(token):
|
||||||
"""Walk up the syntactic tree, collecting the arc labels."""
|
"""Walk up the syntactic tree, collecting the arc labels."""
|
||||||
dep_labels = []
|
dep_labels = []
|
||||||
while token.head is not token:
|
while token.head != token:
|
||||||
dep_labels.append(token.dep)
|
dep_labels.append(token.dep)
|
||||||
token = token.head
|
token = token.head
|
||||||
return dep_labels
|
return dep_labels
|
||||||
|
|
Loading…
Reference in New Issue