#  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

[((5851, 5915), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.AllHalfYearRegex'], {}), '(ItalianDateTime.AllHalfYearRegex)\n', (5881, 5915), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((5956, 6023), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WeekDayOfMonthRegex'], {}), '(ItalianDateTime.WeekDayOfMonthRegex)\n', (5986, 6023), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6066, 6136), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.ComplexDatePeriodRegex'], {}), '(ItalianDateTime.ComplexDatePeriodRegex)\n', (6096, 6136), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6172, 6235), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.RestOfDateRegex'], {}), '(ItalianDateTime.RestOfDateRegex)\n', (6202, 6235), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6269, 6331), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WhichWeekRegex'], {}), '(ItalianDateTime.WhichWeekRegex)\n', (6299, 6331), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6366, 6429), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.ThisPrefixRegex'], {}), '(ItalianDateTime.ThisPrefixRegex)\n', (6396, 6429), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6464, 6527), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.NextSuffixRegex'], {}), '(ItalianDateTime.NextSuffixRegex)\n', (6494, 6527), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6562, 6625), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.PastSuffixRegex'], {}), '(ItalianDateTime.PastSuffixRegex)\n', (6592, 6625), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6661, 6725), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthSuffixRegex'], {}), '(ItalianDateTime.MonthSuffixRegex)\n', (6691, 6725), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6763, 6829), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.RelativeMonthRegex'], {}), '(ItalianDateTime.RelativeMonthRegex)\n', (6793, 6829), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6861, 6921), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WeekDayRegex'], {}), '(ItalianDateTime.WeekDayRegex)\n', (6891, 6921), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((6948, 7004), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.DayRegex'], {}), '(ItalianDateTime.DayRegex)\n', (6978, 7004), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7043, 7110), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.RangeConnectorRegex'], {}), '(ItalianDateTime.RangeConnectorRegex)\n', (7073, 7110), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7143, 7204), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.TimeUnitRegex'], {}), '(ItalianDateTime.TimeUnitRegex)\n', (7173, 7204), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7243, 7306), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.PastSuffixRegex'], {}), '(ItalianDateTime.PastSuffixRegex)\n', (7273, 7306), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9151, 9212), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['BaseDateTime.IllegalYearRegex'], {}), '(BaseDateTime.IllegalYearRegex)\n', (9181, 9212), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9253, 9310), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.YearRegex'], {}), '(ItalianDateTime.YearRegex)\n', (9283, 9310), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9351, 9408), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.TillRegex'], {}), '(ItalianDateTime.TillRegex)\n', (9381, 9408), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9452, 9516), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.FollowedDateUnit'], {}), '(ItalianDateTime.FollowedDateUnit)\n', (9482, 9516), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9572, 9646), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.NumberCombinedWithDateUnit'], {}), '(ItalianDateTime.NumberCombinedWithDateUnit)\n', (9602, 9646), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9687, 9750), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.PastSuffixRegex'], {}), '(ItalianDateTime.PastSuffixRegex)\n', (9717, 9750), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9793, 9856), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.NextSuffixRegex'], {}), '(ItalianDateTime.NextSuffixRegex)\n', (9823, 9856), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((9900, 9959), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WeekOfRegex'], {}), '(ItalianDateTime.WeekOfRegex)\n', (9930, 9959), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10004, 10064), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthOfRegex'], {}), '(ItalianDateTime.MonthOfRegex)\n', (10034, 10064), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10110, 10171), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.DateUnitRegex'], {}), '(ItalianDateTime.DateUnitRegex)\n', (10140, 10171), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10226, 10295), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WithinNextPrefixRegex'], {}), '(ItalianDateTime.WithinNextPrefixRegex)\n', (10256, 10295), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10344, 10408), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.InConnectorRegex'], {}), '(ItalianDateTime.InConnectorRegex)\n', (10374, 10408), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10455, 10517), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.RangeUnitRegex'], {}), '(ItalianDateTime.RangeUnitRegex)\n', (10485, 10517), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10558, 10615), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.FromRegex'], {}), '(ItalianDateTime.FromRegex)\n', (10588, 10615), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10664, 10729), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.ConnectorAndRegex'], {}), '(ItalianDateTime.ConnectorAndRegex)\n', (10694, 10729), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10771, 10831), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.BeforeRegex2'], {}), '(ItalianDateTime.BeforeRegex2)\n', (10801, 10831), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((10985, 11010), 'recognizers_number.number.italian.extractors.ItalianIntegerExtractor', 'ItalianIntegerExtractor', ([], {}), '()\n', (11008, 11010), False, 'from recognizers_number.number.italian.extractors import ItalianIntegerExtractor, ItalianCardinalExtractor\n'), ((11244, 11300), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.NowRegex'], {}), '(ItalianDateTime.NowRegex)\n', (11274, 11300), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((11350, 11415), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.FutureSuffixRegex'], {}), '(ItalianDateTime.FutureSuffixRegex)\n', (11380, 11415), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((11464, 11520), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.AgoRegex'], {}), '(ItalianDateTime.AgoRegex)\n', (11494, 11520), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((11571, 11629), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.LaterRegex'], {}), '(ItalianDateTime.LaterRegex)\n', (11601, 11629), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((11684, 11745), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.LessThanRegex'], {}), '(ItalianDateTime.LessThanRegex)\n', (11714, 11745), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((11800, 11861), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MoreThanRegex'], {}), '(ItalianDateTime.MoreThanRegex)\n', (11830, 11861), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((12002, 12065), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.YearPeriodRegex'], {}), '(ItalianDateTime.YearPeriodRegex)\n', (12032, 12065), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((12120, 12181), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthNumRegex'], {}), '(ItalianDateTime.MonthNumRegex)\n', (12150, 12181), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((12241, 12307), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.CenturySuffixRegex'], {}), '(ItalianDateTime.CenturySuffixRegex)\n', (12271, 12307), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((12364, 12389), 'recognizers_number.ItalianOrdinalExtractor', 'ItalianOrdinalExtractor', ([], {}), '()\n', (12387, 12389), False, 'from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor\n'), ((12425, 12451), 'recognizers_number.ItalianCardinalExtractor', 'ItalianCardinalExtractor', ([], {}), '()\n', (12449, 12451), False, 'from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor\n'), ((12490, 12557), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.PreviousPrefixRegex'], {}), '(ItalianDateTime.PreviousPrefixRegex)\n', (12520, 12557), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((12615, 12641), 'recognizers_number.ItalianCardinalExtractor', 'ItalianCardinalExtractor', ([], {}), '()\n', (12639, 12641), False, 'from recognizers_number import ItalianOrdinalExtractor, BaseNumberExtractor, ItalianCardinalExtractor\n'), ((7448, 7512), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.SimpleCasesRegex'], {}), '(ItalianDateTime.SimpleCasesRegex)\n', (7478, 7512), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7526, 7586), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.BetweenRegex'], {}), '(ItalianDateTime.BetweenRegex)\n', (7556, 7586), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7600, 7666), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.OneWordPeriodRegex'], {}), '(ItalianDateTime.OneWordPeriodRegex)\n', (7630, 7666), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7680, 7741), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthWithYear'], {}), '(ItalianDateTime.MonthWithYear)\n', (7710, 7741), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7755, 7819), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthNumWithYear'], {}), '(ItalianDateTime.MonthNumWithYear)\n', (7785, 7819), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7833, 7890), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.YearRegex'], {}), '(ItalianDateTime.YearRegex)\n', (7863, 7890), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7904, 7967), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.YearPeriodRegex'], {}), '(ItalianDateTime.YearPeriodRegex)\n', (7934, 7967), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((7981, 8044), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WeekOfYearRegex'], {}), '(ItalianDateTime.WeekOfYearRegex)\n', (8011, 8044), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8058, 8125), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WeekDayOfMonthRegex'], {}), '(ItalianDateTime.WeekDayOfMonthRegex)\n', (8088, 8125), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8139, 8209), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthFrontBetweenRegex'], {}), '(ItalianDateTime.MonthFrontBetweenRegex)\n', (8169, 8209), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8240, 8314), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.MonthFrontSimpleCasesRegex'], {}), '(ItalianDateTime.MonthFrontSimpleCasesRegex)\n', (8270, 8314), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8345, 8405), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.QuarterRegex'], {}), '(ItalianDateTime.QuarterRegex)\n', (8375, 8405), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8419, 8488), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.QuarterRegexYearFront'], {}), '(ItalianDateTime.QuarterRegexYearFront)\n', (8449, 8488), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8519, 8578), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.SeasonRegex'], {}), '(ItalianDateTime.SeasonRegex)\n', (8549, 8578), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8592, 8661), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.LaterEarlyPeriodRegex'], {}), '(ItalianDateTime.LaterEarlyPeriodRegex)\n', (8622, 8661), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8692, 8765), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.WeekWithWeekDayRangeRegex'], {}), '(ItalianDateTime.WeekWithWeekDayRangeRegex)\n', (8722, 8765), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8796, 8863), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.YearPlusNumberRegex'], {}), '(ItalianDateTime.YearPlusNumberRegex)\n', (8826, 8863), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8877, 8947), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.DecadeWithCenturyRegex'], {}), '(ItalianDateTime.DecadeWithCenturyRegex)\n', (8907, 8947), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((8961, 9028), 'recognizers_text.utilities.RegExpUtility.get_safe_reg_exp', 'RegExpUtility.get_safe_reg_exp', (['ItalianDateTime.RelativeDecadeRegex'], {}), '(ItalianDateTime.RelativeDecadeRegex)\n', (8991, 9028), False, 'from recognizers_text.utilities import RegExpUtility\n'), ((11071, 11105), 'recognizers_number.number.italian.parsers.ItalianNumberParserConfiguration', 'ItalianNumberParserConfiguration', ([], {}), '()\n', (11103, 11105), False, 'from recognizers_number.number.italian.parsers import ItalianNumberParserConfiguration\n')]