From 1ec4e6fc953fa84c72189a4be5d21d9caf7ff7d9 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 7 Jun 2015 19:10:32 +0200 Subject: [PATCH] * Don't score whitespace tokens --- spacy/scorer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/scorer.py b/spacy/scorer.py index e2b513cb1..28b7208c6 100644 --- a/spacy/scorer.py +++ b/spacy/scorer.py @@ -81,6 +81,8 @@ class Scorer(object): cand_deps = set() cand_tags = set() for token in tokens: + if token.orth_.isspace(): + continue gold_i = gold.cand_to_gold[token.i] if gold_i is None: self.tags.fp += 1