Formatting

This commit is contained in:
Paul O'Leary McCann 2022-03-16 20:10:47 +09:00
parent 6855df0e66
commit 1a79d18796

View File

@ -60,6 +60,7 @@ DEFAULT_MODEL = Config().from_str(default_config)["model"]
DEFAULT_CLUSTERS_PREFIX = "coref_clusters" DEFAULT_CLUSTERS_PREFIX = "coref_clusters"
@Language.factory( @Language.factory(
"coref", "coref",
assigns=["doc.spans"], assigns=["doc.spans"],
@ -389,6 +390,7 @@ class CoreferenceResolver(TrainablePipe):
out[fname] = mean([ss[fname] for ss in scores]) out[fname] = mean([ss[fname] for ss in scores])
return out return out
class SpanPredictor(TrainablePipe): class SpanPredictor(TrainablePipe):
"""Pipeline component to resolve one-token spans to full spans. """Pipeline component to resolve one-token spans to full spans.
@ -475,4 +477,3 @@ class SpanPredictor(TrainablePipe):
def score(self, examples, **kwargs): def score(self, examples, **kwargs):
# TODO this will overlap significantly with coref, maybe factor into function # TODO this will overlap significantly with coref, maybe factor into function
... ...