mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Set a sent_end flag during parsing, for later use
This commit is contained in:
parent
251dbf24d7
commit
0981d68022
|
@ -182,11 +182,13 @@ cdef class TransitionSystem:
|
|||
add_dep(s, s.stack[-1], s.stack[0], get_s0(s).dep)
|
||||
pop_stack(s)
|
||||
elif t.move == BREAK:
|
||||
s.sent[s.i-1].sent_end = True
|
||||
while s.stack_len != 0:
|
||||
if get_s0(s).head == 0:
|
||||
get_s0(s).dep = 0
|
||||
s.stack -= 1
|
||||
s.stack_len -= 1
|
||||
|
||||
if not at_eol(s):
|
||||
push_stack(s)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user