Skip to content

archaeo_super_prompt.dataset.normalization.intervention_date.transforms

source module archaeo_super_prompt.dataset.normalization.intervention_date.transforms

Transform functions.

Functions

source get_day_period(row: InterventionDataForDateNormalizationRowSchema)Date | None

Extract a precise date period from a string of 2 dates separated by an hyphen.

source get_single_day_period(row: InterventionDataForDateNormalizationRowSchema)Date | None

Extract a single date with a day.

source get_month_period(row: InterventionDataForDateNormalizationRowSchema)Date | None

Extract a month period from a string of 2 months separated by an hyphen.

source get_single_month_period(row: InterventionDataForDateNormalizationRowSchema)Date | None

Extract a single month period.

source start_year(row: InterventionDataForDateNormalizationRowSchema)Date | None

Extract a year, meaning a year when the intervention has started.

source generic_period(row: InterventionDataForDateNormalizationRowSchema)Date | None

Process a generic period of 2 dates separated by an hyphen.

Notes

If 2 dates are given, usually it is not a window of time for the start of the intervention but the start and the end dates of the intervention.

source generic_single_period(row: InterventionDataForDateNormalizationRowSchema)Date | None

Process a single period with the day, month or year precision.

source precised_numeric_start_date(row: InterventionDataForDateNormalizationRowSchema)Date | None

Process a precise date in the format day/month/year.

source before_day_month(row: InterventionDataForDateNormalizationRowSchema)Date | None

Return only the most recent day before which the intervention could happen.