Skip to content

edsnlp.pipelines.ner.scores.tnm.factory

DEFAULT_CONFIG = dict(pattern=None, attr='LOWER') module-attribute

create_component(nlp, name, pattern, attr)

Source code in edsnlp/pipelines/ner/scores/tnm/factory.py
13
14
15
16
17
18
19
20
21
22
23
24
@Language.factory("eds.TNM", default_config=DEFAULT_CONFIG)
def create_component(
    nlp: Language,
    name: str,
    pattern: Optional[Union[List[str], str]],
    attr: str,
):
    return TNM(
        nlp,
        pattern=pattern,
        attr=attr,
    )