mirror of https://github.com/explosion/spaCy.git
* Questionable fix to problem in Span.root
This commit is contained in:
parent
8bd16ce8f7
commit
e5c447e237
|
@ -194,7 +194,10 @@ cdef class Span:
|
|||
if words_to_root < current_best:
|
||||
current_best = words_to_root
|
||||
root = i
|
||||
return self.doc[root]
|
||||
if root == -1:
|
||||
return self.doc[self.start]
|
||||
else:
|
||||
return self.doc[root]
|
||||
|
||||
property lefts:
|
||||
"""Tokens that are to the left of the Span, whose head is within the Span."""
|
||||
|
|
Loading…
Reference in New Issue