From 3533bb61cbf4a12ce4d7efb7d86a362becb0afe1 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 16 Aug 2017 18:23:27 -0500 Subject: [PATCH] Add option of 8 feature parse state --- spacy/syntax/_state.pxd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spacy/syntax/_state.pxd b/spacy/syntax/_state.pxd index 9aeeba441..3da9e5d4c 100644 --- a/spacy/syntax/_state.pxd +++ b/spacy/syntax/_state.pxd @@ -74,7 +74,16 @@ cdef cppclass StateC: free(this.shifted - PADDING) void set_context_tokens(int* ids, int n) nogil: - if n == 13: + if n == 8: + ids[0] = this.B(0) + ids[1] = this.B(1) + ids[2] = this.S(0) + ids[3] = this.S(1) + ids[4] = this.H(this.S(0)) + ids[5] = this.L(this.B(0), 1) + ids[6] = this.L(this.S(0), 2) + ids[7] = this.R(this.S(0), 1) + elif n == 13: ids[0] = this.B(0) ids[1] = this.B(1) ids[2] = this.S(0)