From 3c44b5dc1a0b3a143493e9a08cae94060a764da8 Mon Sep 17 00:00:00 2001 From: Wolfgang Seeker Date: Thu, 5 May 2016 15:10:36 +0200 Subject: [PATCH 1/2] call deprojectivization after parsing --- spacy/syntax/arc_eager.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index bb4738a30..4e2590734 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -387,7 +387,7 @@ cdef class ArcEager(TransitionSystem): def finalize_doc(self, doc): doc.is_parsed = True if doc.vocab.lang == 'de': - PseudoProjectivity.projectivize(doc) + PseudoProjectivity.deprojectivize(doc) cdef int set_valid(self, int* output, const StateC* st) nogil: cdef bint[N_MOVES] is_valid From dbf8f5f3ec345cfbd12b9d425c54d85e17549076 Mon Sep 17 00:00:00 2001 From: Wolfgang Seeker Date: Thu, 5 May 2016 15:15:34 +0200 Subject: [PATCH 2/2] fix bug in StateC.set_break() --- spacy/syntax/_state.pxd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/syntax/_state.pxd b/spacy/syntax/_state.pxd index d7a24dbd1..bf1dbf90f 100644 --- a/spacy/syntax/_state.pxd +++ b/spacy/syntax/_state.pxd @@ -281,8 +281,8 @@ cdef cppclass StateC: this._sent[i].ent_type = ent_type void set_break(int i) nogil: - if 0 <= this.B(0) < this.length: - this._sent[this.B(0)].sent_start = True + if 0 <= i < this.length: + this._sent[i].sent_start = True this._break = this._b_i void clone(const StateC* src) nogil: