Skip to content

edsnlp.pipelines.core.sentences.factory

DEFAULT_CONFIG = dict(punct_chars=None, use_endlines=True) module-attribute

create_component(nlp, name, punct_chars, use_endlines)

Source code in edsnlp/pipelines/core/sentences/factory.py
15
16
17
18
19
20
21
22
23
24
25
26
@deprecated_factory("sentences", "eds.sentences", default_config=DEFAULT_CONFIG)
@Language.factory("eds.sentences", default_config=DEFAULT_CONFIG)
def create_component(
    nlp: Language,
    name: str,
    punct_chars: Optional[List[str]],
    use_endlines: bool,
):
    return SentenceSegmenter(
        punct_chars=punct_chars,
        use_endlines=use_endlines,
    )
Back to top