From 1044a1341323ded20d56c1cbcab73061282b5ccb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 24 May 2015 17:40:15 +0200 Subject: [PATCH] * Begin refactoring scorer to use recall over gold dependencies --- spacy/scorer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spacy/scorer.py b/spacy/scorer.py index d91eea5f4..253c1bd1a 100644 --- a/spacy/scorer.py +++ b/spacy/scorer.py @@ -47,8 +47,6 @@ class Scorer(object): assert len(tokens) == len(gold) for i, token in enumerate(tokens): - if token.orth_.isspace(): - continue if not self.skip_token(i, token, gold): self.total += 1 if verbose: @@ -77,4 +75,4 @@ class Scorer(object): self.ents_fp += len(guess_ents - gold_ents) def skip_token(self, i, token, gold): - return gold.labels[i] in ('P', 'punct') and gold.heads[i] != None + return gold.labels[i] in ('P', 'punct') or gold.heads[i] == None