#  Copyright (c) Microsoft Corporation. All rights reserved.
#  Licensed under the MIT License.

from typing import List, Pattern

from recognizers_text.utilities import RegExpUtility
from recognizers_number.number import BaseNumberParser
from recognizers_number.number.italian.extractors import ItalianIntegerExtractor, ItalianCardinalExtractor
from recognizers_number.number.italian.parsers import ItalianNumberParserConfiguration
from ...resources.base_date_time import BaseDateTime
from ...resources.italian_date_time import ItalianDateTime
from ..extractors import DateTimeExtractor
from ..base_duration import BaseDurationExtractor
from ..base_date import BaseDateExtractor
from ..base_dateperiod import DatePeriodExtractorConfiguration, MatchedIndex
from .duration_extractor_config import ItalianDurationExtractorConfiguration
from .date_extractor_config import ItalianDateExtractorConfiguration
from recognizers_text.extractor import Extractor
from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor


class ItalianDatePeriodExtractorConfiguration(DatePeriodExtractorConfiguration):
    @property
    def previous_prefix_regex(self) -> Pattern:
        return self._previous_prefix_regex

    @property
    def check_both_before_after(self) -> bool:
        return self._check_both_before_after

    @property
    def simple_cases_regexes(self) -> List[Pattern]:
        return self._simple_cases_regexes

    @property
    def illegal_year_regex(self) -> Pattern:
        return self._illegal_year_regex

    @property
    def year_regex(self) -> Pattern:
        return self._year_regex

    @property
    def till_regex(self) -> Pattern:
        return self._till_regex

    @property
    def followed_unit(self) -> Pattern:
        return self._followed_unit

    @property
    def number_combined_with_unit(self) -> Pattern:
        return self._number_combined_with_unit

    @property
    def past_regex(self) -> Pattern:
        return self._past_regex

    @property
    def decade_with_century_regex(self) -> Pattern:
        return self._decade_with_century_regex

    @property
    def future_regex(self) -> Pattern:
        return self._future_regex

    @property
    def week_of_regex(self) -> Pattern:
        return self._week_of_regex

    @property
    def month_of_regex(self) -> Pattern:
        return self._month_of_regex

    @property
    def date_unit_regex(self) -> Pattern:
        return self._date_unit_regex

    @property
    def in_connector_regex(self) -> Pattern:
        return self._in_connector_regex

    @property
    def range_unit_regex(self) -> Pattern:
        return self._range_unit_regex

    @property
    def date_point_extractor(self) -> DateTimeExtractor:
        return self._date_point_extractor

    @property
    def integer_extractor(self) -> BaseNumberExtractor:
        return self._integer_extractor

    @property
    def number_parser(self) -> BaseNumberParser:
        return self._number_parser

    @property
    def duration_extractor(self) -> DateTimeExtractor:
        return self._duration_extractor

    @property
    def now_regex(self) -> Pattern:
        return self._now_regex

    @property
    def future_suffix_regex(self) -> Pattern:
        return self._future_suffix_regex

    @property
    def ago_regex(self) -> Pattern:
        return self._ago_regex

    @property
    def later_regex(self) -> Pattern:
        return self._later_regex

    @property
    def less_than_regex(self) -> Pattern:
        return self._less_than_regex

    @property
    def more_than_regex(self) -> Pattern:
        return self._more_than_regex

    @property
    def duration_date_restrictions(self) -> [str]:
        return self._duration_date_restrictions

    @property
    def year_period_regex(self) -> Pattern:
        return self._year_period_regex

    @property
    def month_num_regex(self) -> Pattern:
        return self._month_num_regex

    @property
    def century_suffix_regex(self) -> Pattern:
        return self._century_suffix_regex

    @property
    def ordinal_extractor(self) -> BaseNumberExtractor:
        return self._ordinal_extractor

    @property
    def cardinal_extractor(self) -> Extractor:
        return self._cardinal_extractor

    @property
    def time_unit_regex(self) -> Pattern:
        return self._time_unit_regex

    @property
    def within_next_prefix_regex(self) -> Pattern:
        return self._within_next_prefix_regex

    @property
    def range_connector_regex(self) -> Pattern:
        return self._range_connector_regex

    @property
    def day_regex(self) -> Pattern:
        return self._day_regex

    @property
    def week_day_regex(self) -> Pattern:
        return self._week_day_regex

    @property
    def relative_month_regex(self) -> Pattern:
        return self._relative_month_regex

    @property
    def month_suffix_regex(self) -> Pattern:
        return self._month_suffix_regex

    @property
    def past_prefix_regex(self) -> Pattern:
        return self._past_prefix_regex

    @property
    def next_prefix_regex(self) -> Pattern:
        return self._next_prefix_regex

    @property
    def this_prefix_regex(self) -> Pattern:
        return self._this_prefix_regex

    @property
    def which_week_regex(self) -> Pattern:
        return self._which_week_regex

    @property
    def rest_of_date_regex(self) -> Pattern:
        return self._rest_of_date_regex

    @property
    def complex_date_period_regex(self) -> Pattern:
        return self._complex_date_period_regex

    @property
    def week_day_of_month_regex(self) -> Pattern:
        return self._week_day_of_month_regex

    @property
    def all_half_year_regex(self) -> Pattern:
        return self._all_half_year_regex

    def __init__(self):
        self._all_half_year_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.AllHalfYearRegex)
        self._week_day_of_month_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.WeekDayOfMonthRegex)
        self._complex_date_period_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.ComplexDatePeriodRegex)
        self._rest_of_date_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.RestOfDateRegex)
        self._which_week_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.WhichWeekRegex)
        self._this_prefix_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.ThisPrefixRegex)
        self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.NextSuffixRegex)
        self._past_prefix_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.PastSuffixRegex)
        self._month_suffix_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.MonthSuffixRegex)
        self._relative_month_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.RelativeMonthRegex)
        self._week_day_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.WeekDayRegex)
        self._day_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.DayRegex)
        self._range_connector_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.RangeConnectorRegex)
        self._time_unit_regex = RegExpUtility.get_safe_reg_exp(ItalianDateTime.TimeUnitRegex)
        self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.PastSuffixRegex)
        self._check_both_before_after = ItalianDateTime.CheckBothBeforeAfter
        self._simple_cases_regexes = [
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.SimpleCasesRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.BetweenRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.OneWordPeriodRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.MonthWithYear),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.MonthNumWithYear),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.YearRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.YearPeriodRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.WeekOfYearRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.WeekDayOfMonthRegex),
            RegExpUtility.get_safe_reg_exp(
                ItalianDateTime.MonthFrontBetweenRegex),
            RegExpUtility.get_safe_reg_exp(
                ItalianDateTime.MonthFrontSimpleCasesRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.QuarterRegex),
            RegExpUtility.get_safe_reg_exp(
                ItalianDateTime.QuarterRegexYearFront),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.SeasonRegex),
            RegExpUtility.get_safe_reg_exp(
                ItalianDateTime.LaterEarlyPeriodRegex),
            RegExpUtility.get_safe_reg_exp(
                ItalianDateTime.WeekWithWeekDayRangeRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.YearPlusNumberRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.DecadeWithCenturyRegex),
            RegExpUtility.get_safe_reg_exp(ItalianDateTime.RelativeDecadeRegex)
        ]
        self._check_both_before_after = ItalianDateTime.CheckBothBeforeAfter
        self._illegal_year_regex = RegExpUtility.get_safe_reg_exp(
            BaseDateTime.IllegalYearRegex)
        self._year_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.YearRegex)
        self._till_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.TillRegex)
        self._followed_unit = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.FollowedDateUnit)
        self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.NumberCombinedWithDateUnit)
        self._past_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.PastSuffixRegex)
        self._future_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.NextSuffixRegex)
        self._week_of_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.WeekOfRegex)
        self._month_of_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.MonthOfRegex)
        self._date_unit_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.DateUnitRegex)
        self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.WithinNextPrefixRegex)
        self._in_connector_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.InConnectorRegex)
        self._range_unit_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.RangeUnitRegex)

        self.from_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.FromRegex)
        self.connector_and_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.ConnectorAndRegex)
        self.before_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.BeforeRegex2)

        self._date_point_extractor = BaseDateExtractor(
            ItalianDateExtractorConfiguration())
        self._integer_extractor = ItalianIntegerExtractor()
        self._number_parser = BaseNumberParser(
            ItalianNumberParserConfiguration())
        self._duration_extractor = BaseDurationExtractor(
            ItalianDurationExtractorConfiguration())
        self._now_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.NowRegex)
        self._future_suffix_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.FutureSuffixRegex
        )
        self._ago_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.AgoRegex
        )
        self._later_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.LaterRegex
        )
        self._less_than_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.LessThanRegex
        )
        self._more_than_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.MoreThanRegex
        )
        self._duration_date_restrictions = ItalianDateTime.DurationDateRestrictions
        self._year_period_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.YearPeriodRegex
        )
        self._month_num_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.MonthNumRegex
        )
        self._century_suffix_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.CenturySuffixRegex
        )
        self._ordinal_extractor = ItalianOrdinalExtractor()
        self._cardinal_extractor = ItalianCardinalExtractor()
        self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp(
            ItalianDateTime.PreviousPrefixRegex
        )
        self._cardinal_extractor = ItalianCardinalExtractor()
        # TODO When the implementation for these properties is added, change the None values to their respective Regexps
        self._time_unit_regex = None

    def get_from_token_index(self, source: str) -> MatchedIndex:
        match = self.from_regex.search(source)
        if match:
            return MatchedIndex(True, match.start())

        return MatchedIndex(False, -1)

    def get_between_token_index(self, source: str) -> MatchedIndex:
        match = self.before_regex.search(source)
        if match:
            return MatchedIndex(True, match.start())

        return MatchedIndex(False, -1)

    def has_connector_token(self, source: str) -> bool:
        return not self.connector_and_regex.search(source) is None

[((212, 36, 212, 100), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(212, 67, 212, 99): 'ItalianDateTime.AllHalfYearRegex'}, {}), '(ItalianDateTime.AllHalfYearRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((213, 40, 213, 107), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(213, 71, 213, 106): 'ItalianDateTime.WeekDayOfMonthRegex'}, {}), '(ItalianDateTime.WeekDayOfMonthRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((214, 42, 214, 112), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(214, 73, 214, 111): 'ItalianDateTime.ComplexDatePeriodRegex'}, {}), '(ItalianDateTime.ComplexDatePeriodRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((215, 35, 215, 98), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(215, 66, 215, 97): 'ItalianDateTime.RestOfDateRegex'}, {}), '(ItalianDateTime.RestOfDateRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((216, 33, 216, 95), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(216, 64, 216, 94): 'ItalianDateTime.WhichWeekRegex'}, {}), '(ItalianDateTime.WhichWeekRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((217, 34, 217, 97), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(217, 65, 217, 96): 'ItalianDateTime.ThisPrefixRegex'}, {}), '(ItalianDateTime.ThisPrefixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((218, 34, 218, 97), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(218, 65, 218, 96): 'ItalianDateTime.NextSuffixRegex'}, {}), '(ItalianDateTime.NextSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((219, 34, 219, 97), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(219, 65, 219, 96): 'ItalianDateTime.PastSuffixRegex'}, {}), '(ItalianDateTime.PastSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((220, 35, 220, 99), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(220, 66, 220, 98): 'ItalianDateTime.MonthSuffixRegex'}, {}), '(ItalianDateTime.MonthSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((221, 37, 221, 103), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(221, 68, 221, 102): 'ItalianDateTime.RelativeMonthRegex'}, {}), '(ItalianDateTime.RelativeMonthRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((222, 31, 222, 91), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(222, 62, 222, 90): 'ItalianDateTime.WeekDayRegex'}, {}), '(ItalianDateTime.WeekDayRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((223, 26, 223, 82), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(223, 57, 223, 81): 'ItalianDateTime.DayRegex'}, {}), '(ItalianDateTime.DayRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((224, 38, 224, 105), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(224, 69, 224, 104): 'ItalianDateTime.RangeConnectorRegex'}, {}), '(ItalianDateTime.RangeConnectorRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((225, 32, 225, 93), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(225, 63, 225, 92): 'ItalianDateTime.TimeUnitRegex'}, {}), '(ItalianDateTime.TimeUnitRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((226, 38, 227, 44), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(227, 12, 227, 43): 'ItalianDateTime.PastSuffixRegex'}, {}), '(ItalianDateTime.PastSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((256, 35, 257, 42), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(257, 12, 257, 41): 'BaseDateTime.IllegalYearRegex'}, {}), '(BaseDateTime.IllegalYearRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((258, 27, 259, 38), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(259, 12, 259, 37): 'ItalianDateTime.YearRegex'}, {}), '(ItalianDateTime.YearRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((260, 27, 261, 38), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(261, 12, 261, 37): 'ItalianDateTime.TillRegex'}, {}), '(ItalianDateTime.TillRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((262, 30, 263, 45), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(263, 12, 263, 44): 'ItalianDateTime.FollowedDateUnit'}, {}), '(ItalianDateTime.FollowedDateUnit)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((264, 42, 265, 55), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(265, 12, 265, 54): 'ItalianDateTime.NumberCombinedWithDateUnit'}, {}), '(ItalianDateTime.NumberCombinedWithDateUnit)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((266, 27, 267, 44), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(267, 12, 267, 43): 'ItalianDateTime.PastSuffixRegex'}, {}), '(ItalianDateTime.PastSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((268, 29, 269, 44), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(269, 12, 269, 43): 'ItalianDateTime.NextSuffixRegex'}, {}), '(ItalianDateTime.NextSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((270, 30, 271, 40), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(271, 12, 271, 39): 'ItalianDateTime.WeekOfRegex'}, {}), '(ItalianDateTime.WeekOfRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((272, 31, 273, 41), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(273, 12, 273, 40): 'ItalianDateTime.MonthOfRegex'}, {}), '(ItalianDateTime.MonthOfRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((274, 32, 275, 42), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(275, 12, 275, 41): 'ItalianDateTime.DateUnitRegex'}, {}), '(ItalianDateTime.DateUnitRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((276, 41, 277, 50), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(277, 12, 277, 49): 'ItalianDateTime.WithinNextPrefixRegex'}, {}), '(ItalianDateTime.WithinNextPrefixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((278, 35, 279, 45), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(279, 12, 279, 44): 'ItalianDateTime.InConnectorRegex'}, {}), '(ItalianDateTime.InConnectorRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((280, 33, 281, 43), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(281, 12, 281, 42): 'ItalianDateTime.RangeUnitRegex'}, {}), '(ItalianDateTime.RangeUnitRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((283, 26, 284, 38), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(284, 12, 284, 37): 'ItalianDateTime.FromRegex'}, {}), '(ItalianDateTime.FromRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((285, 35, 286, 46), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(286, 12, 286, 45): 'ItalianDateTime.ConnectorAndRegex'}, {}), '(ItalianDateTime.ConnectorAndRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((287, 28, 288, 41), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(288, 12, 288, 40): 'ItalianDateTime.BeforeRegex2'}, {}), '(ItalianDateTime.BeforeRegex2)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((292, 34, 292, 59), 'recognizers_number.number.italian.extractors.ItalianIntegerExtractor', 'ItalianIntegerExtractor', ({}, {}), '()', False, 'from recognizers_number.number.italian.extractors import ItalianIntegerExtractor, ItalianCardinalExtractor\n'), ((297, 26, 298, 37), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(298, 12, 298, 36): 'ItalianDateTime.NowRegex'}, {}), '(ItalianDateTime.NowRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((299, 36, 301, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(300, 12, 300, 45): 'ItalianDateTime.FutureSuffixRegex'}, {}), '(ItalianDateTime.FutureSuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((302, 26, 304, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(303, 12, 303, 36): 'ItalianDateTime.AgoRegex'}, {}), '(ItalianDateTime.AgoRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((305, 28, 307, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(306, 12, 306, 38): 'ItalianDateTime.LaterRegex'}, {}), '(ItalianDateTime.LaterRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((308, 32, 310, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(309, 12, 309, 41): 'ItalianDateTime.LessThanRegex'}, {}), '(ItalianDateTime.LessThanRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((311, 32, 313, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(312, 12, 312, 41): 'ItalianDateTime.MoreThanRegex'}, {}), '(ItalianDateTime.MoreThanRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((315, 34, 317, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(316, 12, 316, 43): 'ItalianDateTime.YearPeriodRegex'}, {}), '(ItalianDateTime.YearPeriodRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((318, 32, 320, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(319, 12, 319, 41): 'ItalianDateTime.MonthNumRegex'}, {}), '(ItalianDateTime.MonthNumRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((321, 37, 323, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(322, 12, 322, 46): 'ItalianDateTime.CenturySuffixRegex'}, {}), '(ItalianDateTime.CenturySuffixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((324, 34, 324, 59), 'recognizers_number.ItalianOrdinalExtractor', 'ItalianOrdinalExtractor', ({}, {}), '()', False, 'from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor\n'), ((325, 35, 325, 61), 'recognizers_number.ItalianCardinalExtractor', 'ItalianCardinalExtractor', ({}, {}), '()', False, 'from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor\n'), ((326, 38, 328, 9), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(327, 12, 327, 47): 'ItalianDateTime.PreviousPrefixRegex'}, {}), '(ItalianDateTime.PreviousPrefixRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((329, 35, 329, 61), 'recognizers_number.ItalianCardinalExtractor', 'ItalianCardinalExtractor', ({}, {}), '()', False, 'from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor\n'), ((230, 12, 230, 76), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(230, 43, 230, 75): 'ItalianDateTime.SimpleCasesRegex'}, {}), '(ItalianDateTime.SimpleCasesRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((231, 12, 231, 72), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(231, 43, 231, 71): 'ItalianDateTime.BetweenRegex'}, {}), '(ItalianDateTime.BetweenRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((232, 12, 232, 78), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(232, 43, 232, 77): 'ItalianDateTime.OneWordPeriodRegex'}, {}), '(ItalianDateTime.OneWordPeriodRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((233, 12, 233, 73), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(233, 43, 233, 72): 'ItalianDateTime.MonthWithYear'}, {}), '(ItalianDateTime.MonthWithYear)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((234, 12, 234, 76), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(234, 43, 234, 75): 'ItalianDateTime.MonthNumWithYear'}, {}), '(ItalianDateTime.MonthNumWithYear)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((235, 12, 235, 69), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(235, 43, 235, 68): 'ItalianDateTime.YearRegex'}, {}), '(ItalianDateTime.YearRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((236, 12, 236, 75), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(236, 43, 236, 74): 'ItalianDateTime.YearPeriodRegex'}, {}), '(ItalianDateTime.YearPeriodRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((237, 12, 237, 75), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(237, 43, 237, 74): 'ItalianDateTime.WeekOfYearRegex'}, {}), '(ItalianDateTime.WeekOfYearRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((238, 12, 238, 79), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(238, 43, 238, 78): 'ItalianDateTime.WeekDayOfMonthRegex'}, {}), '(ItalianDateTime.WeekDayOfMonthRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((239, 12, 240, 55), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(240, 16, 240, 54): 'ItalianDateTime.MonthFrontBetweenRegex'}, {}), '(ItalianDateTime.MonthFrontBetweenRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((241, 12, 242, 59), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(242, 16, 242, 58): 'ItalianDateTime.MonthFrontSimpleCasesRegex'}, {}), '(ItalianDateTime.MonthFrontSimpleCasesRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((243, 12, 243, 72), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(243, 43, 243, 71): 'ItalianDateTime.QuarterRegex'}, {}), '(ItalianDateTime.QuarterRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((244, 12, 245, 54), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(245, 16, 245, 53): 'ItalianDateTime.QuarterRegexYearFront'}, {}), '(ItalianDateTime.QuarterRegexYearFront)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((246, 12, 246, 71), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(246, 43, 246, 70): 'ItalianDateTime.SeasonRegex'}, {}), '(ItalianDateTime.SeasonRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((247, 12, 248, 54), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(248, 16, 248, 53): 'ItalianDateTime.LaterEarlyPeriodRegex'}, {}), '(ItalianDateTime.LaterEarlyPeriodRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((249, 12, 250, 58), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(250, 16, 250, 57): 'ItalianDateTime.WeekWithWeekDayRangeRegex'}, {}), '(ItalianDateTime.WeekWithWeekDayRangeRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((251, 12, 251, 79), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(251, 43, 251, 78): 'ItalianDateTime.YearPlusNumberRegex'}, {}), '(ItalianDateTime.YearPlusNumberRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((252, 12, 252, 82), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(252, 43, 252, 81): 'ItalianDateTime.DecadeWithCenturyRegex'}, {}), '(ItalianDateTime.DecadeWithCenturyRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((253, 12, 253, 79), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', ({(253, 43, 253, 78): 'ItalianDateTime.RelativeDecadeRegex'}, {}), '(ItalianDateTime.RelativeDecadeRegex)', False, 'from recognizers_text.utilities import RegExpUtility\n'), ((294, 12, 294, 46), 'recognizers_number.number.italian.parsers.ItalianNumberParserConfiguration', 'ItalianNumberParserConfiguration', ({}, {}), '()', False, 'from recognizers_number.number.italian.parsers import ItalianNumberParserConfiguration\n')]