mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Fix GoldParse init when token count differs (#5191)
Fix the `GoldParse` initialization when the number of tokens has changed (due to merging subtokens with the parser).
This commit is contained in:
parent
d88a377bed
commit
a04f802099
|
@ -231,7 +231,7 @@ class Scorer(object):
|
||||||
"""
|
"""
|
||||||
if len(doc) != len(gold):
|
if len(doc) != len(gold):
|
||||||
gold = GoldParse.from_annot_tuples(
|
gold = GoldParse.from_annot_tuples(
|
||||||
doc, tuple(zip(*gold.orig_annot)) + (gold.cats,)
|
doc, zip(*gold.orig_annot), cats=gold.cats,
|
||||||
)
|
)
|
||||||
gold_deps = set()
|
gold_deps = set()
|
||||||
gold_deps_per_dep = {}
|
gold_deps_per_dep = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user