Fix scoring of tokenization for punct

This commit is contained in:
Matthew Honnibal 2018-02-24 10:32:32 +01:00
parent 12b39f87da
commit 4890ee1732

View File

@ -100,8 +100,7 @@ class Scorer(object):
continue
gold_i = gold.cand_to_gold[token.i]
if gold_i is None:
if token.dep_.lower() not in punct_labels:
self.tokens.fp += 1
self.tokens.fp += 1
else:
self.tokens.tp += 1
cand_tags.add((gold_i, token.tag_))