mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-14 18:22:27 +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)
|
add_dep(s, s.stack[-1], s.stack[0], get_s0(s).dep)
|
||||||
pop_stack(s)
|
pop_stack(s)
|
||||||
elif t.move == BREAK:
|
elif t.move == BREAK:
|
||||||
|
s.sent[s.i-1].sent_end = True
|
||||||
while s.stack_len != 0:
|
while s.stack_len != 0:
|
||||||
if get_s0(s).head == 0:
|
if get_s0(s).head == 0:
|
||||||
get_s0(s).dep = 0
|
get_s0(s).dep = 0
|
||||||
s.stack -= 1
|
s.stack -= 1
|
||||||
s.stack_len -= 1
|
s.stack_len -= 1
|
||||||
|
|
||||||
if not at_eol(s):
|
if not at_eol(s):
|
||||||
push_stack(s)
|
push_stack(s)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user