mirror of
https://github.com/explosion/spaCy.git
synced 2025-10-20 18:54:21 +03:00
* initial coref_er pipe * matcher more flexible * base coref component without actual model * initial setup of coref_er.score * rename to include_label * preliminary score_clusters method * apply scoring in coref component * IO fix * return None loss for now * rename to CoreferenceResolver * some preliminary unit tests * use registry as callable
19 lines
467 B
Python
19 lines
467 B
Python
from typing import List
|
|
from thinc.api import Model
|
|
from thinc.types import Floats2d
|
|
|
|
from ...util import registry
|
|
from ...tokens import Doc
|
|
|
|
|
|
@registry.architectures("spacy.Coref.v0")
|
|
def build_coref_model(
|
|
tok2vec: Model[List[Doc], List[Floats2d]]
|
|
) -> Model:
|
|
"""Build a coref resolution model, using a provided token-to-vector component.
|
|
TODO.
|
|
|
|
tok2vec (Model[List[Doc], List[Floats2d]]): The token-to-vector subnetwork.
|
|
"""
|
|
return tok2vec
|