Skip to content

edsnlp.pipelines.core.normalizer.accents.factory

DEFAULT_CONFIG = dict(accents=None) module-attribute

create_component(nlp, name, accents)

Source code in edsnlp/pipelines/core/normalizer/accents/factory.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@deprecated_factory(
    "accents", "eds.accents", default_config=DEFAULT_CONFIG, assigns=["token.norm"]
)
@Language.factory(
    "eds.accents",
    default_config=DEFAULT_CONFIG,
    assigns=["token.norm"],
)
def create_component(
    nlp: Language,
    name: str,
    accents: Optional[List[Tuple[str, str]]],
):
    return Accents(
        accents=accents,
    )