From 8cd06cc763ad50c9c553bdc93fd201ad30368e4c Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 2 May 2018 14:39:48 +0000 Subject: [PATCH] Try to fix root-outside-sentence bug --- 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 a95a1910f..d082cee5c 100644 --- a/spacy/syntax/_state.pxd +++ b/spacy/syntax/_state.pxd @@ -314,8 +314,8 @@ cdef cppclass StateC: this._stack[this._s_i] = this.B(0) this._s_i += 1 this._b_i += 1 - if this.B_(0).sent_start == 1: - this.set_break(this.B(0)) + if this.safe_get(this.B_(0).l_edge).sent_start == 1: + this.set_break(this.B_(0).l_edge) if this._b_i > this._break: this._break = -1