mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 10:26:35 +03:00
Fix default arguments in DependencyParser.score
This commit is contained in:
parent
9d79916792
commit
901801b33b
|
@ -34,7 +34,7 @@ DEFAULT_PARSER_MODEL = Config().from_str(default_model_config)["model"]
|
||||||
|
|
||||||
@Language.factory(
|
@Language.factory(
|
||||||
"parser",
|
"parser",
|
||||||
assigns=["token.dep", "token.is_sent_start", "doc.sents"],
|
assigns=["token.dep", "token.head", "token.is_sent_start", "doc.sents"],
|
||||||
default_config={
|
default_config={
|
||||||
"moves": None,
|
"moves": None,
|
||||||
"update_with_oracle_cut_size": 100,
|
"update_with_oracle_cut_size": 100,
|
||||||
|
@ -120,7 +120,8 @@ cdef class DependencyParser(Parser):
|
||||||
return dep
|
return dep
|
||||||
results = {}
|
results = {}
|
||||||
results.update(Scorer.score_spans(examples, "sents", **kwargs))
|
results.update(Scorer.score_spans(examples, "sents", **kwargs))
|
||||||
results.update(Scorer.score_deps(examples, "dep", getter=dep_getter,
|
kwargs.setdefault("getter", dep_getter)
|
||||||
ignore_labels=("p", "punct"), **kwargs))
|
kwargs.setdefault("ignore_label", ("p", "punct"))
|
||||||
|
results.update(Scorer.score_deps(examples, "dep", **kwargs))
|
||||||
del results["sents_per_type"]
|
del results["sents_per_type"]
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in New Issue
Block a user