* Assign ROOT label by default. May be papering over another bug.

This commit is contained in:
Matthew Honnibal 2015-03-20 01:16:12 +01:00
parent 9f4ad8fdfb
commit 231ce2dae5
1 changed files with 2 additions and 0 deletions

View File

@ -249,6 +249,8 @@ cdef class Tokens:
self.is_parsed = True self.is_parsed = True
for i in range(self.length): for i in range(self.length):
self.data[i] = parsed[i] self.data[i] = parsed[i]
if self.data[i].dep == 0:
self.data[i].dep = self.vocab.strings['ROOT']
cdef class Span: cdef class Span: