Exemplo n.º 1
0
    def __init__(self):
        super().__init__()

        self._utility_configuration = FrenchDateTimeUtilityConfiguration()
        self._unit_map = FrenchDateTime.UnitMap
        self._unit_value_map = FrenchDateTime.UnitValueMap
        self._season_map = FrenchDateTime.SeasonMap
        self._cardinal_map = FrenchDateTime.CardinalMap
        self._day_of_week = FrenchDateTime.DayOfWeek
        self._month_of_year = FrenchDateTime.MonthOfYear
        self._numbers = FrenchDateTime.Numbers
        self._double_numbers = FrenchDateTime.DoubleNumbers
        self._cardinal_extractor = FrenchCardinalExtractor()
        self._integer_extractor = FrenchIntegerExtractor()
        self._ordinal_extractor = FrenchOrdinalExtractor()
        self._day_of_month = {**BaseDateTime.DayOfMonthDictionary, **FrenchDateTime.DayOfMonth}
        self._number_parser = BaseNumberParser(FrenchNumberParserConfiguration())
        self._date_extractor = BaseDateExtractor(FrenchDateExtractorConfiguration())
        self._time_extractor = BaseTimeExtractor(FrenchTimeExtractorConfiguration())
        self._duration_extractor = BaseDurationExtractor(FrenchDurationExtractorConfiguration())
        self._date_period_extractor = BaseDatePeriodExtractor(FrenchDatePeriodExtractorConfiguration())
        self._time_period_extractor = BaseTimePeriodExtractor(FrenchTimePeriodExtractorConfiguration())
        self._date_time_extractor = BaseDateTimeExtractor(FrenchDateTimeExtractorConfiguration())
        self._date_time_period_extractor = BaseDateTimePeriodExtractor(FrenchDateTimePeriodExtractorConfiguration())
        self._duration_parser = BaseDurationParser(FrenchDurationParserConfiguration(self))
        self._date_parser = BaseDateParser(FrenchDateParserConfiguration(self))
        self._time_parser = FrenchTimeParser(FrenchTimeParserConfiguration(self))
        self._date_period_parser = BaseDatePeriodParser(FrenchDatePeriodParserConfiguration(self))
        self._time_period_parser = BaseTimePeriodParser(FrenchTimePeriodParserConfiguration(self))
        self._date_time_parser = BaseDateTimeParser(FrenchDateTimeParserConfiguration(self))
        self._date_time_period_parser = BaseDateTimePeriodParser(FrenchDateTimePeriodParserConfiguration(self))
 def __init__(self):
     self._simple_cases_regexes = [
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.SimpleCasesRegex),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.OneWordPeriodRegex),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.StrictYearRegex),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.YearToYear),
         RegExpUtility.get_safe_reg_exp(
             ChineseDateTime.YearToYearSuffixRequired),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.YearAndMonth),
         RegExpUtility.get_safe_reg_exp(
             ChineseDateTime.PureNumYearAndMonth),
         RegExpUtility.get_safe_reg_exp(
             ChineseDateTime.DatePeriodYearInChineseRegex),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.WeekOfMonthRegex),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.SeasonWithYear),
         RegExpUtility.get_safe_reg_exp(ChineseDateTime.QuarterRegex),
     ]
     self._illegal_year_regex = RegExpUtility.get_safe_reg_exp(
         BaseDateTime.IllegalYearRegex)
     self._year_regex = RegExpUtility.get_safe_reg_exp(
         ChineseDateTime.YearRegex)
     self._till_regex = RegExpUtility.get_safe_reg_exp(
         ChineseDateTime.DatePeriodTillRegex)
     self._followed_unit = RegExpUtility.get_safe_reg_exp(
         ChineseDateTime.FollowedUnit)
     self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp(
         ChineseDateTime.NumberCombinedWithUnit)
     self._past_regex = RegExpUtility.get_safe_reg_exp(
         ChineseDateTime.PastRegex)
     self._future_regex = RegExpUtility.get_safe_reg_exp(
         ChineseDateTime.FutureRegex)
     self._date_point_extractor = ChineseDateExtractor()
     self._integer_extractor = ChineseNumberExtractor()
     self._number_parser = BaseNumberParser(
         ChineseNumberParserConfiguration())
Exemplo n.º 3
0
    def __init__(self):
        self._simple_cases_regexes = [
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.SimpleCasesRegex),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.OneWordPeriodRegex),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.StrictYearRegex),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.YearToYear),
            RegExpUtility.get_safe_reg_exp(
                ChineseDateTime.YearToYearSuffixRequired),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.YearAndMonth),
            RegExpUtility.get_safe_reg_exp(
                ChineseDateTime.PureNumYearAndMonth),
            RegExpUtility.get_safe_reg_exp(
                ChineseDateTime.DatePeriodYearInChineseRegex),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.WeekOfMonthRegex),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.SeasonWithYear),
            RegExpUtility.get_safe_reg_exp(ChineseDateTime.QuarterRegex),
        ]
        self._illegal_year_regex = RegExpUtility.get_safe_reg_exp(
            BaseDateTime.IllegalYearRegex)
        self._year_regex = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.YearRegex)
        self._till_regex = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.DatePeriodTillRegex)
        self._followed_unit = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.FollowedUnit)
        self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.NumberCombinedWithUnit)
        self._past_regex = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.PastRegex)
        self._future_regex = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.FutureRegex)
        self._date_point_extractor = ChineseDateExtractor()
        self._integer_extractor = ChineseNumberExtractor()
        self._number_parser = BaseNumberParser(
            ChineseNumberParserConfiguration())
        self._now_regex = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.NowRegex)
        self._month_num_regex = RegExpUtility.get_safe_reg_exp(
            ChineseDateTime.MonthNumRegex)

        # TODO When the implementation for these properties is added, change the None values to their respective Regexps
        self._previous_prefix_regex = None
        self._check_both_before_after = None
        self._century_suffix_regex = None
        self._year_period_regex = None
        self._duration_date_restrictions = None
        self._more_than_regex = None
        self._less_than_regex = None
        self._later_regex = None
        self._ago_regex = None
        self._future_suffix_regex = None
        self._within_next_prefix_regex = None
        self._cardinal_extractor = None
        self._ordinal_extractor = None
        self._time_unit_regex = None
    def __init__(self):
        if SpanishDateTime.DefaultLanguageFallback == Constants.DEFAULT_LANGUAGE_FALLBACK_DMY:
            date_extractor_4 = SpanishDateTime.DateExtractor5
            date_extractor_5 = SpanishDateTime.DateExtractor4
        else:
            date_extractor_4 = SpanishDateTime.DateExtractor4
            date_extractor_5 = SpanishDateTime.DateExtractor5

        self._date_regex_list = [
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor1),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor2),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor3),
            RegExpUtility.get_safe_reg_exp(date_extractor_4),
            RegExpUtility.get_safe_reg_exp(date_extractor_5),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor6),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor7),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor8),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor9),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor10),
        ]

        self._implicit_date_list = [
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.OnRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.RelaxedOnRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.SpecialDayRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.ThisRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.LastDateRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.NextDateRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.WeekDayRegex),
            RegExpUtility.get_safe_reg_exp(
                SpanishDateTime.WeekDayOfMonthRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.SpecialDateRegex),
        ]
        self._month_end = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.MonthEndRegex)
        self._of_month = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.OfMonthRegex)
        self._date_unit_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.DateUnitRegex)
        self._for_the_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.ForTheRegex)
        self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayAndDayOfMonthRegex)
        self._relative_month_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.RelativeMonthRegex)
        self._week_day_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayRegex)
        self._day_of_week = SpanishDateTime.DayOfWeek
        self._ordinal_extractor = SpanishOrdinalExtractor()
        self._integer_extractor = SpanishIntegerExtractor()
        self._number_parser = BaseNumberParser(
            SpanishNumberParserConfiguration())
        self._duration_extractor = BaseDurationExtractor(
            SpanishDurationExtractorConfiguration())
        self._utility_configuration = SpanishDateTimeUtilityConfiguration()
Exemplo n.º 5
0
    def __init__(self):
        super().__init__()
        self._time_zone_parser = BaseTimeZoneParser()
        self._utility_configuration = ItalianDateTimeUtilityConfiguration()
        self._unit_map = ItalianDateTime.UnitMap
        self._unit_value_map = ItalianDateTime.UnitValueMap
        self._season_map = ItalianDateTime.SeasonMap
        self._cardinal_map = ItalianDateTime.CardinalMap
        self._day_of_week = ItalianDateTime.DayOfWeek
        self._month_of_year = ItalianDateTime.MonthOfYear
        self._numbers = ItalianDateTime.Numbers
        self._double_numbers = ItalianDateTime.DoubleNumbers
        self._check_both_before_after = ItalianDateTime.CheckBothBeforeAfter

        self._cardinal_extractor = ItalianCardinalExtractor()
        self._integer_extractor = ItalianIntegerExtractor()
        self._ordinal_extractor = ItalianOrdinalExtractor()

        self._day_of_month = {
            **BaseDateTime.DayOfMonthDictionary,
            **ItalianDateTime.DayOfMonth
        }
        self._number_parser = BaseNumberParser(
            ItalianNumberParserConfiguration())
        self._date_extractor = BaseDateExtractor(
            ItalianDateExtractorConfiguration())
        self._time_extractor = BaseTimeExtractor(
            ItalianTimeExtractorConfiguration())
        self._duration_extractor = BaseDurationExtractor(
            ItalianDurationExtractorConfiguration())
        self._date_period_extractor = BaseDatePeriodExtractor(
            ItalianDatePeriodExtractorConfiguration())
        self._time_period_extractor = BaseTimePeriodExtractor(
            ItalianTimePeriodExtractorConfiguration())
        self._date_time_extractor = BaseDateTimeExtractor(
            ItalianDateTimeExtractorConfiguration())
        self._date_time_period_extractor = BaseDateTimePeriodExtractor(
            ItalianDateTimePeriodExtractorConfiguration())
        self._duration_parser = BaseDurationParser(
            ItalianDurationParserConfiguration(self))
        self._date_parser = BaseDateParser(
            ItalianDateParserConfiguration(self))
        self._time_parser = ItalianTimeParser(
            ItalianTimeParserConfiguration(self))
        self._date_period_parser = BaseDatePeriodParser(
            ItalianDatePeriodParserConfiguration(self))
        self._time_period_parser = BaseTimePeriodParser(
            ItalianTimePeriodParserConfiguration(self))
        self._date_time_parser = BaseDateTimeParser(
            ItalianDateTimeParserConfiguration(self))
        self._date_time_period_parser = BaseDateTimePeriodParser(
            ItalianDateTimePeriodParserConfiguration(self))
Exemplo n.º 6
0
    def __init__(self):
        BaseDateParserConfiguration.__init__(self)

        self._utility_configuration = SpanishDateTimeUtilityConfiguration()

        self._unit_map = SpanishDateTime.UnitMap
        self._unit_value_map = SpanishDateTime.UnitValueMap
        self._season_map = SpanishDateTime.SeasonMap
        self._cardinal_map = SpanishDateTime.CardinalMap
        self._day_of_week = SpanishDateTime.DayOfWeek
        self._month_of_year = SpanishDateTime.MonthOfYear
        self._numbers = SpanishDateTime.Numbers
        self._double_numbers = SpanishDateTime.DoubleNumbers
        self._check_both_before_after = SpanishDateTime.CheckBothBeforeAfter

        self._cardinal_extractor = SpanishCardinalExtractor()
        self._integer_extractor = SpanishIntegerExtractor()
        self._ordinal_extractor = SpanishOrdinalExtractor()

        self._number_parser = BaseNumberParser(
            SpanishNumberParserConfiguration())
        self._date_extractor = BaseDateExtractor(
            SpanishDateExtractorConfiguration())
        self._time_extractor = BaseTimeExtractor(
            SpanishTimeExtractorConfiguration())
        self._duration_extractor = BaseDurationExtractor(
            SpanishDurationExtractorConfiguration())
        self._date_period_extractor = BaseDatePeriodExtractor(
            SpanishDatePeriodExtractorConfiguration())
        self._time_period_extractor = BaseTimePeriodExtractor(
            SpanishTimePeriodExtractorConfiguration())
        self._date_time_extractor = BaseDateTimeExtractor(
            SpanishDateTimeExtractorConfiguration())
        self._date_time_period_extractor = BaseDateTimePeriodExtractor(
            SpanishDateTimePeriodExtractorConfiguration())
        self._duration_parser = BaseDurationParser(
            SpanishDurationParserConfiguration(self))
        self._date_parser = BaseDateParser(
            SpanishDateParserConfiguration(self))
        self._time_parser = BaseTimeParser(
            SpanishTimeParserConfiguration(self))
        self._date_period_parser = BaseDatePeriodParser(
            SpanishDatePeriodParserConfiguration(self))
        self._time_period_parser = BaseTimePeriodParser(
            SpanishTimePeriodParserConfiguration(self))
        self._date_time_parser = BaseDateTimeParser(
            SpanishDateTimeParserConfiguration(self))
        self._date_time_period_parser = BaseDateTimePeriodParser(
            SpanishDateTimePeriodParserConfiguration(self))
Exemplo n.º 7
0
 def __init__(self):
     self._date_regex_list = [
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor1),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor2),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor3),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor4),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor5),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor6),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor7L),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor7S),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor8),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor9L),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor9S),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractorA),
     ]
     self._implicit_date_list = [
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.OnRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.RelaxedOnRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.SpecialDayRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.ThisRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.LastDateRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.NextDateRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.SingleWeekDayRegex),
         RegExpUtility.get_safe_reg_exp(
             EnglishDateTime.WeekDayOfMonthRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.SpecialDate),
     ]
     self._month_end = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.MonthEnd)
     self._of_month = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.OfMonth)
     self._date_unit_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.DateUnitRegex)
     self._for_the_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.ForTheRegex)
     self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.WeekDayAndDayOfMonthRegex)
     self._relative_month_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.RelativeMonthRegex)
     self._week_day_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.WeekDayRegex)
     self._day_of_week = EnglishDateTime.DayOfWeek
     self._ordinal_extractor = EnglishOrdinalExtractor()
     self._integer_extractor = EnglishIntegerExtractor()
     self._number_parser = BaseNumberParser(
         EnglishNumberParserConfiguration())
     self._duration_extractor = BaseDurationExtractor(
         EnglishDurationExtractorConfiguration())
     self._utility_configuration = EnglishDateTimeUtilityConfiguration()
Exemplo n.º 8
0
    def __init__(self):
        if SpanishDateTime.DefaultLanguageFallback == Constants.DEFAULT_LANGUAGE_FALLBACK_DMY:
            date_extractor_4 = SpanishDateTime.DateExtractor5
            date_extractor_5 = SpanishDateTime.DateExtractor4
            date_extractor_6 = SpanishDateTime.DateExtractor8
            date_extractor_8 = SpanishDateTime.DateExtractor6
            date_extractor_7 = SpanishDateTime.DateExtractor9
            date_extractor_9 = SpanishDateTime.DateExtractor7
        else:
            date_extractor_4 = SpanishDateTime.DateExtractor4
            date_extractor_5 = SpanishDateTime.DateExtractor5
            date_extractor_6 = SpanishDateTime.DateExtractor6
            date_extractor_8 = SpanishDateTime.DateExtractor8
            date_extractor_7 = SpanishDateTime.DateExtractor7
            date_extractor_9 = SpanishDateTime.DateExtractor9

        self._date_regex_list = [
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor1),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor2),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor3),
            RegExpUtility.get_safe_reg_exp(date_extractor_4),
            RegExpUtility.get_safe_reg_exp(date_extractor_5),
            RegExpUtility.get_safe_reg_exp(date_extractor_6),
            RegExpUtility.get_safe_reg_exp(date_extractor_7),
            RegExpUtility.get_safe_reg_exp(date_extractor_8),
            RegExpUtility.get_safe_reg_exp(date_extractor_9),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.DateExtractor10),
        ]

        self._implicit_date_list = [
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.OnRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.RelaxedOnRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.SpecialDayRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.ThisRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.LastDateRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.NextDateRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.WeekDayRegex),
            RegExpUtility.get_safe_reg_exp(
                SpanishDateTime.WeekDayOfMonthRegex),
            RegExpUtility.get_safe_reg_exp(SpanishDateTime.SpecialDateRegex),
        ]
        self._month_end = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.MonthEndRegex)
        self._of_month = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.OfMonthRegex)
        self._date_unit_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.DateUnitRegex)
        self._for_the_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.ForTheRegex)
        self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayAndDayOfMonthRegex)
        self._relative_month_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.RelativeMonthRegex)
        self._week_day_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayRegex)
        self._day_of_week = SpanishDateTime.DayOfWeek
        self._ordinal_extractor = SpanishOrdinalExtractor()
        self._integer_extractor = SpanishIntegerExtractor()
        self._number_parser = BaseNumberParser(
            SpanishNumberParserConfiguration())
        self._duration_extractor = BaseDurationExtractor(
            SpanishDurationExtractorConfiguration())
        self._utility_configuration = SpanishDateTimeUtilityConfiguration()
        self._range_connector_symbol_regex = RegExpUtility.get_safe_reg_exp(
            BaseDateTime.RangeConnectorSymbolRegex)
        self._strict_relative_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.StrictRelativeRegex)
        self._year_suffix = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.YearSuffix)
        self._month_of_year = SpanishDateTime.MonthOfYear
        self._prefix_article_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.PrefixArticleRegex)
        self._week_day_end = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayEnd)
        self._more_than_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.MoreThanRegex)
        self._less_than_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.LessThanRegex)
        self._in_connector_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.InConnectorRegex)
        self._range_unit_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.RangeUnitRegex)
        self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.SinceYearSuffixRegex)
        self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayAndDayRegex)
        self._week_day_start = RegExpUtility.get_safe_reg_exp(
            SpanishDateTime.WeekDayStart)
        self._check_both_before_after = SpanishDateTime.CheckBothBeforeAfter
 def __init__(self):
     self._date_regex_list = [
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor1),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor3),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor4),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor5),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor6),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor7L),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor7S),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor8),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor9L),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractor9S),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.DateExtractorA),
     ]
     self._implicit_date_list = [
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.OnRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.RelaxedOnRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.SpecialDayRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.ThisRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.LastDateRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.NextDateRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.SingleWeekDayRegex),
         RegExpUtility.get_safe_reg_exp(
             EnglishDateTime.WeekDayOfMonthRegex),
         RegExpUtility.get_safe_reg_exp(EnglishDateTime.SpecialDate),
     ]
     self._month_end = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.MonthEnd)
     self._of_month = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.OfMonth)
     self._date_unit_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.DateUnitRegex)
     self._for_the_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.ForTheRegex)
     self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.WeekDayAndDayOfMonthRegex)
     self._relative_month_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.RelativeMonthRegex)
     self._week_day_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.WeekDayRegex)
     self._day_of_week = EnglishDateTime.DayOfWeek
     self._ordinal_extractor = EnglishOrdinalExtractor()
     self._integer_extractor = EnglishIntegerExtractor()
     self._number_parser = BaseNumberParser(
         EnglishNumberParserConfiguration())
     self._duration_extractor = BaseDurationExtractor(
         EnglishDurationExtractorConfiguration())
     self._utility_configuration = EnglishDateTimeUtilityConfiguration()
     self._range_connector_symbol_regex = RegExpUtility.get_safe_reg_exp(
         BaseDateTime.RangeConnectorSymbolRegex)
     self._strict_relative_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.StrictRelativeRegex)
     self._year_suffix = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.YearSuffix)
     self._month_of_year = EnglishDateTime.MonthOfYear
     self._prefix_article_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.PrefixArticleRegex)
     self._week_day_end = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.WeekDayEnd)
     self._more_than_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.MoreThanRegex)
     self._less_than_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.LessThanRegex)
     self._in_connector_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.InConnectorRegex)
     self._range_unit_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.RangeUnitRegex)
     self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.SinceYearSuffixRegex)
     self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp(
         EnglishDateTime.WeekDayAndDayRegex)