From a60a366b2cc9b4456523e54d7591c0969f8badea Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 5 Apr 2015 22:30:19 +0200 Subject: [PATCH] * Support 'punct' dep label in conll.pyx --- spacy/syntax/conll.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/syntax/conll.pyx b/spacy/syntax/conll.pyx index 9a980dc5b..e98a644fc 100644 --- a/spacy/syntax/conll.pyx +++ b/spacy/syntax/conll.pyx @@ -107,12 +107,12 @@ cdef class GoldParse: @property def n_non_punct(self): - return len([l for l in self.labels if l != 'P']) + return len([l for l in self.labels if l not in ('P', 'punct')]) cdef int heads_correct(self, TokenC* tokens, bint score_punct=False) except -1: n = 0 for i in range(self.length): - if not score_punct and self.labels_[i] == 'P': + if not score_punct and self.labels_[i] not in ('P', 'punct'): continue if self.heads[i] == -1: continue