@deprecated_factory(
"family",
"eds.family",
default_config=DEFAULT_CONFIG,
assigns=["span._.family"],
)
@Language.factory(
"eds.family",
default_config=DEFAULT_CONFIG,
assigns=["span._.family"],
)
def create_component(
nlp: Language,
name: str,
family: Optional[List[str]],
termination: Optional[List[str]],
attr: str,
explain: bool,
on_ents_only: bool,
use_sections: bool,
):
return FamilyContext(
nlp,
family=family,
termination=termination,
attr=attr,
explain=explain,
on_ents_only=on_ents_only,
use_sections=use_sections,
)