From 0981d68022a609023ffd3c196e314190e9fc6740 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 31 Jan 2015 13:41:46 +1100 Subject: [PATCH] * Set a sent_end flag during parsing, for later use --- spacy/syntax/arc_eager.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index 80cf9deaf..170b7e465 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -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: