mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-08 13:53:13 +03:00
Allow dep to be None in scorer, for missing labels.
This commit is contained in:
parent
39341598bb
commit
664f2dd1c0
|
@ -87,7 +87,7 @@ class Scorer(object):
|
||||||
gold_ents = set(tags_to_entities([annot[-1] for annot in gold.orig_annot]))
|
gold_ents = set(tags_to_entities([annot[-1] for annot in gold.orig_annot]))
|
||||||
for id_, word, tag, head, dep, ner in gold.orig_annot:
|
for id_, word, tag, head, dep, ner in gold.orig_annot:
|
||||||
gold_tags.add((id_, tag))
|
gold_tags.add((id_, tag))
|
||||||
if dep.lower() not in punct_labels:
|
if dep is not None and dep.lower() not in punct_labels:
|
||||||
gold_deps.add((id_, head, dep.lower()))
|
gold_deps.add((id_, head, dep.lower()))
|
||||||
cand_deps = set()
|
cand_deps = set()
|
||||||
cand_tags = set()
|
cand_tags = set()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user