mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* 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:
|
||||
current_best = words_to_root
|
||||
root = i
|
||||
if root == -1:
|
||||
return self.doc[self.start]
|
||||
else:
|
||||
return self.doc[root]
|
||||
|
||||
property lefts:
|
||||
|
|
Loading…
Reference in New Issue
Block a user