@deprecated_factory("dates", "eds.dates", default_config=DEFAULT_CONFIG)
@Language.factory("eds.dates", default_config=DEFAULT_CONFIG)
def create_component(
nlp: Language,
name: str,
absolute: Optional[List[str]],
relative: Optional[List[str]],
duration: Optional[List[str]],
false_positive: Optional[List[str]],
on_ents_only: Union[bool, List[str]],
detect_periods: bool,
as_ents: bool,
attr: str,
):
return Dates(
nlp,
absolute=absolute,
relative=relative,
duration=duration,
false_positive=false_positive,
on_ents_only=on_ents_only,
detect_periods=detect_periods,
as_ents=as_ents,
attr=attr,
)