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,6 +194,9 @@ cdef class Span:
|
||||||
if words_to_root < current_best:
|
if words_to_root < current_best:
|
||||||
current_best = words_to_root
|
current_best = words_to_root
|
||||||
root = i
|
root = i
|
||||||
|
if root == -1:
|
||||||
|
return self.doc[self.start]
|
||||||
|
else:
|
||||||
return self.doc[root]
|
return self.doc[root]
|
||||||
|
|
||||||
property lefts:
|
property lefts:
|
||||||
|
|
Loading…
Reference in New Issue