mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 20:52:23 +03:00
Formatting
This commit is contained in:
parent
6855df0e66
commit
1a79d18796
|
@ -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
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user