diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/Dutch/DateTimeDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/Dutch/DateTimeDefinitions.cs index 3ad4640399..c318247701 100644 --- a/.NET/Microsoft.Recognizers.Definitions.Common/Dutch/DateTimeDefinitions.cs +++ b/.NET/Microsoft.Recognizers.Definitions.Common/Dutch/DateTimeDefinitions.cs @@ -89,7 +89,7 @@ public static class DateTimeDefinitions public static readonly string MonthFrontSimpleCasesRegex = $@"\b({RangePrefixRegex}\s+)?(({MonthSuffixRegex}\s+((van)\s+)?({DayRegex})|({DayRegex})\s+((van)\s+)?{MonthSuffixRegex})\s*{TillRegex}\s*({DayRegex})|(op\s+)?({DayRegex})\s*{TillRegex}\s*({DayRegex})\s+{MonthSuffixRegex})((\s+|\s*,\s*){YearRegex})?\b"; public static readonly string MonthFrontBetweenRegex = $@"\b{MonthSuffixRegex}\s+(tussen\s+)({DayRegex})\s*{RangeConnectorRegex}\s*({DayRegex})((\s+|\s*,\s*){YearRegex})?\b"; public static readonly string BetweenRegex = $@"\b(tussen\s+)({DayRegex})\s*{RangeConnectorRegex}\s*({DayRegex})\s+{MonthSuffixRegex}((\s+|\s*,\s*){YearRegex})?\b"; - public static readonly string RelativeYearRegex = $@"({YearRegex}|(?volgende?|komende?|aanstaande?|aankomende?|huidige?|vorige?|afgelopen|dit)\s+jaar)"; + public static readonly string RelativeYearRegex = $@"({YearRegex}|{TwoDigitYearRegex}|(?volgende?|komende?|aanstaande?|aankomende?|huidige?|vorige?|afgelopen|dit)\s+jaar)"; public static readonly string MonthWithYear = $@"\b(({WrittenMonthRegex}(\.)?(\s*)[/\\\-\.,]?(\s+(van|over|in))?(\s*){RelativeYearRegex})|({RelativeYearRegex}(\s*),?(\s*){WrittenMonthRegex}))\b"; public static readonly string OneWordPeriodRegex = $@"\b((((de\s+)?maand\s+(van\s+)?)?({StrictRelativeRegex}\s+)?(?januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december|jan\.?|feb\.?|mar\.?|mrt\.?|apr\.?|jun\.?|jul\.?|aug\.?|sep\.?|sept\.?|oct\.?|okt\.?|nov\.?|dec\.?))|(maand|jaar)\s+tot(\s+op)?\s+heden|(({RelativeRegex}\s+)(mijn\s+)?(weekend|(?werkweek)|week|maand|jaar(?!\s+hoger dan))|({RelativeRegex}\s+)?(mijn\s+)(weekend|(?werkweek)|week|maand|jaar))(?!((\s+van)?\s+\d+|\s+tot(\s+op)?\s+heden|nu))(\s+{AfterNextSuffixRegex})?)\b"; public static readonly string MonthNumWithYear = $@"\b(({BaseDateTime.FourDigitYearRegex}(\s*)[/\-\.](\s*){MonthNumRegex})|({MonthNumRegex}(\s*)[/\-](\s*){BaseDateTime.FourDigitYearRegex}))\b"; diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/English/DateTimeDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/English/DateTimeDefinitions.cs index 0888b5e53b..13385574b4 100644 --- a/.NET/Microsoft.Recognizers.Definitions.Common/English/DateTimeDefinitions.cs +++ b/.NET/Microsoft.Recognizers.Definitions.Common/English/DateTimeDefinitions.cs @@ -87,7 +87,7 @@ public static class DateTimeDefinitions public static readonly string MonthFrontSimpleCasesRegex = $@"\b({RangePrefixRegex}\s+)?{MonthSuffixRegex}\s+((from)\s+)?({DayRegex}|{WrittenOrdinalDayRegex})\s*{TillRegex}\s*({DayRegex}|{WrittenOrdinalDayRegex})((\s+|\s*,\s*){YearRegex})?\b"; public static readonly string MonthFrontBetweenRegex = $@"\b{MonthSuffixRegex}\s+(between\s+)({DayRegex}|{WrittenOrdinalDayRegex})\s*{RangeConnectorRegex}\s*({DayRegex}|{WrittenOrdinalDayRegex})((\s+|\s*,\s*){YearRegex})?\b"; public static readonly string BetweenRegex = $@"\b(between\s+)({DayRegex}|{WrittenOrdinalDayRegex})\s*{RangeConnectorRegex}\s*({DayRegex}|{WrittenOrdinalDayRegex})\s+{MonthSuffixRegex}((\s+|\s*,\s*){YearRegex})?\b"; - public static readonly string MonthWithYear = $@"\b((({WrittenMonthRegex}[\.]?|((the\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|sixth|6th|seventh|7th|eighth|8th|ninth|9th|tenth|10th|eleventh|11th|twelfth|12th|last)\s+month(?=\s+(of|in))))((\s*)[/\\\-\.,]?(\s+(of|in))?(\s*)({YearRegex}|(?following|next|last|this)\s+year)|\s+(of|in)\s+{TwoDigitYearRegex}))|(({YearRegex}|(?following|next|last|this)\s+year)(\s*),?(\s*){WrittenMonthRegex}))\b"; + public static readonly string MonthWithYear = $@"\b((({WrittenMonthRegex}[\.]?|((the\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|sixth|6th|seventh|7th|eighth|8th|ninth|9th|tenth|10th|eleventh|11th|twelfth|12th|last)\s+month(?=\s+(of|in))))((\s*)[/\\\-\.,]?(\s+(of|in))?(\s*)({YearRegex}|{TwoDigitYearRegex}|(?following|next|last|this)\s+year)|\s+(of|in)\s+{TwoDigitYearRegex}))|(({YearRegex}|(?following|next|last|this)\s+year)(\s*),?(\s*){WrittenMonthRegex}))\b"; public const string SpecialYearPrefixes = @"(calendar|(?fiscal|school))"; public static readonly string OneWordPeriodRegex = $@"\b((((the\s+)?month of\s+)?({StrictRelativeRegex}\s+)?{MonthRegex})|(month|year) to date|(?((un)?till?|to)\s+date)|({RelativeRegex}\s+)?(my\s+)?((?working\s+week|workweek)|week(end)?|month|fortnight|(({SpecialYearPrefixes}\s+)?year))(?!((\s+of)?\s+\d+(?!({BaseDateTime.BaseAmDescRegex}|{BaseDateTime.BasePmDescRegex}))|\s+to\s+date))(\s+{AfterNextSuffixRegex})?)\b"; public static readonly string MonthNumWithYear = $@"\b(({BaseDateTime.FourDigitYearRegex}(\s*)[/\-\.](\s*){MonthNumRegex})|({MonthNumRegex}(\s*)[/\-](\s*){BaseDateTime.FourDigitYearRegex}))\b"; @@ -139,8 +139,8 @@ public static class DateTimeDefinitions public static readonly string DateExtractor4 = $@"\b{MonthNumRegex}\s*[/\\\-]\s*{DayRegex}[\.]?\s*[/\\\-]\s*{DateYearRegex}"; public static readonly string DateExtractor5 = $@"\b({DayPrefix}(\s*,)?\s+)?{DayRegex}\s*[/\\\-\.]\s*({MonthNumRegex}|{MonthRegex})\s*[/\\\-\.]\s*{DateYearRegex}(?!\s*[/\\\-\.]\s*\d+)"; public static readonly string DateExtractor6 = $@"(?<={DatePreposition}\s+)({StrictRelativeRegex}\s+)?({DayPrefix}\s+)?{MonthNumRegex}[\-\.]{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\b"; - public static readonly string DateExtractor7L = $@"\b({DayPrefix}(\s*,)?\s+)?{MonthNumRegex}\s*/\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\b"; - public static readonly string DateExtractor7S = $@"\b({DayPrefix}(\s*,)?\s+)?{MonthNumRegex}\s*/\s*{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\b"; + public static readonly string DateExtractor7L = $@"\b({DayPrefix}(\s*,)?\s+)?(the\s+)?{MonthNumRegex}\s*/\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\b"; + public static readonly string DateExtractor7S = $@"\b({DayPrefix}(\s*,)?\s+)?(the\s+)?{MonthNumRegex}\s*/\s*{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\b"; public static readonly string DateExtractor8 = $@"(?<={DatePreposition}\s+)({StrictRelativeRegex}\s+)?({DayPrefix}\s+)?{DayRegex}[\\\-]{MonthNumRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\b"; public static readonly string DateExtractor9L = $@"\b({DayPrefix}(\s*,)?\s+)?{DayRegex}\s*/\s*{MonthNumRegex}{DateExtractorYearTermRegex}(?![%])\b"; public static readonly string DateExtractor9S = $@"\b({DayPrefix}(\s*,)?\s+)?{DayRegex}\s*/\s*{MonthNumRegex}{BaseDateTime.CheckDecimalRegex}(?![%])\b"; @@ -160,7 +160,7 @@ public static class DateTimeDefinitions public const string LunchRegex = @"\blunchtime\b"; public const string NightRegex = @"\b(mid)?night\b"; public const string CommonDatePrefixRegex = @"^[\.]"; - public static readonly string LessThanOneHour = $@"(?(a\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\s+(minutes?|mins?))|{DeltaMinuteNumRegex}(\s+(minutes?|mins?)))"; + public static readonly string LessThanOneHour = $@"(?(a\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\s+(minutes?|mins?)|(?=\s+past))|{DeltaMinuteNumRegex}(\s+(minutes?|mins?)|(?=\s+past)))"; public static readonly string WrittenTimeRegex = $@"(?{HourNumRegex}\s+{MinuteNumRegex}(\s+(minutes?|mins?))?)"; public static readonly string TimePrefix = $@"(?{LessThanOneHour}\s+(past|to))"; public static readonly string TimeSuffix = $@"(?{AmRegex}|{PmRegex}|{OclockRegex})"; @@ -924,4 +924,4 @@ public static class DateTimeDefinitions public const string QuarterTypeRegex = @"(quarter(s|ly)?)$"; public const string YearTypeRegex = @"((years?|annual)(ly)?)$"; } -} \ No newline at end of file +} diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/German/DateTimeDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/German/DateTimeDefinitions.cs index b9ba8e743c..84a952d576 100644 --- a/.NET/Microsoft.Recognizers.Definitions.Common/German/DateTimeDefinitions.cs +++ b/.NET/Microsoft.Recognizers.Definitions.Common/German/DateTimeDefinitions.cs @@ -65,7 +65,7 @@ public static class DateTimeDefinitions public static readonly string MonthFrontSimpleCasesRegex = $@"((vom|zwischen)\s*)?{MonthSuffixRegex}\s*((vom|zwischen)\s*)?({DayRegex})\s*{TillRegex}\s*({DayRegex})((\s+|\s*,\s*){YearRegex})?"; public static readonly string MonthFrontBetweenRegex = $@"({MonthSuffixRegex}\s+(zwischen\s+)({DayRegex})\s*{RangeConnectorRegex}\s*({DayRegex})((\s+|\s*,\s*){YearRegex})?)"; public static readonly string BetweenRegex = $@"((zwischen\s+)({DayRegex})(\s+{MonthSuffixRegex})?\s*{RangeConnectorRegex}\s*({DayRegex})(\s+{MonthSuffixRegex})((\s+|\s*,\s*){YearRegex})?|(zwischen\s+)({DayRegex})(\s+{MonthSuffixRegex})?\s*{RangeConnectorRegex}\s*({DayRegex})(\s+{MonthSuffixRegex})?((\s+|\s*,\s*){YearRegex})?)"; - public static readonly string MonthWithYear = $@"\b((?apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|januar|j[äa]n(ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.))(\s*),?(\s+des)?(\s*)({YearRegex}|(?nächste[mn]|letzte[mn]|diese(s|n))\s+jahres))"; + public static readonly string MonthWithYear = $@"\b((?apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|januar|j[äa]n(ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.))(\s*),?(\s+des)?(\s*)({YearRegex}|{TwoDigitYearRegex}|(?nächste[mn]|letzte[mn]|diese(s|n))\s+jahres))"; public static readonly string OneWordPeriodRegex = $@"\b((((im\s+)?monat\s+)?({RelativeRegex}\s*(jahr\s*(im\s*)?)?)?(?apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|j[äa]n(uar|ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.)))|(?unter\s+der\s+woche)|({RelativeRegex}\s+)?((?werktags|arbeitswoche)|woche(nende)?|monat(s)?|jahr|jahres)(?!(\s+\d+(?!({BaseDateTime.BaseAmDescRegex}|{BaseDateTime.BasePmDescRegex}))|\s+bis\s+heute)))\b"; public static readonly string MonthNumWithYear = $@"({YearRegex}(\s*)[/\-\.](\s*){MonthNumRegex})|({MonthNumRegex}(\s*)[/\-\.](\s*){YearRegex})"; public static readonly string WeekOfMonthRegex = $@"(?((die|der)\s+)(?erste[rns]?|1\.|zweite[rns]?|2\.|dritte[rns]?|3\.|vierte[rns]?|4\.|fünfte[rns]?|5\.|letzte[rmns]?)\s+woche\s+(des|diese(s|n)|im)\s+({MonthSuffixRegex}|monat(s)?))"; @@ -98,13 +98,13 @@ public static class DateTimeDefinitions public static readonly string WeekDayOfMonthRegex = $@"\b(?((an( dem)?|de[rs]|am)\s+)?(?erste[rns]?|1\.|zweite[rns]?|2\.|dritte[rns]?|3\.|vierte[rns]?|4\.|fünfte[rns]?|5\.|letzte[rmns]?)\s+{WeekDayRegex}\s+{MonthSuffixRegex})\b"; public static readonly string RelativeWeekDayRegex = $@"\b({WrittenNumRegex}\s+{WeekDayRegex}e\s+(von\s+jetzt|später))\b"; public static readonly string SpecialDate = $@"(?=\b(an( dem)?|am)\s+){DayRegex}\b"; - public static readonly string DateExtractor1 = $@"\b(({WeekDayRegex})(\s+|\s*,\s*))?({DayRegex}\s*[/\\.,\- ]\s*{MonthRegex}(\s*[/\\.,\- ]\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\s*[/\\.,\- ]\s*{DayRegex}\s*[/\\.,\- ]\s*{MonthRegex})\b"; + public static readonly string DateExtractor1 = $@"\b(({WeekDayRegex})(\s+|\s*,\s*))?({DayRegex}\s*[/\\.,\- ]\s*({MonthNumRegex}|{MonthRegex})(\s*[/\\.,\- ]\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\s*[/\\.,\- ]\s*{DayRegex}\s*[/\\.,\- ]\s*{MonthRegex})\b"; public static readonly string DateExtractor2 = $@"\b({MonthRegex}\s*[/\\.,\- ]\s*{DayRegex}(?!\s*\-\s*\d{{2}}\b)(\s*[/\\.,\- ]\s*{DateYearRegex})?)\b"; public static readonly string DateExtractor3 = $@"\b({DayRegex}{MonthRegex})"; public static readonly string DateExtractor4 = $@"\b({DayRegex}\s*{MonthNumRegex}\s*{DateYearRegex})\b"; public static readonly string DateExtractor5 = $@"\b(({WeekDayRegex})(\s+|\s*,\s*))?({DayRegex}\s*[/\\\-\.]\s*({MonthNumRegex}|{MonthRegex})\s*[/\\\-\.]\s*{DateYearRegex})\b(?!\s*[/\\\-\.]\s*\d+)"; public static readonly string DateExtractor6 = $@"^[.]"; - public static readonly string DateExtractor7 = $@"({DayRegex}\s*[\.]\s*{MonthNumRegex}[\.]){BaseDateTime.CheckDecimalRegex}"; + public static readonly string DateExtractor7 = $@"\b({DayRegex}\s*[\.]\s*{MonthNumRegex}[\.]){BaseDateTime.CheckDecimalRegex}"; public static readonly string DateExtractor8 = $@"(?<=\b(am)\s+){DayRegex}[/\\\.]{MonthNumRegex}([/\\\.]{DateYearRegex})?{BaseDateTime.CheckDecimalRegex}\b"; public static readonly string DateExtractor9 = $@"\b({DayRegex}\s*/\s*{MonthNumRegex}((\s+|\s*,\s*){DateYearRegex})?){BaseDateTime.CheckDecimalRegex}\b"; public static readonly string DateExtractor10 = $@"^[.]"; @@ -125,7 +125,7 @@ public static class DateTimeDefinitions public const string NightRegex = @"\b(mitternacht|(nachts?|primetime|abends?))\b"; public const string AmPmPrefixRegex = @"\b((((um|gegen)\s*)?(?(((?am morgen)|((früh|spät)\s*)?morgens|früh|(vor|nach)mittags?)|(?((früh|spät)\s*)?(nachmittags?|abends?)|mitternachts?))|(in der\s*)?(?nachts?)))\s*(um|gegen|von)\s*)"; public const string CommonDatePrefixRegex = @"^[\.]"; - public static readonly string LessThanOneHour = $@"\b(?(ein(er?)?\s+)?((drei)?viertel|halb(en?)?)(\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\s+(min(uten?)?))|{DeltaMinuteNumRegex}(\s+(min(uten?)?))"; + public static readonly string LessThanOneHour = $@"\b(?(ein(er?)?\s+)?((drei)?viertel|halb(en?)?)(\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\s+(min(uten?)?)|(?=\s+(nach|vor)))|{DeltaMinuteNumRegex}(\s+(min(uten?)?)|(?=\s+(nach|vor)))"; public static readonly string WrittenTimeRegex = $@"(um\s*)?(?{HourNumRegex}(\s*{OclockRegex}\s*)({MinuteNumRegex}|{MinuteNumRegex}und(?zwanzig|dreißig|vierzig|fünfzig)))"; public static readonly string TimePrefix = $@"(?({LessThanOneHour})(\s*(vor(\W)?|nach(\W)?))?)"; public static readonly string TimeSuffix = $@"(?{AmRegex}|{PmRegex}|{OclockRegex})"; @@ -936,4 +936,4 @@ public static class DateTimeDefinitions @"year to date" }; } -} \ No newline at end of file +} diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/Italian/DateTimeDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/Italian/DateTimeDefinitions.cs index 0cbbea1377..10965ad176 100644 --- a/.NET/Microsoft.Recognizers.Definitions.Common/Italian/DateTimeDefinitions.cs +++ b/.NET/Microsoft.Recognizers.Definitions.Common/Italian/DateTimeDefinitions.cs @@ -74,7 +74,7 @@ public static class DateTimeDefinitions public static readonly string MonthFrontBetweenRegex = $@"\b{MonthSuffixRegex}\s+([tf]ra\s+)({DayRegex})\s*{RangeConnectorRegex}\s*({DayRegex})((\s+|\s*,\s*){YearRegex})?\b"; public static readonly string BetweenRegex = $@"\b([tf]ra\s+)({DayRegex})\s*{RangeConnectorRegex}\s*({DayRegex})\s+{MonthSuffixRegex}((\s+|\s*,\s*){YearRegex})?\b"; public const string YearWordRegex = @"\b(?l'anno)\b"; - public static readonly string MonthWithYear = $@"\b({MonthRegex}(\.)?(\s*)[/\\\-\.,]?(((\s+del)?\s+{YearRegex})|((\s+(del|di|il))?\s+(?prossim['o]|passato|quest['o])\s*anno)|((\s+(del)?l')anno\s+(?prossimo|passato))))"; + public static readonly string MonthWithYear = $@"\b({MonthRegex}(\.)?(\s*)[/\\\-\.,]?(((\s+del)?\s+{YearRegex}|{TwoDigitYearRegex})|((\s+(del|di|il))?\s+(?prossim['o]|passato|quest['o])\s*anno)|((\s+(del)?l')anno\s+(?prossimo|passato))))"; public const string SpecialYearPrefixes = @"(?fiscale|scolastico)"; public static readonly string OneWordPeriodRegex = $@"\b((((il|l[o'])\s*)?((mese di\s+)|({RelativeRegex}\s*))?{MonthRegex}(\s+{RelativeRegex})?)|dall'inizio\s+del(l')\s*(mese|anno)|({RelativeRegex}\s*)?(mi[ao]\s+)?(weekend|finesettimana|settimana|mese|anno)(\s+{RelativeRegex})?(?!((\s+di|del)?\s+\d+))(\s+{AfterNextSuffixRegex})?)\b"; public static readonly string MonthNumWithYear = $@"({YearRegex}[/\-\.]{MonthNumRegex})|({MonthNumRegex}[/\-]{YearRegex})"; @@ -139,9 +139,9 @@ public static class DateTimeDefinitions public const string AmRegex = @"\b(?((((la|alla|verso|per|della|di|in)\s+(la\s+)?)?(mattinata|mattina))|(((il|al|verso|per|del|di)\s+(il\s+)?)?(mattino))))\b"; public const string LunchRegex = @"\b(ora di pranzo)\b"; public const string NightRegex = @"\b(mezzanotte|notte)\b"; - public static readonly string LessThanOneHour = $@"(?(un\s+quarto|tre quarti?|mezz[oa]|mezz'ora|{BaseDateTime.DeltaMinuteRegex}(\s+(minut[oi]|min))?|{DeltaMinuteNumRegex}(\s+(minut[oi]|min))|(?<=(e|meno)\s+){DeltaMinuteNumRegex}))"; + public static readonly string LessThanOneHour = $@"(?(un\s+quarto|tre quarti?|mezz[oa]|mezz'ora|{BaseDateTime.DeltaMinuteRegex}|{DeltaMinuteNumRegex}))"; public static readonly string EngTimeRegex = $@"(?{HourNumRegex}\s+e\s+({MinuteNumRegex}|(?venti?|trenta?|quaranta?|cinquanta?){MinuteNumRegex}))"; - public static readonly string TimePrefix = $@"(?(e\s+{LessThanOneHour}|{LessThanOneHour}\s+(minut[oi]|min)\s+all[e']|meno {LessThanOneHour}))"; + public static readonly string TimePrefix = $@"(?((e|meno)\s+{LessThanOneHour}(\s+(minut[oi]|min))?|{LessThanOneHour}\s+(minut[oi]|min)\s+all[e']))"; public static readonly string TimeSuffix = $@"(?{AmRegex}|{PmRegex}|{OclockRegex})"; public static readonly string BasicTime = $@"\b(?{EngTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}:{BaseDateTime.MinuteRegex}(:{BaseDateTime.SecondRegex})?|{BaseDateTime.HourRegex})"; public const string MidnightRegex = @"(?mezzanotte|mezza notte)"; diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/Italian/NumbersWithUnitDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/Italian/NumbersWithUnitDefinitions.cs index 0180f11a4b..97a1c75e26 100644 --- a/.NET/Microsoft.Recognizers.Definitions.Common/Italian/NumbersWithUnitDefinitions.cs +++ b/.NET/Microsoft.Recognizers.Definitions.Common/Italian/NumbersWithUnitDefinitions.cs @@ -565,7 +565,7 @@ public static class NumbersWithUnitDefinitions public const string CompoundUnitConnectorRegex = @"(?e)"; public static readonly Dictionary CurrencyPrefixList = new Dictionary { - { @"Dollar", @"$" }, + { @"Dollar", @"$|dollari" }, { @"United States dollar", @"$ stati uniti|us$|us $|u.s. $|u.s $" }, { @"East Caribbean dollar", @"east caribbean $" }, { @"Australian dollar", @"$ australiano|$ australia" }, diff --git a/.NET/Microsoft.Recognizers.Text.DateTime/German/Parsers/GermanTimeParserConfiguration.cs b/.NET/Microsoft.Recognizers.Text.DateTime/German/Parsers/GermanTimeParserConfiguration.cs index 548ef108ae..737300552c 100644 --- a/.NET/Microsoft.Recognizers.Text.DateTime/German/Parsers/GermanTimeParserConfiguration.cs +++ b/.NET/Microsoft.Recognizers.Text.DateTime/German/Parsers/GermanTimeParserConfiguration.cs @@ -105,13 +105,13 @@ public void AdjustByPrefix(string prefix, ref int hour, ref int min, ref bool ha minStr = match.Groups["deltaminnum"].Value; deltaMin = Numbers[minStr]; } - } - // @TODO move hardcoded values to resources file + // @TODO move hardcoded values to resources file - if (trimmedPrefix.EndsWith("zum", StringComparison.Ordinal)) - { - deltaMin = -deltaMin; + if (trimmedPrefix.EndsWith("vor", StringComparison.Ordinal)) + { + deltaMin = -deltaMin; + } } min += deltaMin; diff --git a/.NET/Microsoft.Recognizers.Text.DateTime/Italian/Parsers/ItalianTimeParserConfiguration.cs b/.NET/Microsoft.Recognizers.Text.DateTime/Italian/Parsers/ItalianTimeParserConfiguration.cs index 07558ac58f..2cef97b99a 100644 --- a/.NET/Microsoft.Recognizers.Text.DateTime/Italian/Parsers/ItalianTimeParserConfiguration.cs +++ b/.NET/Microsoft.Recognizers.Text.DateTime/Italian/Parsers/ItalianTimeParserConfiguration.cs @@ -81,7 +81,8 @@ public void AdjustByPrefix(string prefix, ref int hour, ref int min, ref bool ha } // 'to' i.e 'one to five' - if (trimmedPrefix.StartsWith("meno", StringComparison.Ordinal)) + if (trimmedPrefix.StartsWith("meno", StringComparison.Ordinal) || + trimmedPrefix.EndsWith("alle", StringComparison.Ordinal)) { deltaMin = -deltaMin; } diff --git a/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/german/parsers/GermanTimeParserConfiguration.java b/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/german/parsers/GermanTimeParserConfiguration.java index 1479a0d811..715b03e0ff 100644 --- a/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/german/parsers/GermanTimeParserConfiguration.java +++ b/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/german/parsers/GermanTimeParserConfiguration.java @@ -109,10 +109,9 @@ public PrefixAdjustResult adjustByPrefix(String prefix, int hour, int min, boole minStr = match.get().getGroup("deltaminnum").value; deltaMin = numbers.getOrDefault(minStr, 0); } - } - - if (trimmedPrefix.endsWith("zum")) { - deltaMin = -deltaMin; + if (trimmedPrefix.endsWith("vor")) { + deltaMin = -deltaMin; + } } min += deltaMin; diff --git a/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/EnglishDateTime.java b/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/EnglishDateTime.java index 73e6caebbf..efb52516bb 100644 --- a/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/EnglishDateTime.java +++ b/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/EnglishDateTime.java @@ -412,13 +412,13 @@ public class EnglishDateTime { .replace("{StrictRelativeRegex}", StrictRelativeRegex) .replace("{BaseDateTime.CheckDecimalRegex}", BaseDateTime.CheckDecimalRegex); - public static final String DateExtractor7L = "\\b({DayPrefix}(\\s*,)?\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\\b" + public static final String DateExtractor7L = "\\b({DayPrefix}(\\s*,)?\\s+)?(the\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\\b" .replace("{MonthNumRegex}", MonthNumRegex) .replace("{DayRegex}", DayRegex) .replace("{DayPrefix}", DayPrefix) .replace("{DateExtractorYearTermRegex}", DateExtractorYearTermRegex); - public static final String DateExtractor7S = "\\b({DayPrefix}(\\s*,)?\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\\b" + public static final String DateExtractor7S = "\\b({DayPrefix}(\\s*,)?\\s+)?(the\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\\b" .replace("{MonthNumRegex}", MonthNumRegex) .replace("{DayRegex}", DayRegex) .replace("{DayPrefix}", DayPrefix) @@ -486,7 +486,7 @@ public class EnglishDateTime { public static final String CommonDatePrefixRegex = "^[\\.]"; - public static final String LessThanOneHour = "(?(a\\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\\s+(minutes?|mins?))|{DeltaMinuteNumRegex}(\\s+(minutes?|mins?)))" + public static final String LessThanOneHour = "(?(a\\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\\s+(minutes?|mins?)|(?=\\s+past))|{DeltaMinuteNumRegex}(\\s+(minutes?|mins?)|(?=\\s+past)))" .replace("{BaseDateTime.DeltaMinuteRegex}", BaseDateTime.DeltaMinuteRegex) .replace("{DeltaMinuteNumRegex}", DeltaMinuteNumRegex); diff --git a/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/GermanDateTime.java b/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/GermanDateTime.java index beae66f3eb..580ed8fafa 100644 --- a/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/GermanDateTime.java +++ b/Java/libraries/recognizers-text-date-time/src/main/java/com/microsoft/recognizers/text/datetime/resources/GermanDateTime.java @@ -244,7 +244,7 @@ public class GermanDateTime { public static final String SpecialDate = "(?=\\b(an( dem)?|am)\\s+){DayRegex}\\b" .replace("{DayRegex}", DayRegex); - public static final String DateExtractor1 = "\\b(({WeekDayRegex})(\\s+|\\s*,\\s*))?({DayRegex}\\s*[/\\\\.,\\- ]\\s*{MonthRegex}(\\s*[/\\\\.,\\- ]\\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\\s*[/\\\\.,\\- ]\\s*{DayRegex}\\s*[/\\\\.,\\- ]\\s*{MonthRegex})\\b" + public static final String DateExtractor1 = "\\b(({WeekDayRegex})(\\s+|\\s*,\\s*))?({DayRegex}\\s*[/\\\\.,\\- ]\\s*({MonthNumRegex}|{MonthRegex})(\\s*[/\\\\.,\\- ]\\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\\s*[/\\\\.,\\- ]\\s*{DayRegex}\\s*[/\\\\.,\\- ]\\s*{MonthRegex})\\b" .replace("{WeekDayRegex}", WeekDayRegex) .replace("{MonthRegex}", MonthRegex) .replace("{DayRegex}", DayRegex) @@ -276,7 +276,7 @@ public class GermanDateTime { public static final String DateExtractor6 = "^[.]" .replace("{WeekDayRegex}", WeekDayRegex); - public static final String DateExtractor7 = "({DayRegex}\\s*[\\.]\\s*{MonthNumRegex}[\\.]){BaseDateTime.CheckDecimalRegex}" + public static final String DateExtractor7 = "\\b({DayRegex}\\s*[\\.]\\s*{MonthNumRegex}[\\.]){BaseDateTime.CheckDecimalRegex}" .replace("{MonthNumRegex}", MonthNumRegex) .replace("{DayRegex}", DayRegex) .replace("{BaseDateTime.CheckDecimalRegex}", BaseDateTime.CheckDecimalRegex); @@ -348,7 +348,7 @@ public class GermanDateTime { public static final String CommonDatePrefixRegex = "^[\\.]"; - public static final String LessThanOneHour = "\\b(?(ein(er?)?\\s+)?((drei)?viertel|halb(en?)?)(\\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\\s+(min(uten?)?))|{DeltaMinuteNumRegex}(\\s+(min(uten?)?))" + public static final String LessThanOneHour = "\\b(?(ein(er?)?\\s+)?((drei)?viertel|halb(en?)?)(\\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\\s+(min(uten?)?)|(?=\\s+(nach|vor)))|{DeltaMinuteNumRegex}(\\s+(min(uten?)?)|(?=\\s+(nach|vor)))" .replace("{BaseDateTime.DeltaMinuteRegex}", BaseDateTime.DeltaMinuteRegex) .replace("{DeltaMinuteNumRegex}", DeltaMinuteNumRegex); diff --git a/JavaScript/packages/recognizers-date-time/src/resources/englishDateTime.ts b/JavaScript/packages/recognizers-date-time/src/resources/englishDateTime.ts index d9d34ee07e..116f4ee322 100644 --- a/JavaScript/packages/recognizers-date-time/src/resources/englishDateTime.ts +++ b/JavaScript/packages/recognizers-date-time/src/resources/englishDateTime.ts @@ -129,8 +129,8 @@ export namespace EnglishDateTime { export const DateExtractor4 = `\\b${MonthNumRegex}\\s*[/\\\\\\-]\\s*${DayRegex}[\\.]?\\s*[/\\\\\\-]\\s*${DateYearRegex}`; export const DateExtractor5 = `\\b(${DayPrefix}(\\s*,)?\\s+)?${DayRegex}\\s*[/\\\\\\-\\.]\\s*(${MonthNumRegex}|${MonthRegex})\\s*[/\\\\\\-\\.]\\s*${DateYearRegex}(?!\\s*[/\\\\\\-\\.]\\s*\\d+)`; export const DateExtractor6 = `(?<=${DatePreposition}\\s+)(${StrictRelativeRegex}\\s+)?(${DayPrefix}\\s+)?${MonthNumRegex}[\\-\\.]${DayRegex}(?![%])${BaseDateTime.CheckDecimalRegex}\\b`; - export const DateExtractor7L = `\\b(${DayPrefix}(\\s*,)?\\s+)?${MonthNumRegex}\\s*/\\s*${DayRegex}${DateExtractorYearTermRegex}(?![%])\\b`; - export const DateExtractor7S = `\\b(${DayPrefix}(\\s*,)?\\s+)?${MonthNumRegex}\\s*/\\s*${DayRegex}(?![%])${BaseDateTime.CheckDecimalRegex}\\b`; + export const DateExtractor7L = `\\b(${DayPrefix}(\\s*,)?\\s+)?(the\\s+)?${MonthNumRegex}\\s*/\\s*${DayRegex}${DateExtractorYearTermRegex}(?![%])\\b`; + export const DateExtractor7S = `\\b(${DayPrefix}(\\s*,)?\\s+)?(the\\s+)?${MonthNumRegex}\\s*/\\s*${DayRegex}(?![%])${BaseDateTime.CheckDecimalRegex}\\b`; export const DateExtractor8 = `(?<=${DatePreposition}\\s+)(${StrictRelativeRegex}\\s+)?(${DayPrefix}\\s+)?${DayRegex}[\\\\\\-]${MonthNumRegex}(?![%])${BaseDateTime.CheckDecimalRegex}\\b`; export const DateExtractor9L = `\\b(${DayPrefix}(\\s*,)?\\s+)?${DayRegex}\\s*/\\s*${MonthNumRegex}${DateExtractorYearTermRegex}(?![%])\\b`; export const DateExtractor9S = `\\b(${DayPrefix}(\\s*,)?\\s+)?${DayRegex}\\s*/\\s*${MonthNumRegex}${BaseDateTime.CheckDecimalRegex}(?![%])\\b`; @@ -150,7 +150,7 @@ export namespace EnglishDateTime { export const LunchRegex = `\\blunchtime\\b`; export const NightRegex = `\\b(mid)?night\\b`; export const CommonDatePrefixRegex = `^[\\.]`; - export const LessThanOneHour = `(?(a\\s+)?quarter|three quarter(s)?|half( an hour)?|${BaseDateTime.DeltaMinuteRegex}(\\s+(minutes?|mins?))|${DeltaMinuteNumRegex}(\\s+(minutes?|mins?)))`; + export const LessThanOneHour = `(?(a\\s+)?quarter|three quarter(s)?|half( an hour)?|${BaseDateTime.DeltaMinuteRegex}(\\s+(minutes?|mins?)|(?=\\s+past))|${DeltaMinuteNumRegex}(\\s+(minutes?|mins?)|(?=\\s+past)))`; export const WrittenTimeRegex = `(?${HourNumRegex}\\s+${MinuteNumRegex}(\\s+(minutes?|mins?))?)`; export const TimePrefix = `(?${LessThanOneHour}\\s+(past|to))`; export const TimeSuffix = `(?${AmRegex}|${PmRegex}|${OclockRegex})`; diff --git a/JavaScript/packages/recognizers-number-with-unit/package-lock.json b/JavaScript/packages/recognizers-number-with-unit/package-lock.json index 53404db853..db6c21ea99 100644 --- a/JavaScript/packages/recognizers-number-with-unit/package-lock.json +++ b/JavaScript/packages/recognizers-number-with-unit/package-lock.json @@ -1,22 +1,128 @@ { - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" - }, - "lodash.last": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", - "integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw=" - }, - "lodash.max": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz", - "integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o=" - } - }, - "version": "1.3.0" -} \ No newline at end of file + "name": "@microsoft/recognizers-text-number-with-unit", + "version": "1.3.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@microsoft/recognizers-text-number-with-unit", + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "@microsoft/recognizers-text-number": "~1.3.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.last": "^3.0.0", + "lodash.max": "^4.0.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text": { + "version": "1.3.0", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/@microsoft/recognizers-text/-/recognizers-text-1.3.0.tgz", + "integrity": "sha512-0gUhtS/0qSF6veB3Olu55IuJ0Skwg4u1IbJX9KFj1QeK8z6cw69/p637IPD2NgXLlXCy2HEqLvUW/mgbDp3rWg==", + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/@microsoft/recognizers-text-number": { + "version": "1.3.0", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/@microsoft/recognizers-text-number/-/recognizers-text-number-1.3.0.tgz", + "integrity": "sha512-KVFxvaXW9E7UkuF0EYCghvCn0u+N5L7bBXeP4IKB6fXkQd6GAZ9zNA2Acdm9lJzCRxcsBYFbRLcRMrPHwAa32w==", + "dependencies": { + "@microsoft/recognizers-text": "~1.3.0", + "bignumber.js": "^7.2.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.sortby": "^4.7.0", + "lodash.trimend": "^4.5.1" + }, + "engines": { + "node": ">=10.3.0" + } + }, + "node_modules/bignumber.js": { + "version": "7.2.1", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "engines": { + "node": "*" + } + }, + "node_modules/lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + }, + "node_modules/lodash.last": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", + "integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw=" + }, + "node_modules/lodash.max": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz", + "integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o=" + }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" + }, + "node_modules/lodash.trimend": { + "version": "4.5.1", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/lodash.trimend/-/lodash.trimend-4.5.1.tgz", + "integrity": "sha512-lsD+k73XztDsMBKPKvzHXRKFNMohTjoTKIIo4ADLn5dA65LZ1BqlAvSXhR2rPEC3BgAUQnzMnorqDtqn2z4IHA==" + } + }, + "dependencies": { + "@microsoft/recognizers-text": { + "version": "1.3.0", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/@microsoft/recognizers-text/-/recognizers-text-1.3.0.tgz", + "integrity": "sha512-0gUhtS/0qSF6veB3Olu55IuJ0Skwg4u1IbJX9KFj1QeK8z6cw69/p637IPD2NgXLlXCy2HEqLvUW/mgbDp3rWg==" + }, + "@microsoft/recognizers-text-number": { + "version": "1.3.0", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/@microsoft/recognizers-text-number/-/recognizers-text-number-1.3.0.tgz", + "integrity": "sha512-KVFxvaXW9E7UkuF0EYCghvCn0u+N5L7bBXeP4IKB6fXkQd6GAZ9zNA2Acdm9lJzCRxcsBYFbRLcRMrPHwAa32w==", + "requires": { + "@microsoft/recognizers-text": "~1.3.0", + "bignumber.js": "^7.2.1", + "lodash.escaperegexp": "^4.1.2", + "lodash.sortby": "^4.7.0", + "lodash.trimend": "^4.5.1" + } + }, + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" + }, + "lodash.escaperegexp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", + "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + }, + "lodash.last": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash.last/-/lodash.last-3.0.0.tgz", + "integrity": "sha1-JC9mMRLdTG5jcoxgo8kJ0b2tvUw=" + }, + "lodash.max": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.max/-/lodash.max-4.0.1.tgz", + "integrity": "sha1-hzVWbGGLNan3YFILSHrnllivE2o=" + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==" + }, + "lodash.trimend": { + "version": "4.5.1", + "resolved": "https://purecloud.jfrog.io/purecloud/api/npm/inin-internal-npm/lodash.trimend/-/lodash.trimend-4.5.1.tgz", + "integrity": "sha512-lsD+k73XztDsMBKPKvzHXRKFNMohTjoTKIIo4ADLn5dA65LZ1BqlAvSXhR2rPEC3BgAUQnzMnorqDtqn2z4IHA==" + } + } +} diff --git a/Patterns/Arabic/Arabic-DateTime.yaml b/Patterns/Arabic/Arabic-DateTime.yaml index cdadf97ccc..0d7eae59bb 100644 --- a/Patterns/Arabic/Arabic-DateTime.yaml +++ b/Patterns/Arabic/Arabic-DateTime.yaml @@ -81,7 +81,7 @@ OclockRegex: !simpleRegex SpecialDescRegex: !simpleRegex def: ((?)p\b) AmDescRegex: !nestedRegex - def: (في\s)?(صباح(ا)?|صباحًا|الصباح|{BaseDateTime.BaseAmDescRegex}) + def: (في\s)?(صباح(ا)?|صباحًا|ص|الصباح|{BaseDateTime.BaseAmDescRegex}) references: [BaseDateTime.BaseAmDescRegex] PmDescRegex: !nestedRegex def: (في\s)?((ال)?مساء|مساءً|ليلًا|ليلا|(ال)?ليل(ة)?|بعد الظهر|الظهر|ظهرا|{BaseDateTime.BasePmDescRegex}) @@ -90,7 +90,7 @@ AmPmDescRegex: !nestedRegex def: (في\s)?(صباح(ا)?|صباحًا|الصباح|(ال)?مساء|مساءً|{BaseDateTime.BaseAmPmDescRegex}) references: [BaseDateTime.BaseAmPmDescRegex] DescRegex: !nestedRegex - def: (:?(:?({OclockRegex}\s+)?(?({AmPmDescRegex}|{AmDescRegex}|{PmDescRegex}|{SpecialDescRegex})))|{OclockRegex}) + def: (?:(?:({OclockRegex}\s+)?(?({AmPmDescRegex}|{AmDescRegex}|{PmDescRegex}|{SpecialDescRegex})))|{OclockRegex}) references: [ OclockRegex, AmDescRegex, PmDescRegex, AmPmDescRegex, SpecialDescRegex ] OfPrepositionRegex: !simpleRegex def: (\bof\b) @@ -139,6 +139,12 @@ BetweenTokenRegex: !simpleRegex def: \b(between(\s+the)?)$ OrdinalNumberRegex: !simpleRegex def: ((ال)?حادي عشر|ل(ال)?ثاني عشر|(ال)?ثالث عشر|(ال)?رابع عشر|(ال)?خامس عشر|(ال)?خمسة عشر|(ال)?سادس عشر|(ال)?سابع عشر|(ال)?ثامن عشر|(ال)?تاسع عشر|(ال)?عشرون|(ال)?عشرين|(ال)?حادي والعشرون|(ال)?حادية والعشرين|(ال)?حادي والعشرين|(ال)?ثاني والعشرون|(ال)?ثانية والعشرين|(ال)?ثالث والعشرون|(ال)?رابع والعشرون|(ال)?خامس والعشرون|(ال)?سادس والعشرون|(ال)?تاسع والعشرون|(ال)?سابع والعشرون|(ال)?رابع والعشرون|الثامن|الأول|الثالث|الرابع|الخامس|السادس|الثاني|العاشر|السابع) +SolarMonthRegex: !simpleRegex + def: (?يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر) +LunarMonthRegex: !simpleRegex + def: (?محرم|صفر|ربيع الأول|ربيع الثاني|جمادى الأول|جمادى الثاني|رجب|شعبان|رمضان|شوال|ذو القعدة|ذو الحجة) +ArabicMonthRegex: !simpleRegex + def: (?كانون الثاني|شباط|آذار|نيسان|حزيران|تموز|آب|أيلول|تشرين الأول|تشرين الثاني|كانون الأول|أيار) SimpleCasePreMonthRegex: !nestedRegex def: ((بين|من)\s+)(({DayRegex}-{DayRegex})\s+)((من|في)\s+)?((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\s+)({RelativeRegex})?({YearRegex})? references: [ DayRegex, SolarMonthRegex, LunarMonthRegex, ArabicMonthRegex, RelativeRegex, YearRegex ] @@ -159,6 +165,8 @@ MonthWithYear: !nestedRegex references: [ SolarMonthRegex, LunarMonthRegex, ArabicMonthRegex, YearRegex, RelativeRegex ] SpecialYearPrefixes: !simpleRegex def: (التقويمي(ة)?|(?المالي(ة)?|الدراسي(ة)?)) +ArabicWeekRegex: !simpleRegex + def: (?الأسبوعين|الاسبوعين|أسابيع|الاسبوع|الأسبوع|الإسبوع|أسبوعين|أسبوعي|اسبوعين|اسبوعي|أسبوع|الاسابيع|الأسابيع) OneWordPeriodRegex: !nestedRegex def: ((بعد|في|آخر)\s+(\d+\s+)?((ال)?سنوات|(ال)?أعوام|(ال)?سنين|(ال)?أسابيع|(ال)?أشهر|(ال)?أيام))(\s+\d+)?(\s+{FutureSuffixRegex})?|((هذا\s+)?(شهر\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})(\s+{RelativeRegex})?)|((هذا\s+)?((عطلة|خلال)\s+)?((نهاية\s+)?({ArabicWeekRegex}|العام)\s*)((بعد\s+)?{RelativeRegex})?) references: [ FutureSuffixRegex, SolarMonthRegex, LunarMonthRegex, ArabicMonthRegex, RelativeRegex, ArabicWeekRegex] @@ -231,12 +239,6 @@ WeekOfRegex: !simpleRegex def: (the\s+)?((week)(\s+(of|(commencing|starting|beginning)(\s+on)?))|w/c)(\s+the)? MonthOfRegex: !simpleRegex def: (من)(\s*)(شهر) -SolarMonthRegex: !simpleRegex - def: (?يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر) -LunarMonthRegex: !simpleRegex - def: (?محرم|صفر|ربيع الأول|ربيع الثاني|جمادى الأول|جمادى الثاني|رجب|شعبان|رمضان|شوال|ذو القعدة|ذو الحجة) -ArabicMonthRegex: !simpleRegex - def: (?كانون الثاني|شباط|آذار|نيسان|حزيران|تموز|آب|أيلول|تشرين الأول|تشرين الثاني|كانون الأول|أيار) MonthRegex: !nestedRegex def: (?{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex}) references: [ SolarMonthRegex, LunarMonthRegex, ArabicMonthRegex ] @@ -260,8 +262,6 @@ RelaxedOnRegex: !nestedRegex references: [ OrdinalDayOfMonthRegex, WeekDayofMonthRegex ] PrefixWeekDayRegex: !simpleRegex def: (\s*((,?\s*on)|[-—–])) -ArabicWeekRegex: !simpleRegex - def: (?الأسبوعين|الاسبوعين|أسابيع|الاسبوع|الأسبوع|الإسبوع|أسبوعين|أسبوعي|اسبوعين|اسبوعي|أسبوع|الاسابيع|الأسابيع) ThisRegex: !nestedRegex def: (?=يوم\s+)?({WeekDayRegex})(\s+)?(من|هذا|)(\s+)?(هذا)?(\s+)({ArabicWeekRegex})((\s+)({RelativeRegex}))? references: [ WeekDayRegex, ArabicWeekRegex, RelativeRegex ] @@ -279,8 +279,6 @@ SpecificDayRegex: !nestedRegex LastDateRegex: !nestedRegex def: ({LastDayDateRegex}|{LastWeekDateRegex}) references: [ LastDayDateRegex, LastWeekDateRegex, ] -NextRegex: !simpleRegex - def: (\s+)?(الآتي|الأخير|التالي|القادم|من الآن|الحالي|المقبل|الحاضر) NextDayRegex: !nestedRegex def: (هذا يوم\s+|بعد\s+)?(?=(ال)?يوم\s+)?({WeekDayRegex})((\s+)({NextRegex}))? references: [ WeekDayRegex, NextRegex ] @@ -455,7 +453,7 @@ TimeRegex3: !nestedRegex def: (\b{TimePrefix}\s+)?{BaseDateTime.HourRegex}\.{BaseDateTime.MinuteRegex}(\s*{DescRegex}) references: [ TimePrefix, BaseDateTime.HourRegex, BaseDateTime.MinuteRegex, DescRegex ] TimeRegex4: !nestedRegex - def: \b({TimePrefix}\s+)?{BasicTime}(\s*{DescRegex})?\s+{TimeSuffix}(\s*{DescRegex})?\b + def: \b({TimePrefix}\s+)?{BasicTime}(\s*{DescRegex})?(\s+{TimeSuffix})?(\s*{DescRegex})?\b references: [ TimePrefix, BasicTime, DescRegex, TimeSuffix ] TimeRegex5: !nestedRegex def: \b({DescRegex}\s)?{BasicTime}((\s*{DescRegex})((\s+{TimePrefix})?)|(\s+{TimePrefix}(\s+{TimePrefix})?))(\s{DescRegex})? diff --git a/Patterns/Dutch/Dutch-DateTime.yaml b/Patterns/Dutch/Dutch-DateTime.yaml index d23f0f4407..e98ac75b31 100644 --- a/Patterns/Dutch/Dutch-DateTime.yaml +++ b/Patterns/Dutch/Dutch-DateTime.yaml @@ -4,7 +4,7 @@ LangMarker: Dut # Note: CheckBothBeforeAfter is set to true in DutchSetExtractorConfiguration CheckBothBeforeAfter: !bool false TillRegex: !nestedRegex - def: (?\b(tot(dat|\s+en\s+met)?|gedurende|tijdens|ten tijde van)\b|{BaseDateTime.RangeConnectorSymbolRegex}) + def: (?\b(tot(dat|\s+en\s+met)?|en|gedurende|tijdens|ten tijde van)\b|{BaseDateTime.RangeConnectorSymbolRegex}) references: [ BaseDateTime.RangeConnectorSymbolRegex ] RangeConnectorRegex: !nestedRegex def: (?\b(en|t/m|tot(\s+(aan|en\s+met))?)\b|{BaseDateTime.RangeConnectorSymbolRegex}) @@ -47,6 +47,10 @@ PastSuffixRegex: !simpleRegex DayRegex: !simpleRegex def: (de\s*)?(?(?:3[0-1]|[1-2]\d|0?[1-9]))(?:\s*(ste|de|e))?(?=\b|t) # 1-31 written +WrittenOneToNineRegex: !simpleRegex + def: (één|een|twee|drie|vier|vijf|zes|zeven|acht|negen) +WrittenElevenToNineteenRegex: !simpleRegex + def: (elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien) WrittenDayRegex: !nestedRegex def: (?({WrittenOneToNineRegex})|({WrittenElevenToNineteenRegex})|(({WrittenOneToNineRegex}(en|ën))?twintig)|(((één|een)(en|ën))?dertig)) references: [ WrittenOneToNineRegex, WrittenElevenToNineteenRegex ] @@ -57,10 +61,6 @@ ImplicitDayRegex: !simpleRegex def: (de\s*)?(?(3[0-1]|[0-2]?\d)(\s*(ste|de|e)))\b MonthNumRegex: !simpleRegex def: \b(?01|02|03|04|05|06|07|08|09|10|11|12|1|2|3|4|5|6|7|8|9)\b -WrittenOneToNineRegex: !simpleRegex - def: (één|een|twee|drie|vier|vijf|zes|zeven|acht|negen) -WrittenElevenToNineteenRegex: !simpleRegex - def: (elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien) WrittenTensRegex: !simpleRegex def: (tien|twintig|dertig|veertig|vijftig|zestig|zeventig|tachtig|negentig) WrittenNumRegex: !nestedRegex @@ -97,7 +97,7 @@ DescRegex: !nestedRegex def: (:?(:?({OclockRegex}\s+)?(?({AmPmDescRegex}|{AmDescRegex}|{PmDescRegex}|{SpecialDescRegex}))\.?)|{OclockRegex}) references: [ OclockRegex, AmDescRegex, PmDescRegex, AmPmDescRegex, SpecialDescRegex ] PmRegex: !nestedRegex - def: (?({ApostrofsRegex}|des)\s+(\bmiddags|avonds|nachts)|((in|tegen|op|om|met)\s+(de\s+)?)(((na)?middag|avond|(midder)?nacht|lunchtijd))|dag) + def: (?({ApostrofsRegex}|des)\s+(\bmiddags|avonds|nachts)|((in|tegen|op|om|met)\s+(de\s+)?)(((na)?middag|avond|(midder)?nacht|lunchtijd))|\s+dag) references: [ ApostrofsRegex ] PmRegexFull: !nestedRegex def: (?(({ApostrofsRegex}|des)\s+(\bmiddags|avonds|nachts)|((in|tegen|op|om|met)\s+(de\s+)?)?(((na)?middag|(?volgende?|komende?|aanstaande?|aankomende?|huidige?|vorige?|afgelopen|dit)\s+jaar) - references: [ YearRegex ] + def: ({YearRegex}|\'?{TwoDigitYearRegex}|(?volgende?|komende?|aanstaande?|aankomende?|huidige?|vorige?|afgelopen|dit)\s+jaar) + references: [ YearRegex, TwoDigitYearRegex ] MonthWithYear: !nestedRegex def: \b(({WrittenMonthRegex}(\.)?(\s*)[/\\\-\.,]?(\s+(van|over|in))?(\s*){RelativeYearRegex})|({RelativeYearRegex}(\s*),?(\s*){WrittenMonthRegex}))\b references: [ WrittenMonthRegex, RelativeYearRegex ] @@ -427,6 +427,8 @@ PeriodHourNumRegex: !simpleRegex ConnectNumRegex: !nestedRegex def: '\b{BaseDateTime.HourRegex}(?00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59)\s*{DescRegex}' references: [ BaseDateTime.HourRegex, DescRegex ] +AroundRegex: !simpleRegex + def: (\b(rond(om)?|ongeveer(\s+om)?)\s*\b) TimeRegexWithDotConnector: !nestedRegex def: ({BaseDateTime.HourRegex}(\s*\.\s*){BaseDateTime.MinuteRegex}(\s*:\s*{BaseDateTime.SecondRegex})?(\s*u\s*)?) references: [ BaseDateTime.HourRegex, BaseDateTime.MinuteRegex, BaseDateTime.SecondRegex ] @@ -501,6 +503,8 @@ SpecificTimeBetweenAnd: !nestedRegex references: [ TimeRegex2, RangeConnectorRegex, HourDTRegEx, PeriodHourNumRegex, DescRegex, PmRegexFull, AmRegex, TimeSuffix ] PrepositionRegex: !simpleRegex def: (?^(om|rond|tegen|op|van|deze)(\s+de)?$) +MealTimeRegex: !simpleRegex + def: \b((((tijdens\s+)?de|het)\s+)?(?ontbijt|lunch|avondeten)|((om|tegen|tijdens)\s+)?(?lunchtijd))\b EarlyLateRegex: !simpleRegex def: \b(((?vroege?|(in\s+het\s+)?(begin))|(?laat|later|late|aan\s+het\s+einde?))((\s+|-)(in\s+de|op\s+de|van\s+de|deze|in|op|van|de))?) TimeOfDayRegex: !nestedRegex @@ -546,6 +550,8 @@ UnspecificEndOfRegex: !simpleRegex def: \b(((om|rond|tegen|op)\s+)?het\s+)?(einde?\s+van\s+(de\s+)?dag)\b UnspecificEndOfRangeRegex: !simpleRegex def: \b(evj)\b +MiddlePauseRegex: !simpleRegex + def: \s*(,)\s* PeriodTimeOfDayRegex: !nestedRegex def: ((in\s+(de)?\s+)?({EarlyLateRegex}(\s+|-))?(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag|(eer)?gisteren|morgen)?(?ochtend|(na)?middag|avond|nacht))\b references: [ EarlyLateRegex ] @@ -566,7 +572,7 @@ DurationUnitRegex: !nestedRegex def: (?{DateUnitRegex}|(min\.|sec\.)|((?halfuur)|(?kwartier\s+uur)|(?kwartier)|uur|uren|u|minuten|minuut|m(ins?)?|seconde[ns]?|s(ecs?)?|nacht(en)?)\b)(\s+lang\b)? references: [ DateUnitRegex ] SuffixAndRegex: !simpleRegex - def: (?\s*(en|ën)(\s*een)?\s*(?hal(f|ve)|kwart|kwartier)|(?(een\s+)?kwartier)) + def: (?\s+(en|ën)(\s*een)?\s*(?hal(f|ve)|kwart|kwartier)|(?(een\s+)?kwartier)) PeriodicRegex: !simpleRegex def: \b(?dagelijkse?|(drie)?maandelijkse?|wekelijkse?|twee-?wekelijkse?|(half)?jaarlijkse?|kwartaal)\b EachUnitRegex: !nestedRegex @@ -641,8 +647,6 @@ BeforeRegex: !nestedRegex references: [ InclusiveModPrepositions ] SinceRegex: !simpleRegex def: (\b(sinds|na\s+of\s+gelijk\s+aan|(startend|beginnend)\s+(vanaf|op|met)|(al\s+)?zo\s+vroeg\s+als|(elk|ieder)\s+moment\s+vanaf|een\s+tijdstip\s+vanaf)\b\s*)|(?=) -AroundRegex: !simpleRegex - def: (\b(rond(om)?|ongeveer(\s+om)?)\s*\b) AgoRegex: !simpleRegex def: \b(geleden|(voor|eerder\s+dan)\s+(?gisteren|vandaag))\b LaterRegex: !simpleRegex @@ -720,8 +724,6 @@ RestOfDateRegex: !simpleRegex def: \brest\s+(van\s+)?((de|het|mijn|dit|deze|(de\s+)?huidige)\s+)?(?week|maand|jaar|decennium)\b RestOfDateTimeRegex: !simpleRegex def: \brest\s+(van\s+)?((de|het|mijn|dit|deze|(de\s+)?huidige)\s+)?(?vandaag|dag)\b -MealTimeRegex: !simpleRegex - def: \b((((tijdens\s+)?de|het)\s+)?(?ontbijt|lunch|avondeten)|((om|tegen|tijdens)\s+)?(?lunchtijd))\b AmbiguousRangeModifierPrefix: !simpleRegex def: (voor) PotentialAmbiguousRangeRegex: !nestedRegex @@ -740,8 +742,6 @@ WeekWithWeekDayRangeRegex: !nestedRegex references: [NextPrefixRegex, PreviousPrefixRegex, WeekDayRegex] GeneralEndingRegex: !simpleRegex def: ^\s*((\.,)|\.|,|!|\?)?\s*$ -MiddlePauseRegex: !simpleRegex - def: \s*(,)\s* DurationConnectorRegex: !simpleRegex def: ^\s*(?\s+|en|,)\s*$ PrefixArticleRegex: !simpleRegex diff --git a/Patterns/English/English-DateTime.yaml b/Patterns/English/English-DateTime.yaml index 9d28552127..ab7c711962 100644 --- a/Patterns/English/English-DateTime.yaml +++ b/Patterns/English/English-DateTime.yaml @@ -162,7 +162,7 @@ BetweenRegex: !nestedRegex def: \b(between\s+)({DayRegex}|{WrittenOrdinalDayRegex})\s*{RangeConnectorRegex}\s*({DayRegex}|{WrittenOrdinalDayRegex})\s+{MonthSuffixRegex}((\s+|\s*,\s*){YearRegex})?\b references: [ DayRegex, RangeConnectorRegex , MonthSuffixRegex, YearRegex, WrittenOrdinalDayRegex ] MonthWithYear: !nestedRegex - def: \b((({WrittenMonthRegex}[\.]?|((the\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|sixth|6th|seventh|7th|eighth|8th|ninth|9th|tenth|10th|eleventh|11th|twelfth|12th|last)\s+month(?=\s+(of|in))))((\s*)[/\\\-\.,]?(\s+(of|in))?(\s*)({YearRegex}|(?following|next|last|this)\s+year)|\s+(of|in)\s+{TwoDigitYearRegex}))|(({YearRegex}|(?following|next|last|this)\s+year)(\s*),?(\s*){WrittenMonthRegex}))\b + def: \b((({WrittenMonthRegex}[\.]?|((the\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|sixth|6th|seventh|7th|eighth|8th|ninth|9th|tenth|10th|eleventh|11th|twelfth|12th|last)\s+month(?=\s+(of|in))))((\s*)[/\\\-\.,]?(\s+(of|in))?(\s*)({YearRegex}|\'?{TwoDigitYearRegex}|(?following|next|last|this)\s+year)|\s+(of|in)\s+{TwoDigitYearRegex}))|(({YearRegex}|(?following|next|last|this)\s+year)(\s*),?(\s*){WrittenMonthRegex}))\b references: [ WrittenMonthRegex, YearRegex, TwoDigitYearRegex ] SpecialYearPrefixes: !simpleRegex def: (calendar|(?fiscal|school)) @@ -240,7 +240,7 @@ MonthOfRegex: !simpleRegex # This is a look-behind assertion. Some cases should extract two digits as year like 11/25/16, where 16 means 2016. # The assertion determines if not connected with am/pm or hour separator (:), which should be a time. DateYearRegex: !nestedRegex - def: (?{BaseDateTime.FourDigitYearRegex}|(?{BaseDateTime.FourDigitYearRegex}|(?(a\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\s+(minutes?|mins?))|{DeltaMinuteNumRegex}(\s+(minutes?|mins?))) + def: (?(a\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\s+(minutes?|mins?)|(?=\s+past))|{DeltaMinuteNumRegex}(\s+(minutes?|mins?)|(?=\s+past))) references: [ BaseDateTime.DeltaMinuteRegex, DeltaMinuteNumRegex ] WrittenTimeRegex: !nestedRegex def: (?{HourNumRegex}\s+{MinuteNumRegex}(\s+(minutes?|mins?))?) diff --git a/Patterns/French/French-DateTime.yaml b/Patterns/French/French-DateTime.yaml index b42c12c865..0fc3cc2a0e 100644 --- a/Patterns/French/French-DateTime.yaml +++ b/Patterns/French/French-DateTime.yaml @@ -92,7 +92,7 @@ BetweenRegex: !nestedRegex YearWordRegex: !simpleRegex def: \b(?l'ann[ée]e)\b MonthWithYear: !nestedRegex - def: \b({WrittenMonthRegex}(\s*),?(\s+de)?(\s*)({YearRegex}|{TwoDigitYearRegex}|(?cette)\s*{YearWordRegex})|{YearWordRegex}\s*({PastSuffixRegex}|{NextSuffixRegex})) + def: \b({WrittenMonthRegex}(\s*),?(\s+de)?(\s*)({YearRegex}|\'?{TwoDigitYearRegex}|(?cette)\s*{YearWordRegex})|{YearWordRegex}\s*({PastSuffixRegex}|{NextSuffixRegex})) references: [ WrittenMonthRegex, YearRegex, TwoDigitYearRegex, YearWordRegex, PastSuffixRegex, NextSuffixRegex ] OneWordPeriodRegex: !nestedRegex def: \b(({RelativeRegex}\s+)?{WrittenMonthRegex}|(la\s+)?(weekend|(fin de )?semaine|week-end|mois|ans?|l'année)\s+{StrictRelativeRegex}|{RelativeRegex}\s+(weekend|(fin de )?semaine|week-end|mois|ans?|l'année)|weekend|week-end|mois|l'année|an)\b @@ -183,7 +183,7 @@ SpecialDate: !nestedRegex def: (?<=\b(au|le)\s+){DayRegex}(?!:)\b references: [ DayRegex ] DateYearRegex: !nestedRegex - def: (?{YearRegex}|{TwoDigitYearRegex}) + def: (?{YearRegex}|\'?{TwoDigitYearRegex}) references: [ YearRegex, TwoDigitYearRegex ] DateExtractor1: !nestedRegex def: \b({WeekDayRegex}(\s+|\s*,\s*))?{MonthRegex}\s*[/\\\.\-]?\s*{DayRegex}(\s*([/\\\.\-]|\bde\b)?\s*{BaseDateTime.FourDigitYearRegex})?\b @@ -268,7 +268,7 @@ MidmorningRegex: !nestedRegex def: (?milieu\s*d[ue]\s*{MorningRegex}) references: [ MorningRegex ] MiddayRegex: !simpleRegex - def: (?milieu(\s*|-)d[eu]\s*(jour|midi)|apr[eè]s(-|\s*)midi|(?<=\bà\s+)midi) + def: (?milieu(\s*|-)d[eu]\s*(jour|midi)|apr[eè]s(-|\s*)midi|(?<=à\s+)midi) MidafternoonRegex: !nestedRegex def: (?milieu\s*d'+{AfternoonRegex}) references: [ AfternoonRegex ] diff --git a/Patterns/German/German-DateTime.yaml b/Patterns/German/German-DateTime.yaml index 4da821cf0a..48c415b9f1 100644 --- a/Patterns/German/German-DateTime.yaml +++ b/Patterns/German/German-DateTime.yaml @@ -106,8 +106,8 @@ BetweenRegex: !nestedRegex def: ((zwischen\s+)({DayRegex})(\s+{MonthSuffixRegex})?\s*{RangeConnectorRegex}\s*({DayRegex})(\s+{MonthSuffixRegex})((\s+|\s*,\s*){YearRegex})?|(zwischen\s+)({DayRegex})(\s+{MonthSuffixRegex})?\s*{RangeConnectorRegex}\s*({DayRegex})(\s+{MonthSuffixRegex})?((\s+|\s*,\s*){YearRegex})?) references: [ DayRegex, RangeConnectorRegex , MonthSuffixRegex, YearRegex ] MonthWithYear: !nestedRegex - def: \b((?apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|januar|j[äa]n(ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.))(\s*),?(\s+des)?(\s*)({YearRegex}|(?nächste[mn]|letzte[mn]|diese(s|n))\s+jahres)) - references: [ YearRegex ] + def: \b((?apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|januar|j[äa]n(ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.))(\s*),?(\s+des)?(\s*)({YearRegex}|\'?{TwoDigitYearRegex}|(?nächste[mn]|letzte[mn]|diese(s|n))\s+jahres)) + references: [ YearRegex , TwoDigitYearRegex ] OneWordPeriodRegex: !nestedRegex def: \b((((im\s+)?monat\s+)?({RelativeRegex}\s*(jahr\s*(im\s*)?)?)?(?apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|j[äa]n(uar|ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.)))|(?unter\s+der\s+woche)|({RelativeRegex}\s+)?((?werktags|arbeitswoche)|woche(nende)?|monat(s)?|jahr|jahres)(?!(\s+\d+(?!({BaseDateTime.BaseAmDescRegex}|{BaseDateTime.BasePmDescRegex}))|\s+bis\s+heute)))\b references: [ RelativeRegex, BaseDateTime.BaseAmDescRegex, BaseDateTime.BasePmDescRegex ] @@ -162,7 +162,7 @@ MonthRegex: !simpleRegex #This is a look-behind assertion. Some cases should extract two digits as year like 11/25/16, where 16 means 2016. #The assertion determines if not connected with am/pm or hour separator (:), which should be a time. DateYearRegex: !nestedRegex - def: (?{BaseDateTime.FourDigitYearRegex}|{TwoDigitYearRegex}) + def: (?{BaseDateTime.FourDigitYearRegex}|\'?{TwoDigitYearRegex}) references: [ BaseDateTime.FourDigitYearRegex, TwoDigitYearRegex ] OnRegex: !nestedRegex def: (?<=\bam\s+)({DayRegex}s?)\b @@ -199,8 +199,8 @@ SpecialDate: !nestedRegex def: (?=\b(an( dem)?|am)\s+){DayRegex}\b references: [ DayRegex ] DateExtractor1: !nestedRegex - def: \b(({WeekDayRegex})(\s+|\s*,\s*))?({DayRegex}\s*[/\\.,\- ]\s*{MonthRegex}(\s*[/\\.,\- ]\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\s*[/\\.,\- ]\s*{DayRegex}\s*[/\\.,\- ]\s*{MonthRegex})\b - references: [ WeekDayRegex, MonthRegex, DayRegex, DateYearRegex, BaseDateTime.FourDigitYearRegex ] + def: \b(({WeekDayRegex})(\s+|\s*,\s*))?({DayRegex}\s*[/\\.,\- ]\s*({MonthNumRegex}|{MonthRegex})(\s*[/\\.,\- ]\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\s*[/\\.,\- ]\s*{DayRegex}\s*[/\\.,\- ]\s*{MonthRegex})\b + references: [ WeekDayRegex, MonthRegex, MonthNumRegex, DayRegex, DateYearRegex, BaseDateTime.FourDigitYearRegex ] DateExtractor2: !nestedRegex def: \b({MonthRegex}\s*[/\\.,\- ]\s*{DayRegex}(?!\s*\-\s*\d{2}\b)(\s*[/\\.,\- ]\s*{DateYearRegex})?)\b references: [ WeekDayRegex, MonthRegex, DayRegex, DateYearRegex ] @@ -218,7 +218,7 @@ DateExtractor6: !nestedRegex def: ^[.] references: [ WeekDayRegex ] DateExtractor7: !nestedRegex - def: ({DayRegex}\s*[\.]\s*{MonthNumRegex}[\.]){BaseDateTime.CheckDecimalRegex} + def: \b({DayRegex}\s*[\.]\s*{MonthNumRegex}[\.]){BaseDateTime.CheckDecimalRegex} references: [ MonthNumRegex, DayRegex, BaseDateTime.CheckDecimalRegex ] DateExtractor8: !nestedRegex def: (?<=\b(am)\s+){DayRegex}[/\\\.]{MonthNumRegex}([/\\\.]{DateYearRegex})?{BaseDateTime.CheckDecimalRegex}\b @@ -271,7 +271,7 @@ AmPmPrefixRegex: !simpleRegex CommonDatePrefixRegex: !simpleRegex def: ^[\.] LessThanOneHour: !nestedRegex - def: \b(?(ein(er?)?\s+)?((drei)?viertel|halb(en?)?)(\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\s+(min(uten?)?))|{DeltaMinuteNumRegex}(\s+(min(uten?)?)) + def: \b(?(ein(er?)?\s+)?((drei)?viertel|halb(en?)?)(\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\s+(min(uten?)?)|(?=\s+(nach|vor)))|{DeltaMinuteNumRegex}(\s+(min(uten?)?)|(?=\s+(nach|vor))) references: [ BaseDateTime.DeltaMinuteRegex, DeltaMinuteNumRegex ] WrittenTimeRegex: !nestedRegex def: (um\s*)?(?{HourNumRegex}(\s*{OclockRegex}\s*)({MinuteNumRegex}|{MinuteNumRegex}und(?zwanzig|dreißig|vierzig|fünfzig))) diff --git a/Patterns/Italian/Italian-DateTime.yaml b/Patterns/Italian/Italian-DateTime.yaml index 9085adec71..f059ae64cc 100644 --- a/Patterns/Italian/Italian-DateTime.yaml +++ b/Patterns/Italian/Italian-DateTime.yaml @@ -108,7 +108,7 @@ TwoDigitYearRegex: !nestedRegex #This is a look-behind assertion. Some cases should extract two digits as year like 11/25/16, where 16 means 2016. #The assertion determines if not connected with am/pm or hour separator (:), which should be a time. DateYearRegex: !nestedRegex - def: (?{BaseDateTime.FourDigitYearRegex}|{TwoDigitYearRegex}) + def: (?{BaseDateTime.FourDigitYearRegex}|\'?{TwoDigitYearRegex}) references: [ BaseDateTime.FourDigitYearRegex, TwoDigitYearRegex ] YearSuffix: !nestedRegex def: (,?\s*({DateYearRegex}|{FullTextYearRegex})) @@ -133,8 +133,8 @@ BetweenRegex: !nestedRegex YearWordRegex: !simpleRegex def: \b(?l'anno)\b MonthWithYear: !nestedRegex - def: \b({MonthRegex}(\.)?(\s*)[/\\\-\.,]?(((\s+del)?\s+{YearRegex})|((\s+(del|di|il))?\s+(?prossim['o]|passato|quest['o])\s*anno)|((\s+(del)?l')anno\s+(?prossimo|passato)))) - references: [ YearRegex, MonthRegex ] + def: \b({MonthRegex}(\.)?(\s*)[/\\\-\.,]?(((\s+del)?\s+{YearRegex}|\'?{TwoDigitYearRegex})|((\s+(del|di|il))?\s+(?prossim['o]|passato|quest['o])\s*anno)|((\s+(del)?l')anno\s+(?prossimo|passato)))) + references: [ YearRegex, MonthRegex, TwoDigitYearRegex ] SpecialYearPrefixes: !simpleRegex def: (?fiscale|scolastico) OneWordPeriodRegex: !nestedRegex @@ -303,13 +303,13 @@ LunchRegex: !simpleRegex NightRegex: !simpleRegex def: \b(mezzanotte|notte)\b LessThanOneHour: !nestedRegex - def: (?(un\s+quarto|tre quarti?|mezz[oa]|mezz'ora|{BaseDateTime.DeltaMinuteRegex}(\s+(minut[oi]|min))?|{DeltaMinuteNumRegex}(\s+(minut[oi]|min))|(?<=(e|meno)\s+){DeltaMinuteNumRegex})) + def: (?(un\s+quarto|tre quarti?|mezz[oa]|mezz'ora|{BaseDateTime.DeltaMinuteRegex}|{DeltaMinuteNumRegex})) references: [ BaseDateTime.DeltaMinuteRegex, DeltaMinuteNumRegex ] EngTimeRegex: !nestedRegex def: (?{HourNumRegex}\s+e\s+({MinuteNumRegex}|(?venti?|trenta?|quaranta?|cinquanta?){MinuteNumRegex})) references: [ HourNumRegex, MinuteNumRegex ] TimePrefix: !nestedRegex - def: (?(e\s+{LessThanOneHour}|{LessThanOneHour}\s+(minut[oi]|min)\s+all[e']|meno {LessThanOneHour})) + def: (?((e|meno)\s+{LessThanOneHour}(\s+(minut[oi]|min))?|{LessThanOneHour}\s+(minut[oi]|min)\s+all[e'])) references: [ LessThanOneHour ] TimeSuffix: !nestedRegex def: (?{AmRegex}|{PmRegex}|{OclockRegex}) diff --git a/Patterns/Italian/Italian-NumbersWithUnit.yaml b/Patterns/Italian/Italian-NumbersWithUnit.yaml index d3b08e36b5..15d7721019 100644 --- a/Patterns/Italian/Italian-NumbersWithUnit.yaml +++ b/Patterns/Italian/Italian-NumbersWithUnit.yaml @@ -643,7 +643,7 @@ CurrencyPrefixList: !dictionary types: [ string, string ] entries: #Dollar Prefix - Dollar: $ + Dollar: $|dollari United States dollar: $ stati uniti|us$|us $|u.s. $|u.s $ East Caribbean dollar: east caribbean $ Australian dollar: $ australiano|$ australia diff --git a/Patterns/Japanese/Japanese-DateTime.yaml b/Patterns/Japanese/Japanese-DateTime.yaml index 2f1ab566b1..67580a4f8b 100644 --- a/Patterns/Japanese/Japanese-DateTime.yaml +++ b/Patterns/Japanese/Japanese-DateTime.yaml @@ -281,6 +281,28 @@ DecadeRegexInCJK: !simpleRegex DecadeRegex: !nestedRegex def: ({DateRangePrepositions})(?({CenturyRegex}|{CenturyRegexInCJK}|{RelativeCenturyRegex}))?の?(?(?\d{2}(?=\d)))?(?((\d{1}0)|{DecadeRegexInCJK}))年代(のごろ)? references: [DateRangePrepositions, CenturyRegex, CenturyRegexInCJK, RelativeCenturyRegex, DecadeRegexInCJK] +#TimeExtractorCJK +TimeHourNumRegex: !simpleRegex + def: (?^(,?(夜の|的|の(?朝|夜|午後|晩)?|t),?|在)$) @@ -459,28 +481,6 @@ SetEachDayRegex: !simpleRegex def: (毎|各|毎一)(天|日)\s*$ SetEachDateUnitRegex: !simpleRegex def: (毎)(年|月|週)\s*$ -#TimeExtractorCJK -TimeHourNumRegex: !simpleRegex - def: (?{TimeHourCJKRegex}|{TimeHourNumRegex}){TimeClockDescRegex} @@ -685,6 +685,10 @@ YearToDateTerms: !list types: [ string ] entries: - 年初来 +MonthToDateTerms: !list + types: [ string ] + entries: + - 月に入ってから LastYearTerms: !list types: [ string ] entries: @@ -1249,7 +1253,6 @@ DynastyYearMap: !dictionary 明治43: 1910 明治44: 1911 明治45: 1912 - 大正元: 1912 大正2: 1913 大正3: 1914 大正4: 1915 diff --git a/Patterns/Japanese/Japanese-NumbersWithUnit.yaml b/Patterns/Japanese/Japanese-NumbersWithUnit.yaml index 855b945a28..76cac45b91 100644 --- a/Patterns/Japanese/Japanese-NumbersWithUnit.yaml +++ b/Patterns/Japanese/Japanese-NumbersWithUnit.yaml @@ -46,14 +46,14 @@ CurrencySuffixList: !dictionary Chetrum: チェルタム #Bolivian boliviano Bolivian boliviano: ボリビアーノ -#Bosnia and Herzegovina convertible mark +#Bosnia and Herzegovina convertible mark Bosnia and Herzegovina convertible mark: 兌換マルク #Botswana pula Botswana pula: ボツワナ・プラ|ボツワナプラ|プラ Thebe: テベ #Brazilian real Brazilian real: ブラジル・レアル|ブラジルレアル|レアル -#Bulgarian lev +#Bulgarian lev Bulgarian lev: ブルガリア・レフ|ブルガリアレフ|レフ Stotinka: ストティンカ #Cambodian riel @@ -190,7 +190,7 @@ CurrencySuffixList: !dictionary Manat: マナト #Shilling Somali shilling: ソマリア・シリング - Somaliland shilling: ソマリランド・シリング + Somaliland shilling: ソマリランド・シリング Tanzanian shilling: タンザニア・シリング Ugandan shilling: ウガンダ・シリング #Leu @@ -499,10 +499,10 @@ CurrencyNameToIsoCodeMap: !dictionary Kiribati dollar: _KID Guernsey pound: _GGP Faroese króna: _FOK - Cook Islands dollar: _CKD - British Virgin Islands dollar: _BD - Ascension pound: _AP - Alderney pound: _ALP + Cook Islands dollar: _CKD + British Virgin Islands dollar: _BD + Ascension pound: _AP + Alderney pound: _ALP Abkhazian apsar: _AA FractionalUnitNameToCodeMap: !dictionary types: [ string, string ] @@ -781,4 +781,4 @@ TemperatureAmbiguousValues: !list - 度 - k HalfUnitRegex: !simpleRegex - def: 半 \ No newline at end of file + def: 半 diff --git a/Patterns/Portuguese/Portuguese-DateTime.yaml b/Patterns/Portuguese/Portuguese-DateTime.yaml index 41b91b9a6b..fd06bff6ff 100644 --- a/Patterns/Portuguese/Portuguese-DateTime.yaml +++ b/Patterns/Portuguese/Portuguese-DateTime.yaml @@ -85,7 +85,7 @@ OneWordPeriodRegex: !nestedRegex def: \b(((pr[oó]xim[oa]?|[nd]?es[st]e|aquel[ea]|[uú]ltim[oa]?|em)\s+)?(?abr(il)?|ago(sto)?|dez(embro)?|fev(ereiro)?|jan(eiro)?|ju[ln](ho)?|mar([çc]o)?|maio?|nov(embro)?|out(ubro)?|sep?t(embro)?)|({RelativeRegex}\s+)?(ano\s+{SpecialYearPrefixes}|{SpecialYearPrefixes}\s+ano)|(?<=\b(de|do|da|o|a)\s+)?(pr[oó]xim[oa](s)?|[uú]ltim[oa]s?|est(e|a))\s+(fim de semana|fins de semana|semana|m[êe]s|ano)|fim de semana|fins de semana|(m[êe]s|anos)? [àa] data)\b references: [RelativeRegex, SpecialYearPrefixes] MonthWithYearRegex: !nestedRegex - def: \b((((pr[oó]xim[oa](s)?|[nd]?es[st]e|aquele|[uú]ltim[oa]?|em)\s+)?{MonthRegex}|((n?o\s+)?(?primeiro|1o|segundo|2o|terceiro|3o|[cq]uarto|4o|quinto|5o|sexto|6o|s[eé]timo|7o|oitavo|8o|nono|9o|d[eé]cimo(\s+(primeiro|segundo))?|10o|11o|12o|[uú]ltimo)\s+m[eê]s(?=\s+(d[aeo]|[ao]))))\s+((d[aeo]|[ao])\s+)?({YearRegex}|{TwoDigitYearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|[nd]?es[st]e)\s+ano))\b + def: \b((((pr[oó]xim[oa](s)?|[nd]?es[st]e|aquele|[uú]ltim[oa]?|em)\s+)?{MonthRegex}|((n?o\s+)?(?primeiro|1o|segundo|2o|terceiro|3o|[cq]uarto|4o|quinto|5o|sexto|6o|s[eé]timo|7o|oitavo|8o|nono|9o|d[eé]cimo(\s+(primeiro|segundo))?|10o|11o|12o|[uú]ltimo)\s+m[eê]s(?=\s+(d[aeo]|[ao]))))\s+((d[aeo]|[ao])\s+)?({YearRegex}|\'?{TwoDigitYearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|[nd]?es[st]e)\s+ano))\b references: [ MonthRegex, YearRegex, TwoDigitYearRegex ] MonthNumWithYearRegex: !nestedRegex def: ({YearRegex}(\s*?)[/\-\.](\s*?){MonthNumRegex})|({MonthNumRegex}(\s*?)[/\-](\s*?){YearRegex}) @@ -217,7 +217,7 @@ WeekDayEnd: !nestedRegex WeekDayStart: !simpleRegex def: ^\b$ DateYearRegex: !nestedRegex - def: (?{YearRegex}|{TwoDigitYearRegex}) + def: (?{YearRegex}|\'?{TwoDigitYearRegex}) references: [ YearRegex, TwoDigitYearRegex ] DateExtractor1: !nestedRegex # (domingo,)? 5 de Abril diff --git a/Patterns/Spanish/Spanish-DateTime.yaml b/Patterns/Spanish/Spanish-DateTime.yaml index 5d790e2f21..dfeefc0641 100644 --- a/Patterns/Spanish/Spanish-DateTime.yaml +++ b/Patterns/Spanish/Spanish-DateTime.yaml @@ -96,7 +96,7 @@ OneWordPeriodRegex: !nestedRegex def: \b(((((la|el)\s+)?mes\s+(({OfPrepositionRegex})\s+)?)|((pr[oó]xim[oa]?|est[ea]|[uú]ltim[oa]?)\s+))?({MonthRegex})|((el\s+)?{RelativeRegex}\s+)?(({SpecialYearPrefixes}\s+)año|año\s+{SpecialYearPrefixes})|(((la|el)\s+)?((({RelativeRegex}\s+)({DateUnitRegex}|(fin\s+de\s+)?semana|finde)(\s+{RelativeSuffixRegex})?)|{DateUnitRegex}(\s+{RelativeSuffixRegex}))|va\s+de\s+{DateUnitRegex}|((año|mes)(\s+(a|hasta)\s+la\s+fecha)?|((el\s+)?fin\s+de\s+)?semana|(el\s+)?finde))\b) references: [MonthRegex, RelativeRegex, OfPrepositionRegex, RelativeSuffixRegex, DateUnitRegex, SpecialYearPrefixes] MonthWithYearRegex: !nestedRegex - def: \b((((pr[oó]xim[oa](s)?|est?[ae]|[uú]ltim[oa]?)\s+)?{MonthRegex}|((el\s+)?(?primero?|1(er|ro)|segundo|2do|tercero?|3(er|ro)|uarto|4to|quinto|5to|sexto|6to|s[eé]ptimo|7mo|octavo|8vo|noveno|9no|d[eé]cimo|10mo|und[eé]cimo|11mo|duod[eé]cimo|12mo|[uú]ltimo)\s+mes(?=\s+(del?|en))))((\s+|(\s*[,-]\s*))((de(l|\s+la)?|en)\s+)?({YearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|este)\s+año)|\s+(del?|en)\s+{TwoDigitYearRegex}))\b + def: \b((((pr[oó]xim[oa](s)?|est?[ae]|[uú]ltim[oa]?)\s+)?{MonthRegex}|((el\s+)?(?primero?|1(er|ro)|segundo|2do|tercero?|3(er|ro)|uarto|4to|quinto|5to|sexto|6to|s[eé]ptimo|7mo|octavo|8vo|noveno|9no|d[eé]cimo|10mo|und[eé]cimo|11mo|duod[eé]cimo|12mo|[uú]ltimo)\s+mes(?=\s+(del?|en))))((\s+|(\s*[,-]\s*))((de(l|\s+la)?|en)\s+)?({YearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|este)\s+año)|\s+(del?|en)\s+\'?{TwoDigitYearRegex}))\b references: [ MonthRegex, YearRegex, TwoDigitYearRegex ] MonthNumWithYearRegex: !nestedRegex def: \b(({YearRegex}(\s*?)[/\-\.~](\s*?){MonthNumRegex})|({MonthNumRegex}(\s*?)[/\-\.~](\s*?){YearRegex}))\b @@ -237,7 +237,7 @@ WeekDayEnd: !nestedRegex WeekDayStart: !simpleRegex def: ^\b$ DateYearRegex: !nestedRegex - def: (?{YearRegex}|(?{YearRegex}|(? /dev/null || git show-ref --tags -d | grep ^${COMMIT_ID} | sed -e 's,.* refs/tags/,,' -e 's/\\^{}//' | xargs || echo ''").trim() + if(BRANCH.equals("master")) { + NICKNAME = 'main' + } else { + NICKNAME = 'PR' + } + sh "echo ${NICKNAME}" + sh """ + rm -rf allure-results + mkdir allure-results + """ + withCredentials([usernamePassword(credentialsId: params.CREDENTIALSID, usernameVariable: 'user', passwordVariable: 'password')]) { + sh """ + rm -rf pip.conf + echo '[global]' >> pip.conf + echo 'extra-index-url = https://$user:$password@purecloud.jfrog.io/purecloud/api/pypi/inin-pypi/simple' >> pip.conf + """ + } + + } + } + + stage("Test install package and run tests") { + dir('Python') { + sh """ + virtualenv -p python3.8 --clear venv + . venv/bin/activate + sh build.sh venv + """ + } + } + + stage("Publish Build Artifacts") { + dir(LIBRARY_FOLDER){ + try { + sh """ + virtualenv -p python3.8 --clear venv + . venv/bin/activate + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-text"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-number"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-number-with-unit"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/datatypes-timex-expression"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-date-time"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-sequence"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-choice"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + dir(LIBRARY_FOLDER + "/recognizers-suite"){ + + try { + sh """ + . ../venv/bin/activate + python setup.py sdist upload -r inin-pypi + """ + } catch(Exception e) { + echo "Skipping publish of artifact version ${ARTIFACT_VERSION}. Exception is ${e}" + } + } + + } + + } +} diff --git a/Python/build.sh b/Python/build.sh index 040b798eb4..0b8643c81d 100644 --- a/Python/build.sh +++ b/Python/build.sh @@ -1,16 +1,3 @@ -cd libraries/resource-generator - -echo // Installing Resource Generator Dependencies -pip install -r ./requirements.txt - -echo // Building Resources -python index.py ../recognizers-choice/resource-definitions.json -python index.py ../recognizers-number/resource-definitions.json -python index.py ../recognizers-number-with-unit/resource-definitions.json -python index.py ../recognizers-date-time/resource-definitions.json -python index.py ../recognizers-sequence/resource-definitions.json - -cd ../.. echo // Installing recognizers-text pip install -e ./libraries/recognizers-text/ diff --git a/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/english/english_timex_relative_convert.py b/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/english/english_timex_relative_convert.py index 620ecc069f..0e575b9a5f 100644 --- a/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/english/english_timex_relative_convert.py +++ b/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/english/english_timex_relative_convert.py @@ -94,7 +94,7 @@ def convert_date_time_range(timex: Timex, date: datetime): def english_convert_timex_to_string_relative(timex: Timex, date: datetime): - types = timex.types if len(timex.types) is not 0 else TimexInference.infer(timex) + types = timex.types if len(timex.types) != 0 else TimexInference.infer(timex) if Constants.TIMEX_TYPES_PRESENT in types: return 'now' diff --git a/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_constants.py b/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_constants.py index d09182befd..941d210225 100644 --- a/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_constants.py +++ b/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_constants.py @@ -20,3 +20,5 @@ class Constants: 'SATURDAY': 5, 'SUNDAY': 6 } + GENERAL_PERIOD_PREFIX: str = "P" + TIME_TIMEX_PREFIX: str = "T" diff --git a/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_helpers.py b/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_helpers.py index 07fbf5a3ef..ae3c73bff9 100644 --- a/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_helpers.py +++ b/Python/libraries/datatypes-timex-expression/datatypes_timex_expression/timex_helpers.py @@ -2,6 +2,7 @@ # Licensed under the MIT License. from datetime import date, timedelta, datetime +from typing import List from math import floor @@ -164,9 +165,9 @@ def timex_datetime_add(start, duration): @staticmethod def date_from_timex(timex): return date( - timex.year if timex.year is not None else 2001, - timex.month if timex.month is not None else 1, - timex.day_of_month if timex.day_of_month is not None else 1 + int(timex.year) if timex.year is not None else 2001, + int(timex.month) if timex.month is not None else 1, + int(timex.day_of_month) if timex.day_of_month is not None else 1 ) @staticmethod @@ -227,3 +228,31 @@ def clone_duration(timex): result.weekend = None result.part_of_day = None return result + + @staticmethod + def is_time_duration_timex(timex: str) -> bool: + return timex.startswith(f"{Constants.GENERAL_PERIOD_PREFIX}{Constants.TIME_TIMEX_PREFIX}") + + @staticmethod + def get_duration_timex_without_prefix(timex: str) -> str: + # Remove "PT" prefix for TimeDuration, Remove "P" prefix for DateDuration + if TimexHelpers.is_time_duration_timex(timex): + return timex[2:] + else: + return timex[1:] + + @staticmethod + def generate_compound_duration_timex(timex_list: List[str]) -> str: + is_time_duration_already_exist = False + timex_builder = Constants.GENERAL_PERIOD_PREFIX + + # The Time Duration component occurs first time + for timex_component in timex_list: + if not is_time_duration_already_exist and TimexHelpers.is_time_duration_timex(timex_component): + timex_builder += f"{Constants.TIME_TIMEX_PREFIX}" \ + f"{TimexHelpers.get_duration_timex_without_prefix(timex_component)}" + is_time_duration_already_exist = True + else: + timex_builder += f"{TimexHelpers.get_duration_timex_without_prefix(timex_component)}" + + return timex_builder diff --git a/Python/libraries/datatypes-timex-expression/setup.py b/Python/libraries/datatypes-timex-expression/setup.py index 6596291226..91f1f397f8 100644 --- a/Python/libraries/datatypes-timex-expression/setup.py +++ b/Python/libraries/datatypes-timex-expression/setup.py @@ -10,8 +10,8 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = 'datatypes_timex_expression' -VERSION = '1.0.0.a0' +NAME = 'datatypes_timex_expression_genesys' +VERSION = '1.0.77' REQUIRES = [] setup( diff --git a/Python/libraries/recognizers-choice/setup.py b/Python/libraries/recognizers-choice/setup.py index c71d1c00f4..4080c73482 100644 --- a/Python/libraries/recognizers-choice/setup.py +++ b/Python/libraries/recognizers-choice/setup.py @@ -10,9 +10,9 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = 'recognizers-text-choice' -VERSION = '1.0.0.a0' -REQUIRES = ['recognizers-text', 'regex', 'grapheme'] +NAME = 'recognizers-text-choice-genesys' +VERSION = '1.0.77' +REQUIRES = ['recognizers-text-genesys', 'regex', 'grapheme'] setup( name=NAME, diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/__init__.py new file mode 100644 index 0000000000..3c15b5d373 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/__init__.py @@ -0,0 +1,11 @@ +from .base_configs import * +from .base_duration import * +from .base_date import * +from .base_time import * +from .base_dateperiod import * +from .base_timeperiod import * +from .base_datetime import * +from .base_datetimeperiod import * +from .base_set import * +from .base_holiday import * +from .base_merged import * diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_configs.py new file mode 100644 index 0000000000..0ddf8761fb --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_configs.py @@ -0,0 +1,194 @@ +from typing import Dict +from abc import abstractmethod + +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.utilities import DateTimeUtilityConfiguration, DateTimeOptionsConfiguration + + +class CJKCommonDateTimeParserConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def cardinal_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def integer_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def ordinal_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def number_parser(self) -> BaseNumberParser: + raise NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def set_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def holiday_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def duration_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def set_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def holiday_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_alt_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_zone_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def month_of_year(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def numbers(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def unit_value_map(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def season_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def special_year_prefixes_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_map(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def day_of_month(self) -> Dict[str, int]: + return NotImplementedError + + @property + @abstractmethod + def day_of_week(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def double_numbers(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def written_decades(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def special_decade_cases(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def utility_configuration(self) -> DateTimeUtilityConfiguration: + raise NotImplementedError diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_date.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_date.py new file mode 100644 index 0000000000..08a3ec8fe2 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_date.py @@ -0,0 +1,1204 @@ +import calendar +from datetime import datetime, timedelta +from abc import abstractmethod, ABC +from datedelta import datedelta +from dateutil.relativedelta import relativedelta + +from typing import List, Pattern, Dict, Match + +from regex import regex + +from recognizers_number.number import CJKNumberParser, Constants as Num_Constants +from recognizers_date_time.date_time import Constants as Date_Constants +from recognizers_date_time.date_time.base_date import BaseDateParser +from recognizers_date_time.date_time.utilities import DateTimeExtractor, DateTimeParser, \ + ExtractResultExtension, merge_all_tokens, DateTimeUtilityConfiguration, DateUtils, DateTimeParseResult, \ + TimeTypeConstants, DateTimeFormatUtil, DateTimeResolutionResult, DurationParsingUtil, DayOfWeek, TimexUtil, Token +from recognizers_date_time.date_time.CJK import CJKCommonDateTimeParserConfiguration +from recognizers_text import ExtractResult, RegExpUtility, MetaData +from recognizers_date_time.date_time.abstract_year_extractor import AbstractYearExtractor + + +class CJKDateExtractorConfiguration(ABC): + + @property + @abstractmethod + def date_regex_list(self) -> List[Pattern]: + raise NotImplementedError + + @property + @abstractmethod + def implicit_date_list(self) -> List[Pattern]: + raise NotImplementedError + + @property + @abstractmethod + def datetime_period_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def before_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def week_day_start_end(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def range_connector_symbol_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def ambiguity_date_filters_dict(self) -> Dict[Pattern, Pattern]: + raise NotImplementedError + + @property + @abstractmethod + def number_parser(self) -> CJKNumberParser: + raise NotImplementedError + + @property + @abstractmethod + def time_clock_desc_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_minutes_desc_regex(self) -> Pattern: + raise NotImplementedError + + +class BaseCJKDateExtractor(DateTimeExtractor, AbstractYearExtractor): + @property + def extractor_type_name(self) -> str: + return Date_Constants.SYS_DATETIME_DATE + + def __init__(self, config: CJKDateExtractorConfiguration): + super().__init__(config) + self.config = config + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + if reference is None: + reference = datetime.now() + + tokens: List[Token] = list() + tokens.extend(self.basic_regex_match(source)) + tokens.extend(self.implicit_date(source)) + tokens.extend(self.duration_with_ago_and_later(source, reference)) + result = merge_all_tokens(tokens, source, self.extractor_type_name) + + result = ExtractResultExtension.filter_ambiguity(result, source, self.config.ambiguity_date_filters_dict) + + return result + + # Match basic patterns in DateRegexList + def basic_regex_match(self, source: str) -> List[Token]: + ret: List[Token] = list() + + for regexp in self.config.date_regex_list: + + matches = list(regexp.finditer(source)) + if matches: + for match in matches: + ret.append(Token(match.start(), source.index(match.group()) + match.end() - match.start())) + + return ret + + # Match several other implicit cases + def implicit_date(self, source: str) -> List[Token]: + ret: List[Token] = list() + + for regexp in self.config.implicit_date_list: + + for match in regexp.finditer(source): + ret.append(Token(match.start(), source.index(match.group()) + match.end() - match.start())) + + return ret + + # process case like "三天前" "两个月前" + def duration_with_ago_and_later(self, source: str, reference: datetime) -> List[Token]: + ret: List[Token] = list() + duration_extracted_results = self.config.duration_extractor.extract(source, reference) + + for extracted_result in duration_extracted_results: + + # Only handles date durations here + # Cases with dateTime durations will be handled in DateTime Extractor + if self.config.datetime_period_unit_regex.match(extracted_result.text): + continue + if self.config.time_clock_desc_regex.search(extracted_result.text) or\ + self.config.time_minutes_desc_regex.search(extracted_result.text): + continue + + pos = extracted_result.start + extracted_result.length + + if pos < len(source): + suffix = source[pos:] + match = RegExpUtility.get_matches(self.config.before_regex, suffix) + + if not match: + match = RegExpUtility.get_matches(self.config.after_regex, suffix) + + if match and suffix.startswith(match[0]): + meta_data = MetaData() + meta_data.is_duration_date_with_weekday = True + # "Extend extraction with weekdays like in "Friday two weeks from now", "in 3 weeks on Monday"" + ret.append(Token(extracted_result.start, pos + len(match[0]), meta_data)) + + ret.extend(self.extend_with_week_day(ret, source)) + + return ret + + def extend_with_week_day(self, ret: List[Token], source: str): + new_ret: List[Token] = list() + + for er in ret: + before_str = source[0: er.start] + after_str = source[er.end:] + + before_match = self.config.week_day_start_end.match(before_str) + after_match = self.config.week_day_start_end.match(after_str) + + if before_match or after_match: + start = before_match.start() if before_match else er.start + end = er.end if before_match else er.end + after_match.start() + len(after_match.group()) + + meta_data = MetaData() + meta_data.is_duration_date_with_weekday = True + ret.append(Token(start, end, meta_data)) + + return new_ret + + +class CJKDateParserConfiguration(CJKCommonDateTimeParserConfiguration): + + @property + @abstractmethod + def cardinal_extractor(self): + raise NotImplementedError + + @property + @abstractmethod + def integer_extractor(self): + raise NotImplementedError + + @property + @abstractmethod + def ordinal_extractor(self): + raise NotImplementedError + + @property + @abstractmethod + def number_parser(self): + raise NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def set_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def holiday_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> BaseDateParser: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def duration_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def set_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def holiday_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_alt_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_zone_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def month_of_year(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def numbers(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def double_numbers(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def unit_value_map(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def season_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def special_year_prefixes_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_map(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def day_of_month(self) -> Dict[str, int]: + return NotImplementedError + + @property + @abstractmethod + def day_of_week(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def written_decades(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def special_decade_cases(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def special_date(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def utility_configuration(self) -> DateTimeUtilityConfiguration: + raise NotImplementedError + + @property + @abstractmethod + def date_regex_list(self): + raise NotImplementedError + + @property + @abstractmethod + def next_re(self): + raise NotImplementedError + + @property + @abstractmethod + def last_re(self): + raise NotImplementedError + + @property + @abstractmethod + def special_day_regex(self): + raise NotImplementedError + + @abstractmethod + def get_swift_day(self, day_str: str): + raise NotImplementedError + + @property + @abstractmethod + def duration_relative_duration_unit_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def special_day_with_num_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def week_day_and_day_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def next_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def this_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def last_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def week_day_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def strict_week_day_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def week_day_of_month_regex(self): + raise NotImplementedError + + @abstractmethod + def is_cardinal_last(self, source: str) -> bool: + raise NotImplementedError + + @property + @abstractmethod + def next_month_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def last_month_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def lunar_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def last_week_day_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def unit_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def before_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def dynasty_year_regex(self): + raise NotImplementedError + + @property + @abstractmethod + def dynasty_start_year(self): + raise NotImplementedError + + @property + @abstractmethod + def dynasty_year_map(self): + raise NotImplementedError + + +class BaseCJKDateParser(DateTimeParser): + + def __init__(self, config: CJKDateParserConfiguration): + self.config = config + self.month_max_days: List[int] = [ + 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + + @property + def no_date(self): + return DateUtils.safe_create_from_value(DateUtils.min_value, 0, 0, 0) + + @property + def parser_type_name(self) -> str: + return Date_Constants.SYS_DATETIME_DATE + + def parse(self, source: ExtractResult, reference: datetime = None) -> DateTimeParseResult: + if reference is None: + reference = datetime.now() + + if source.type is self.parser_type_name: + value = self.inner_parser(source.text, reference) + + result = DateTimeParseResult() + result.text = source.text + result.start = source.start + result.length = source.length + result.type = source.type + result.data = source.data + result.value = value + result.timex_str = '' if not value else value.timex + result.resolution_str = '' + + return result + + def filter_results(self, query: str, candidate_results: List[DateTimeParseResult]): + return candidate_results + + def inner_parser(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + inner_result = self.parse_basic_regex_match(source_text, reference) + + if not inner_result.success: + inner_result = self.parse_weekday_of_month( + source_text, reference) + + if not inner_result.success: + inner_result = self.parse_implicit_date(source_text, reference) + + if not inner_result.success: + inner_result = self.parser_duration_with_ago_and_later( + source_text, reference) + + if inner_result.success: + inner_result.future_resolution: Dict[str, str] = dict() + inner_result.future_resolution[TimeTypeConstants.DATE] = DateTimeFormatUtil.format_date( + inner_result.future_value) + inner_result.past_resolution: Dict[str, str] = dict() + inner_result.past_resolution[TimeTypeConstants.DATE] = DateTimeFormatUtil.format_date( + inner_result.past_value) + inner_result.is_lunar = self.is_lunar_calendar(source_text) + + result_value = inner_result + + return result_value + + return None + + # parse basic patterns in DateRegexList + def parse_basic_regex_match(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + for regexp in self.config.date_regex_list: + match = RegExpUtility.exact_match(regexp, source_text, trim=True) + + if match and match.success: + # Value string will be set in Match2Date method + ret = self.match_to_date(match, reference) + return ret + + return ret + + # match several other cases + # including '今天', '后天', '十三日' + def parse_implicit_date(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + # handle "十二日" "明年这个月三日" "本月十一日" + match = RegExpUtility.exact_match(self.config.special_date, source_text, trim=True) + + if match and match.success: + year_str = match.get_group(Date_Constants.THIS_YEAR_GROUP_NAME) + month_str = match.get_group(Date_Constants.THIS_MONTH_GROUP_NAME) + day_str = match.get_group(Date_Constants.DAY_GROUP_NAME) + + month = reference.month + year = reference.year + day = self.config.day_of_month[day_str] + + has_year = False + has_month = False + + if month_str: + has_month = True + has_year = True + + if self.config.next_re.match(month_str): + month += 1 + if month == (Date_Constants.MAX_MONTH + 1): + month = Date_Constants.MIN_MONTH + year += 1 + elif self.config.last_re.match(month_str): + month -= 1 + if month == (Date_Constants.MIN_MONTH + 1): + month = Date_Constants.MAX_MONTH + year -= 1 + + if year_str: + has_year = True + if self.config.next_re.match(year_str): + year += 1 + elif self.config.last_re.match(year_str): + year -= 1 + + ret.timex = DateTimeFormatUtil.luis_date(year if has_year else -1, month if has_month else -1, day) + + future_date: datetime + past_date: datetime + + if day > self.get_month_max_day(year, month): + future_month = month + 1 + past_month = month - 1 + future_year = year + past_year = year + + if future_month == (Date_Constants.MAX_MONTH + 1): + future_month = Date_Constants.MIN_MONTH + future_year = year + 1 + + if past_month == (Date_Constants.MIN_MONTH - 1): + past_month = Date_Constants.MAX_MONTH + past_year = year - 1 + + is_future_valid = DateUtils.is_valid_date(future_year, future_month, day) + is_past_valid = DateUtils.is_valid_date(past_year, past_month, day) + + if is_future_valid and is_past_valid: + future_date = DateUtils.safe_create_from_value(DateUtils.min_value, future_year, future_month, day) + past_date = DateUtils.safe_create_from_value(DateUtils.min_value, past_year, past_month, day) + elif is_future_valid and not is_past_valid: + future_date = past_date = DateUtils.safe_create_from_value(DateUtils.min_value, future_year, + future_month, day) + elif not is_future_valid and not is_past_valid: + future_date = past_date = DateUtils.safe_create_from_value(DateUtils.min_value, past_year, + past_month, day) + else: + # Fall back to normal cases, might lead to resolution failure + future_date = past_date = DateUtils.safe_create_from_value(DateUtils.min_value, year, month, day) + else: + future_date = past_date = DateUtils.safe_create_from_value(DateUtils.min_value, year, month, day) + + if not has_month: + if future_date < reference: + if DateUtils.is_valid_date(year, month + 1, day): + future_date += datedelta(months=1) + if past_date >= reference: + if DateUtils.is_valid_date(year, month - 1, day): + past_date -= datedelta(months=1) + elif DateUtils.is_Feb_29th(year, month, day): + past_date -= datedelta(months=2) + elif not has_year: + if future_date < reference: + if DateUtils.is_valid_date(year + 1, month, day): + future_date += datedelta(years=1) + if past_date >= reference: + if DateUtils.is_valid_date(year - 1, month, day): + past_date -= datedelta(years=1) + + ret.future_value = future_date + ret.past_value = past_date + ret.success = True + + return ret + + # handle cases like "昨日", "明日", "大后天" + match = RegExpUtility.exact_match(self.config.special_day_regex, source_text, trim=True) + + if match and match.success: + value = reference + datedelta(days=self.config.get_swift_day(match.value)) + ret.timex = DateTimeFormatUtil.luis_date_from_datetime(value) + ret.future_value = ret.past_value = DateUtils.safe_create_from_value(DateUtils.min_value, value.year, value.month, value.day) + ret.success = True + + return ret + + # Handle "今から2日曜日" (2 Sundays from now) + exact_match = RegExpUtility.exact_match(self.config.special_day_with_num_regex, source_text, trim=True) + + if exact_match and exact_match.success: + num_ers = self.config.integer_extractor.extract(source_text) + weekday_str = exact_match.get_group(Date_Constants.WEEKDAY_GROUP_NAME) + + if weekday_str and len(num_ers) > 0: + num = int(self.config.number_parser.parse(num_ers[0]).value) + value = reference + + # Check whether the determined day of this week has passed. + if value.isoweekday() > DayOfWeek(self.config.day_of_week[weekday_str]): + num -= 1 + + while num > 0: + value = DateUtils.next(value, self.get_day_of_week(weekday_str)) + num -= 1 + + ret.timex = DateTimeFormatUtil.luis_date_from_datetime(value) + ret.future_value = DateUtils.safe_create_from_min_value(value.year, value.month, value.day) + ret.past_value = ret.future_value + ret.success = True + + return ret + + # handle "明日から3週間" (3 weeks from tomorrow) + duration_extracted_results = self.config.duration_extractor.extract(source_text, reference) + unit_match = self.config.duration_relative_duration_unit_regex.match(source_text) + is_within = False + within_regex = RegExpUtility.match_end( + self.config.duration_relative_duration_unit_regex, source_text, trim=True) + if within_regex: + is_within = True if within_regex.get_group(Date_Constants.WITHIN_GROUP_NAME) else False + + if (exact_match or is_within) and unit_match and len(duration_extracted_results) > 0 \ + and not unit_match.get_group(Date_Constants.FEW_GROUP_NAME): + pr = self.config.duration_parser.parse(duration_extracted_results[0], reference) + day_str = unit_match.get_group(Date_Constants.LATER_GROUP_NAME) + future = True + swift = 0 + + if pr: + if day_str: + swift = self.config.get_swift_day(day_str) + + result_date_time = DurationParsingUtil.shift_date_time(pr.timex_str, + (reference + datedelta(days=swift)), + future) + ret.timex = f'{DateTimeFormatUtil.luis_date_from_datetime(result_date_time)}' + ret.future_value = past_value = result_date_time + ret.success = True + return ret + + if not ret.success: + ret = self.match_weekday_and_day(source_text, reference) + + if not ret.success: + ret = self.match_this_weekday(source_text, reference) + + if not ret.success: + ret = self.match_next_weekday(source_text, reference) + + if not ret.success: + ret = self.match_last_weekday(source_text, reference) + + if not ret.success: + ret = self.match_weekday_alone(source_text, reference) + + return ret + + def match_weekday_and_day(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + result_value = DateTimeResolutionResult() + + # Handling cases like 'Monday 21', which both 'Monday' and '21' refer to the same date. + # The year of expected date can be different to the year of referenceDate. + match = self.config.week_day_and_day_regex.match(source_text) + + if match: + month = reference.month + year = reference.year + + # Create a extract result which content ordinal string of text + er = ExtractResult() + er.text = match.get_group(Date_Constants.DAY_GROUP_NAME).text + er.start = match.get_group(Date_Constants.DAY_GROUP_NAME).start + er.length = match.get_group(Date_Constants.DAY_GROUP_NAME).length + + # "Parse the day in text into number" + day = self.convert_cjk_to_num(er.text) + + # Firstly, find a latest date with the "day" as pivotDate. Secondly, if the pivotDate equals the + # referenced date, in other word, the day of the referenced date is exactly the "day". In this way, + # check if the pivotDate is the weekday. If so, then the futureDate and the previousDate are the same + # date (referenced date). Otherwise, increase the pivotDate month by month to find the latest futureDate + # and decrease the pivotDate month by month to the latest previousDate. Notice: if the "day" is larger + # than 28, some months should be ignored in the increase or decrease procedure. + + days_in_month = calendar.monthrange(year, month)[1] + if days_in_month >= day: + pivot_date = DateUtils.safe_create_from_min_value(year, month, day) + else: + # Add 1 month is enough, since 1, 3, 5, 7, 8, 10, 12 months has 31 days + pivot_date = DateUtils.safe_create_from_min_value(year, month + 1, day) + + num_week_day_int = pivot_date.isoweekday() % 7 + extracted_week_day_str = match.get_group(Date_Constants.WEEKDAY_GROUP_NAME) + week_day = self.config.day_of_week[extracted_week_day_str] + + if pivot_date != DateUtils.min_value: + + if num_week_day_int == week_day: + # The referenceDate is the weekday and with the "day". + result_value.future_value = datetime(year, month, day) + result_value.past_value = datetime(year, month, day) + result_value.timex = DateTimeFormatUtil.luis_date(year, month, day) + else: + future_date = pivot_date + past_date = pivot_date + + while future_date.isoweekday() % 7 != week_day or future_date.day != day or future_date < reference: + # Increase the futureDate month by month to find the expected date (the "day" is the weekday) + # and make sure the futureDate not less than the referenceDate. + future_date += relativedelta(months=1) + tmp_days_in_month = calendar.monthrange(future_date.year, future_date.month)[1] + if tmp_days_in_month >= day: + # For months like January 31, after add 1 month, February 31 won't be returned, + # so the day should be revised ASAP. + future_date = DateUtils.safe_create_from_value(future_date, future_date.year, + future_date.month, day) + + result_value.future_value = future_date + + while past_date.isoweekday() % 7 != week_day or past_date.day != day or past_date > reference: + # Decrease the pastDate month by month to find the expected date (the "day" is the weekday) and + # make sure the pastDate not larger than the referenceDate. + past_date -= relativedelta(months=1) + tmp_days_in_month = calendar.monthrange(past_date.year, past_date.month)[1] + if tmp_days_in_month >= day: + # For months like March 31, after minus 1 month, February 31 + # won't be returned, so the day should be revised ASAP. + past_date = DateUtils.safe_create_from_value(DateUtils.min_value, past_date.year, + past_date.month, day) + + result_value.past_value = past_date + + if week_day == 0: + week_day = 7 + + result_value.timex = TimexUtil.generate_weekday_timex(week_day) + + result_value.success = True + return result_value + + return result_value + + def match_next_weekday(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + match = RegExpUtility.exact_match(self.config.next_regex, source_text, trim=True) + + if match and match.success: + weekday_key = match.get_group(Date_Constants.WEEKDAY_GROUP_NAME) + value = DateUtils.next(reference, self.get_day_of_week(weekday_key)) + + result.timex = DateTimeFormatUtil.luis_date_from_datetime(value) + result.future_value = result.past_value = DateUtils.safe_create_from_min_value(value.year, value.month, + value.day) + result.success = True + return result + + def match_this_weekday(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + match = RegExpUtility.exact_match(self.config.this_regex, source_text, trim=True) + + if match and match.success: + weekday_key = match.get_group(Date_Constants.WEEKDAY_GROUP_NAME) + value = DateUtils.this(reference, self.get_day_of_week(weekday_key)) + + result.timex = DateTimeFormatUtil.luis_date_from_datetime(value) + result.future_value = result.past_value = DateUtils.safe_create_from_min_value(value.year, value.month, + value.day) + result.success = True + + return result + + def match_last_weekday(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + match = RegExpUtility.exact_match(self.config.last_regex, source_text, trim=True) + + if match and match.success: + weekday_key = match.get_group(Date_Constants.WEEKDAY_GROUP_NAME) + value = DateUtils.last(reference, self.get_day_of_week(weekday_key)) + + result.timex = DateTimeFormatUtil.luis_date_from_datetime(value) + result.future_value = result.past_value = DateUtils.safe_create_from_min_value(value.year, value.month, + value.day) + result.success = True + + return result + + def match_weekday_alone(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + match = RegExpUtility.exact_match(self.config.strict_week_day_regex, source_text, trim=True) + + if match and match.success: + weekday_str = match.get_group(Date_Constants.WEEKDAY_GROUP_NAME) + weekday = self.get_day_of_week(weekday_str) + value = DateUtils.this(reference, weekday) + + if weekday < int(DayOfWeek.MONDAY): + weekday = int(DayOfWeek.SUNDAY) + + if weekday < reference.isoweekday(): + value = DateUtils.next(reference, weekday) + + result.timex = TimexUtil.generate_weekday_timex(weekday) + future_date = past_date = value + + if future_date < reference: + future_date += timedelta(weeks=1) + + if past_date >= reference: + past_date -= timedelta(weeks=1) + + result.future_value = future_date + result.past_value = past_date + result.success = True + + return result + + def parse_weekday_of_month(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + trimmed_source = source_text.strip() + + match = self.config.week_day_of_month_regex.match(trimmed_source) + + if not match: + return ret + + cardinal_str = match.group(Date_Constants.CARDINAL) + weekday_str = match.group(Date_Constants.WEEKDAY_GROUP_NAME) + month_str = match.group(Date_Constants.MONTH_GROUP_NAME) + no_year = False + + if RegExpUtility.exact_match(self.config.last_week_day_regex, cardinal_str, trim=True).success: + cardinal = 5 + else: + cardinal = self.config.cardinal_map.get(cardinal_str) + + weekday = self.config.day_of_week[weekday_str] + + if not month_str: + swift = 0 + + next_month_match = RegExpUtility.match_begin(self.config.next_month_regex, trimmed_source, trim=True) + last_month_match = RegExpUtility.match_begin(self.config.last_month_regex, trimmed_source, trim=True) + + if next_month_match and next_month_match.success: + swift = 1 + elif last_month_match and last_month_match.success: + swift = -1 + + temp = reference + datedelta(months=swift) + month = temp.month + year = temp.year + else: + month = self.config.month_of_year[month_str] + year = reference.year + no_year = True + + value = self.compute_date(cardinal, weekday, month, year) + + if value.month != month: + cardinal -= 1 + value = value - datedelta(days=7) + + future_date = value + past_date = value + + if no_year and future_date < reference: + future_date = self.compute_date(cardinal, weekday, month, year + 1) + + if future_date.month != month: + future_date = future_date - datedelta(days=7) + + if no_year and past_date >= reference: + past_date = self.compute_date(cardinal, weekday, month, year - 1) + + if past_date.month != month: + past_date = past_date - datedelta(days=7) + + # here is a very special case, timeX follows future date + ret.timex = f'XXXX-{month:02d}-WXX-{weekday}-#{cardinal}' + ret.future_value = future_date + ret.past_value = past_date + ret.success = True + + return ret + + # parse a regex match which includes 'day', 'month' and 'year' (optional) group + def match_to_date(self, match: Match, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + month_str = RegExpUtility.get_group(match, Date_Constants.MONTH_GROUP_NAME) + day_str = RegExpUtility.get_group(match, Date_Constants.DAY_GROUP_NAME) + year_str = RegExpUtility.get_group(match, Date_Constants.YEAR_GROUP_NAME) + year_cjk_str = RegExpUtility.get_group(match, Date_Constants.YEAR_CJK_GROUP_NAME) + + month = day = 0 + + tmp = self.convert_cjk_year_to_integer(year_cjk_str) + + year = 0 if tmp == -1 else tmp + + if month_str in self.config.month_of_year and day_str in self.config.day_of_month: + month = self.config.month_of_year[month_str] % 12 if self.config.month_of_year[month_str] > 12 else \ + self.config.month_of_year[month_str] + day = self.config.day_of_month[day_str] % 31 if self.config.day_of_month[day_str] > 31 else \ + self.config.day_of_month[day_str] + + if year_str: + year = int(year_str) + + if 100 > year >= Date_Constants.MIN_TWO_DIGIT_YEAR_PAST_NUM: + year += Date_Constants.BASE_YEAR_PAST_CENTURY + elif 0 <= year < Date_Constants.MAX_TWO_DIGIT_YEAR_FUTURE_NUM: + year += Date_Constants.BASE_YEAR_CURRENT_CENTURY + + no_year = False + + if year == 0: + year = reference.year + ret.timex = DateTimeFormatUtil.luis_date(-1, month, day) + no_year = True + else: + ret.timex = DateTimeFormatUtil.luis_date(year, month, day) + + future_date, past_date = DateUtils.generate_dates(no_year, reference, year, month, day) + + ret.future_value = future_date + ret.past_value = past_date + ret.success = True + return ret + + def compute_date(self, cardinal: int, weekday: int, month: int, year: int) -> datetime: + first_day = DateUtils.safe_create_from_value(DateUtils.min_value, year, month, 1) + first_weekday = DateUtils.this(first_day, self.get_day_of_week(weekday)) + day_of_week_of_first_day = first_day.isoweekday() + + if weekday == 0: + weekday = int(DayOfWeek.SUNDAY) + + if day_of_week_of_first_day == 0: + day_of_week_of_first_day = 7 + + if weekday < day_of_week_of_first_day: + first_weekday = DateUtils.next(first_day, DayOfWeek(weekday)) + + first_weekday = first_weekday + datedelta(days=7 * (cardinal - 1)) + + return first_weekday + + # parse if lunar contains + def is_lunar_calendar(self, text: str) -> bool: + trimmed_source = text.strip() + is_lunar_match = self.config.lunar_regex.match(trimmed_source) + return is_lunar_match + + # Judge if a date is valid + @staticmethod + def is_valid_date(year: int, month: int, day: int) -> bool: + + if month < Date_Constants.MIN_MONTH: + year -= 1 + month = Date_Constants.MAX_MONTH + + if month > Date_Constants.MAX_MONTH: + year += 1 + month = Date_Constants.MIN_MONTH + + return DateUtils.is_valid_date(year, month, day) + + # Handle cases like "三天前" "Three days ago" + def parser_duration_with_ago_and_later(self, source_text: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + num_str = '' + unit_str = '' + + duration_extracted_results = self.config.duration_extractor.extract(source_text, reference) + + if duration_extracted_results: + match = self.config.unit_regex.match(source_text) + + if match: + suffix = source_text[ + duration_extracted_results[0].start + duration_extracted_results[0].length:].strip() + src_unit = match.get_group(Date_Constants.UNIT) + + number_str = source_text[duration_extracted_results[0].start: + match.lastindex - duration_extracted_results.start + 1] + unit_match = self.config.duration_relative_duration_unit_regex.match(source_text) + + few_in_unit_match = unit_match.get_group(Date_Constants.FEW_GROUP_NAME) + + # set the inexact number "数" (few) to 3 for now + number = 3 if number_str == few_in_unit_match else self.convert_cjk_to_num(num_str) + + if not number_str == few_in_unit_match: + if suffix == unit_match.value: + pr = self.config.duration_parser.parse(duration_extracted_results[0], reference) + is_future = suffix == unit_match.get_group(Date_Constants.LATER_GROUP_NAME) + swift = 0 + + if pr: + result_date_time = DurationParsingUtil.shift_date_time(pr.timex_str, + (reference + datedelta(days=swift)), + is_future) + ret.timex = DateTimeFormatUtil.luis_date_from_datetime(result_date_time) + ret.future_value = past_value = result_date_time + ret.success = True + return ret + + if src_unit in self.config.unit_map: + unit_str = self.config.unit_map[src_unit] + unit_type = 'T' if self.config.duration_parser.is_less_than_day(unit_str) else '' + ret.timex = f'P{unit_type}{number_str}{unit_str[0]}' + + date = Date_Constants.INVALID_DATE_STRING + + before_match = self.config.before_regex.match(suffix) + + if before_match and suffix.startswith(before_match): + date = DurationParsingUtil.shift_date_time(ret.timex, reference, False) + + after_match = self.config.after_regex.match(suffix) + if after_match and suffix.startswith(after_match[0]): + date = DurationParsingUtil.shift_date_time(ret.timex, reference, True) + + if date != Date_Constants.INVALID_DATE_STRING: + ret.timex = DateTimeFormatUtil.luis_date_from_datetime(date) + ret.future_value = ret.past_value = date + ret.success = True + return ret + + return ret + + # Convert CJK Number to Integer + def convert_cjk_to_num(self, num_string: str) -> int: + num = -1 + er = self.config.integer_extractor.extract(num_string) + + if er: + if er[0].type == Num_Constants.SYS_NUM_INTEGER: + num = int(self.config.number_parser.parse(er[0]).value) + + return num + + # convert CJK Year to Integer + def convert_cjk_year_to_integer(self, year_cjk_string: str) -> int: + year = num = 0 + + dynasty_year = DateTimeFormatUtil.parse_dynasty_year(year_cjk_string, + self.config.dynasty_year_regex, + self.config.dynasty_start_year, + self.config.dynasty_year_map, + self.config.integer_extractor, + self.config.number_parser) + if dynasty_year and dynasty_year > 0: + return dynasty_year + + er = self.config.integer_extractor.extract(year_cjk_string) + + if er: + if er[0].type == Num_Constants.SYS_NUM_INTEGER: + num = self.config.number_parser.parse(er[0]).value + + if num < 10: + num = 0 + for year in year_cjk_string: + num *= 10 + + er = self.config.integer_extractor.extract(str(year)) + + if er: + if er[0].type == Num_Constants.SYS_NUM_INTEGER: + num += self.config.number_parser.parse(er[0]) + + year = -1 if num < 10 else num + + return year + + def get_month_max_day(self, year, month) -> int: + max_day = self.month_max_days[month - 1] + + if not DateUtils.is_leap_year(year) and month == 2: + max_day -= 1 + return max_day + + def get_day_of_week(self, weekday_key: any) -> DayOfWeek: + if type(weekday_key) == str: + return DayOfWeek.SUNDAY if self.config.day_of_week[weekday_key] == 0 \ + else DayOfWeek(self.config.day_of_week[weekday_key]) + elif type(weekday_key) == int: + return DayOfWeek.SUNDAY if weekday_key == 0 \ + else DayOfWeek(weekday_key) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_dateperiod.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_dateperiod.py new file mode 100644 index 0000000000..d7439ae505 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_dateperiod.py @@ -0,0 +1,2954 @@ +from abc import abstractmethod +from datetime import datetime, timedelta +from re import Pattern +from typing import Dict, List, Match + +from datedelta import datedelta +from regex import regex + +from recognizers_date_time.date_time import Constants +from recognizers_date_time.date_time.base_date import BaseDateParser +from recognizers_date_time.date_time.base_dateperiod import BaseDatePeriodParser +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration, DateTimeExtractor, \ + merge_all_tokens, ExtractResultExtension, Token, DateContext, DateTimeResolutionResult, TimeTypeConstants, \ + DateTimeFormatUtil, DateUtils, TimexUtil, DayOfWeek, DurationParsingUtil, DateTimeOptions +from recognizers_date_time.date_time.utilities.mod_and_date_result import ModAndDateResult +from recognizers_number import BaseNumberParser, BaseNumberExtractor +from recognizers_number import Constants as Num_Constants +from recognizers_text import Metadata, ExtractResult, Extractor, ConditionalMatch, RegExpUtility + + +class CJKDatePeriodExtractorConfiguration(DateTimeOptionsConfiguration): + + @property + @abstractmethod + def simple_cases_regexes(self) -> List[Pattern]: + raise NotImplementedError + + @property + @abstractmethod + def till_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def date_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def range_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def range_suffix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def future_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def past_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def first_last_of_year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def number_combined_with_unit(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def followed_unit(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def date_point_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def integer_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + raise NotImplementedError + + +class BaseCJKDatePeriodExtractor(DateTimeExtractor): + + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_DATEPERIOD + + def __init__(self, config: CJKDatePeriodExtractorConfiguration): + self.config = config + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + if not reference: + reference = datetime.now() + tokens = [] + + tokens += self.match_simple_cases(source) + simple_cases_results = merge_all_tokens(tokens, source, self.extractor_type_name) + tokens += self.match_complex_cases(source, simple_cases_results, reference) + tokens += self.merge_two_time_points(source, reference) + tokens += self.match_number_with_unit(source) + tokens += self.match_duration(source, reference) + + rets = merge_all_tokens(tokens, source, self.extractor_type_name) + + # Remove common ambiguous cases + rets = ExtractResultExtension.filter_ambiguity(rets, source, self.config.ambiguity_filters_dict) + + return rets + + def match_simple_cases(self, source: str) -> List[Token]: + ret = [] + + for regexp in self.config.simple_cases_regexes: + matches = list(regex.finditer(regexp, source)) + for match in matches: + ret.append(Token(match.start(), match.end())) + + return ret + + def match_duration(self, source: str, reference: datetime) -> List[Token]: + ret: List[Token] = list() + durations = [] + duration_extractions = self.config.duration_extractor.extract(source, reference) + + for duration_extraction in duration_extractions: + date_unit_match = self.config.date_unit_regex.match(duration_extraction.text) + + if not date_unit_match: + continue + + durations.append( + Token(duration_extraction.start, duration_extraction.start + duration_extraction.length)) + + for duration in durations: + before_str = source[0:duration.start].lower() + after_str = source[duration.start:duration.start + duration.length] + + if not before_str and not after_str: + continue + + # handle cases with 'within' and 'next' + match_within = RegExpUtility.match_begin(self.config.future_regex, after_str, trim=True) + match_next = RegExpUtility.match_end(self.config.future_regex, after_str, trim=True) + + if match_within and match_next and not match_next.group() == Constants.WITHIN_GROUP_NAME: + if match_next.value == match_within.value: + ret.append(Token(duration.start - match_next.length, duration.end)) + else: + ret.append(Token(duration.start - match_next.length, duration.end + match_within.length)) + elif match_within: + ret.append(Token(duration.start, duration.end + match_within.length)) + elif match_next: + ret.append(Token(duration.start - match_next.length, duration.end)) + + return ret + + # merge two time points + def merge_two_time_points(self, source: str, reference: datetime) -> List[Token]: + ret: List[Token] = list() + er = self.config.date_point_extractor.extract(source, reference) + + if not er: + return ret + + # merge '{TimePoint} 到 {TimePoint}' + idx = 0 + + while idx < len(er) - 1: + middle_begin = er[idx].start + er[idx].length + middle_end = er[idx + 1].start + + if middle_begin >= middle_end: + idx += 1 + continue + + middle_str = source[middle_begin:middle_end - middle_begin].strip() + + if RegExpUtility.exact_match(self.config.till_regex, middle_str, trim=True).success: + period_begin = er[idx].start + period_end = er[idx + 1].start + er[idx].length + + # handle suffix + after_str = source[period_end:] + match = RegExpUtility.match_begin(self.config.range_suffix_regex, after_str, trim=True) + + if match and match.success: + period_end = period_end + match.index + match.length + + # handle prefix + before_str = source[:period_begin] + match = RegExpUtility.match_end(self.config.range_prefix_regex, before_str, trim=True) + + if match and match.success: + period_begin = match.index + + ret.append(Token(period_begin, period_end)) + idx += 2 + continue + idx += 1 + + return ret + + # extract case like "前两年" "前三个月" + def match_number_with_unit(self, source: str) -> List[Token]: + ret: List[Token] = list() + durations: List[Token] = list() + + ers = self.config.integer_extractor.extract(source) + + for er in ers: + after_str = source[er.start + er.length:] + match = RegExpUtility.match_begin(self.config.followed_unit, after_str, trim=True) + + if match and match.success: + durations.append(Token(er.start, er.start + er.length + match.length)) + + if self.config.number_combined_with_unit.match(source): + + for match in self.config.number_combined_with_unit.finditer(source): + durations.append(Token(match.start(), match.end())) + + for duration in durations: + before_str = source[:duration.start] + + if not before_str: + continue + + # Cases like 'first 2 weeks of 2018' (2021年的前2周) + match = RegExpUtility.match_end(self.config.first_last_of_year_regex, before_str, trim=True) + + if match and match.success: + # Check if the unit is compatible (day, week, month) + duration_str = source[duration.start:duration.length] + unit_match = self.config.unit_regex.match(duration_str) + + if unit_match.group(Constants.UNIT_OF_YEAR_GROUP_NAME): + ret.append(Token(match.start, duration.end)) + continue + + match = RegExpUtility.match_end(self.config.past_regex, before_str, trim=True) + + if match and match.success: + ret.append(Token(match.index, duration.end)) + continue + + match = RegExpUtility.match_end(self.config.future_regex, before_str, trim=True) + + if match and match.success: + ret.append(Token(match.index, duration.end)) + + return ret + + # Complex cases refer to the combination of daterange and datepoint + # For Example: from|between {DateRange|DatePoint} to|till|and {DateRange|DatePoint} + def match_complex_cases(self, source: str, simple_cases_results: List[ExtractResult], reference: datetime) \ + -> List[Token]: + er = self.config.date_point_extractor.extract(source, reference) + + # Filter out DateRange results that are part of DatePoint results + # For example, "Feb 1st 2018" => "Feb" and "2018" should be filtered out here + + er.extend(list( + filter( + lambda simple_date_range: not any( + list( + filter( + lambda date_point: date_point.start <= simple_date_range.start and date_point.start + + date_point.length >= simple_date_range.start + simple_date_range.length, + er))), + simple_cases_results)) + ) + + er = list(sorted(er, key=lambda x: x.start)) + + return self.merge_multiple_extractions(source, er) + + def merge_multiple_extractions(self, source: str, extraction_results: List[ExtractResult]) -> List[Token]: + ret: List[Token] = list() + + metadata = Metadata() + metadata.possibly_included_period_end = True + + if len(extraction_results) <= 1: + return ret + + idx = 0 + + while idx < len(extraction_results) - 1: + middle_begin = extraction_results[idx].start + extraction_results[idx].length + middle_end = extraction_results[idx + 1].start + + if middle_begin >= middle_end: + idx += 1 + continue + + middle_str = source[middle_begin:middle_end - middle_begin].strip().lower() + end_point_str = extraction_results[idx + 1].text + start_point_str = extraction_results[idx].text + + if (RegExpUtility.exact_match(self.config.till_regex, middle_str, trim=True) + or (not middle_str and + (RegExpUtility.match_begin(self.config.till_regex, end_point_str, trim=True) or + RegExpUtility.match_end(self.config.till_regex, start_point_str, trim=True)))): + + period_begin = extraction_results[idx].start + period_end = extraction_results[idx + 1].start + extraction_results[idx + 1].length + + # handle "from/between" together with till words (till/until/through...) + before_str = source[:period_begin] + + before_match = RegExpUtility.match_end(self.config.range_prefix_regex, before_str, trim=True) + + if before_match: + period_begin = before_match.index + else: + after_str = source[period_end:] + + after_match = RegExpUtility.match_begin(self.config.range_suffix_regex, after_str, trim=True) + + if after_match: + period_end += after_match.index + after_match.length + + ret.append(Token(period_begin, period_begin, metadata)) + + idx += 2 + continue + idx += 1 + + return ret + + +class CJKDatePeriodParserConfiguration(DateTimeOptionsConfiguration): + + @property + @abstractmethod + def integer_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def number_parser(self) -> BaseNumberParser: + raise NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_extractor(self) -> Extractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> BaseDateParser: + raise NotImplementedError + + @property + @abstractmethod + def dynasty_year_map(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_map(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def day_of_month(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def month_of_year(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def season_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def dynasty_start_year(self) -> str: + raise NotImplementedError + + @property + @abstractmethod + def token_before_date(self) -> str: + raise NotImplementedError + + @property + @abstractmethod + def two_num_year(self) -> int: + raise NotImplementedError + + @property + @abstractmethod + def simple_cases_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def dynasty_year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def relative_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def relative_month_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def duration_relative_duration_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def this_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def last_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def next_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def year_to_year(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def year_to_year_suffix_required(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def year_in_cjk_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def month_to_month(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def month_to_month_suffix_required(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def month_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def year_and_month(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def pure_num_year_and_month(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def one_word_period_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def number_combined_with_unit(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def past_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def future_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def week_with_week_day_range_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def duration_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def week_of_month_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def week_of_year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def week_of_date_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def month_of_date_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def which_week_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def first_last_of_year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def season_with_year(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def quarter_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def decade_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def century_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def day_to_day(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def month_day_range(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def day_regex_for_period(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def simple_year_and_month(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def special_month_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def special_year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def later_early_period_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def date_point_with_ago_and_later(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def reference_date_period_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def wom_last_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def wom_previous_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def wom_next_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def complex_date_period_regex(self) -> Pattern: + raise NotImplementedError + + @abstractmethod + def to_month_number(self, month_str: str) -> int: + raise NotImplementedError + + @abstractmethod + def is_month_only(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_weekend(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_week_only(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_year_only(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_this_year(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_year_to_date(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_last_year(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_next_year(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_year_after_next(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def is_year_before_last(self, source: str) -> bool: + raise NotImplementedError + + @abstractmethod + def get_swift_month(self, source: str): + raise NotImplementedError + + @abstractmethod + def get_swift_year(self, source: str): + raise NotImplementedError + + +class BaseCJKDatePeriodParser(DateTimeParser): + + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_DATEPERIOD + + def __init__(self, config: CJKDatePeriodParserConfiguration, inclusive_end_period: bool = False): + self.config = config + self._inclusive_end_period = inclusive_end_period + + def get_year_context(self, start_date_str: str, end_date_str: str, source: str) -> DateContext: + is_end_date_pure_year = False + context_year = Constants.INVALID_YEAR + + year_match_for_end_date = self.config.year_regex.match(end_date_str) + + if year_match_for_end_date and (year_match_for_end_date.end() - year_match_for_end_date.start()) == len(end_date_str): + is_end_date_pure_year = True + + relative_match_for_start_date = self.config.relative_regex.match(start_date_str) + relative_match_for_end_date = self.config.relative_regex.match(end_date_str) + is_date_relative = relative_match_for_start_date or relative_match_for_end_date + + if not is_end_date_pure_year and not is_date_relative: + + for match in self.config.year_regex.finditer(source): + year = self.get_year_from_text(match) + if year != Constants.INVALID_YEAR: + context_year = year + else: + # this indicates that the text has two different year value, no common context year + if context_year != year: + context_year = Constants.INVALID_YEAR + break + + result: DateContext = DateContext() + result.year = context_year + + return result + + def parse(self, er: ExtractResult, reference: datetime) -> DateTimeParseResult: + if not reference: + reference = datetime.now() + result_value = None + + if er.type == self.parser_type_name: + source_text = er.text.strip().lower() + inner_result = self.parse_base_date_period(source_text, reference) + + if not inner_result.success: + inner_result = self.parse_complex_date_period(source_text, reference) + + if inner_result.success: + + if inner_result.mod == Constants.BEFORE_MOD: + inner_result.future_resolution = { + TimeTypeConstants.END_DATE: DateTimeFormatUtil.format_date(inner_result.future_value[0]) + } + inner_result.past_resolution = { + TimeTypeConstants.END_DATE: DateTimeFormatUtil.format_date(inner_result.past_value[0]) + } + + elif inner_result.mod == Constants.AFTER_MOD: + inner_result.future_resolution = { + TimeTypeConstants.START_DATE: DateTimeFormatUtil.format_date(inner_result.future_value[0]) + } + inner_result.past_resolution = { + TimeTypeConstants.START_DATE: DateTimeFormatUtil.format_date(inner_result.past_value[0]) + } + + elif inner_result.future_value and inner_result.past_value: + inner_result.future_resolution = { + TimeTypeConstants.START_DATE: DateTimeFormatUtil.format_date(inner_result.future_value[0]), + TimeTypeConstants.END_DATE: DateTimeFormatUtil.format_date( + inner_result.future_value[1]) + } + inner_result.past_resolution = { + TimeTypeConstants.START_DATE: DateTimeFormatUtil.format_date(inner_result.past_value[0]), + TimeTypeConstants.END_DATE: DateTimeFormatUtil.format_date( + inner_result.past_value[1]) + } + + else: + inner_result.future_resolution = inner_result.past_resolution = {} + + result_value = inner_result + + ret = DateTimeParseResult(er) + ret.text = er.text + ret.start = er.start + ret.length = er.length + ret.type = er.type + ret.meta_data = er.meta_data + ret.value = result_value + ret.timex_str = result_value.timex if result_value else '' + ret.resolution_str = '' + + return ret + + def parse_base_date_period(self, source: str, reference: datetime, + date_context: DateContext = None) -> DateTimeResolutionResult: + + inner_result = self.parse_simple_cases(source, reference) + + if not inner_result.success: + inner_result = self.parse_duration(source, reference) + if not inner_result.success: + inner_result = self.parse_one_word_period(source, reference) + if not inner_result.success: + inner_result = self.parse_number_with_unit(source, reference) + if not inner_result.success: + inner_result = self.parse_day_to_day(source, reference) + if not inner_result.success: + inner_result = self.merge_two_time_points(source, reference) + if not inner_result.success: + inner_result = self.parse_year_and_month(source, reference) + if not inner_result.success: + inner_result = self.parse_year_to_year(source, reference) + if not inner_result.success: + inner_result = self.parse_month_to_month(source, reference) + if not inner_result.success: + inner_result = self.parse_year(source, reference) + if not inner_result.success: + inner_result = self.parse_week_of_month(source, reference) + if not inner_result.success: + inner_result = self.parse_week_of_year(source, reference) + if not inner_result.success: + inner_result = self.parse_week_of_date(source, reference) + if not inner_result.success: + inner_result = self.parse_month_of_date(source, reference) + if not inner_result.success: + inner_result = self.parse_which_week(source, reference) + if not inner_result.success: + inner_result = self.parse_season(source, reference) + if not inner_result.success: + inner_result = self.parse_quarter(source, reference) + if not inner_result.success: + inner_result = self.parse_decade(source, reference) + if not inner_result.success: + inner_result = self.parse_century(source, reference) + # if not inner_result.success: + # inner_result = self.parse_date_point_with_ago_and_later(source, reference) + if not inner_result.success and date_context: + inner_result = date_context.process_date_period_entity_resolution(inner_result) + + return inner_result + + def get_year_from_text(self, match: Match) -> int: + year = Constants.INVALID_YEAR + + year_str = match.group(Constants.YEAR_GROUP_NAME) + written_year_str = match.groupdict().get(Constants.FULL_YEAR_GROUP_NAME) + + if year_str and year_str != written_year_str: + year = self.convert_cjk_to_integer(year_str) + + if 100 > year >= Constants.MIN_TWO_DIGIT_YEAR_PAST_NUM: + year += Constants.BASE_YEAR_PAST_CENTURY + elif 0 <= year < Constants.MAX_TWO_DIGIT_YEAR_FUTURE_NUM: + year += Constants.BASE_YEAR_CURRENT_CENTURY + else: + first_two_year_num_str = match.group(Constants.FIRST_TWO_YEAR_NUM) + + if first_two_year_num_str: + er = ExtractResult() + er.text = first_two_year_num_str + er.start = match.get_group(Constants.FIRST_TWO_YEAR_NUM).start + er.length = match.get_group(Constants.FIRST_TWO_YEAR_NUM).length + + first_two_year_num = int(self.config.number_parser.parse(er).value) + + last_two_year_num = 0 + last_two_year_num_str = match.get_group(Constants.LAST_TWO_YEAR_NUM) + + if last_two_year_num_str: + er.text = last_two_year_num_str + er.start = match.group(Constants.LAST_TWO_YEAR_NUM).start + er.length = match.group(Constants.LAST_TWO_YEAR_NUM).length + + last_two_year_num = self.config.number_parser.parse(er) + + # Exclude pure number like "nineteen", "twenty four" + if (first_two_year_num < 100 and last_two_year_num == 0) or \ + (first_two_year_num < 100 and first_two_year_num % 10 == 0 and len( + last_two_year_num_str.strip().split(' ')) == 1): + year = Constants.INVALID_YEAR + return year + if first_two_year_num >= 100: + year = first_two_year_num + last_two_year_num + else: + year = (first_two_year_num * 100) + last_two_year_num + else: + if written_year_str: + er = ExtractResult + er.text = written_year_str + er.start = match.group(Constants.FULL_YEAR_GROUP_NAME).start + er.length = match.group(Constants.FULL_YEAR_GROUP_NAME).length + + year = int(self.config.number_parser.parse(er).value) + + if 100 > year >= Constants.MIN_TWO_DIGIT_YEAR_PAST_NUM: + year += Constants.BASE_YEAR_PAST_CENTURY + elif 0 <= year < Constants.MAX_TWO_DIGIT_YEAR_FUTURE_NUM: + year += Constants.BASE_YEAR_CURRENT_CENTURY + + return year + + def shift_resolution(self, date: [datetime, datetime], match: Match, start: bool) -> datetime: + result = date[0] + return result + + def convert_cjk_to_num(self, num_str: str) -> int: + num = -1 + er = self.config.integer_extractor.extract(num_str) + + if er and er[0].type == Num_Constants.SYS_NUM_INTEGER: + num = int(self.config.number_parser.parse(er[0]).value) + + return num + + # Convert CJK Year to Integer + def convert_cjk_to_integer(self, year_cjk_str: str) -> int: + num = 0 + + dynasty_year = DateTimeFormatUtil.parse_dynasty_year(year_cjk_str, + self.config.dynasty_year_regex, + self.config.dynasty_start_year, + self.config.dynasty_year_map, + self.config.integer_extractor, + self.config.number_parser) + + if dynasty_year and dynasty_year > 0: + return dynasty_year + + er = self.config.integer_extractor.extract(year_cjk_str) + + if er and er[0].type == Num_Constants.SYS_NUM_INTEGER: + num = int(self.config.number_parser.parse(er[0]).value) + + if num < 10: + num = 0 + + for ch in year_cjk_str: + + num *= 10 + er = next(iter(self.config.integer_extractor.extract(ch)), None) + if er and er.type == Num_Constants.SYS_NUM_INTEGER: + num += int(self.config.number_parser.parse(er).value) + year = num + else: + year = num + + return -1 if year == 0 else year + + def parse_single_time_point(self, source: str, reference: datetime, date_context: DateContext = None) \ + -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + er = self.config.date_extractor.extract(source, reference)[0] + + if er: + pr = self.config.date_parser.parse(er, reference) + + if pr: + ret.timex = f'({pr.timex_str})' + ret.future_value = pr.value.future_value + ret.past_value = pr.value.past_value + ret.success = True + + return ret + + def parse_simple_cases(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + year = reference.year + month = reference.month + + no_year = False + input_year = False + + match = self.config.simple_cases_regex.search(source) + + if not match: + match = self.config.month_day_range.search(source) + + if match: + days = match.captures(Constants.DAY_GROUP_NAME) + begin_day = self.config.day_of_month[days[0]] + end_day = self.config.day_of_month[days[1]] + + month_str = match.group(Constants.MONTH_GROUP_NAME) + year_str = match.group(Constants.YEAR_GROUP_NAME) + + if year_str: + year = self.parse_num_year(year_str) + + input_year = True + else: + no_year = True + + if month_str: + month = self.config.to_month_number(month_str) + else: + month_str = match.group(Constants.REL_MONTH) + this_match = self.config.this_regex.match(month_str) + next_match = self.config.next_regex.match(month_str) + + if this_match: + pass + elif next_match: + if month != 12: + month += 1 + else: + month = 1 + year += 1 + else: + if month != 1: + month -= 1 + else: + month = 12 + year -= 1 + + begin_luis_str = DateTimeFormatUtil.luis_date(year if input_year or self.config.this_regex.match(month_str) + or self.config.next_regex.match(month_str) else -1, + month, begin_day) + end_luis_str = DateTimeFormatUtil.luis_date(year if input_year or self.config.this_regex.match(month_str) + or self.config.next_regex.match(month_str) else -1, + month, end_day) + + else: + match = RegExpUtility.exact_match(self.config.special_year_regex, source, trim=True) + + if match and match.success: + value = reference + datedelta(years=self.config.get_swift_year(match)) + ret.timex = DateTimeFormatUtil.luis_date_from_datetime(value) + ret.future_value = ret.past_value = value + ret.success = True + + return ret + + return ret + + future_begin_dates, past_begin_dates = DateUtils.generate_dates(no_year, reference, year, month, begin_day) + future_end_dates, past_end_dates = DateUtils.generate_dates(no_year, reference, year, month, end_day) + + ret.timex = f'({begin_luis_str},{end_luis_str},P{end_day - begin_day}D)' + ret.future_value = [future_begin_dates, future_end_dates] + ret.past_value = [past_begin_dates, past_end_dates] + ret.success = True + + return ret + + def parse_year_to_year(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = self.config.year_to_year.match(source) + + if not match: + match = self.config.year_to_year_suffix_required.match(source) + + if match: + year_match = list(self.config.year_regex.finditer(source)) + year_in_cjk_match = list(self.config.year_in_cjk_regex.finditer(source)) + + begin_year = 0 + end_year = 0 + + if len(year_match) == 2: + begin_year = self.convert_cjk_to_integer(year_match[0].group(Constants.YEAR_GROUP_NAME)) + end_year = self.convert_cjk_to_integer(year_match[1].group(Constants.YEAR_GROUP_NAME)) + + elif len(year_in_cjk_match) == 2: + begin_year = self.convert_cjk_to_integer(year_in_cjk_match[0].group(Constants.YEAR_CJK_GROUP_NAME)) + end_year = self.convert_cjk_to_integer(year_in_cjk_match[1].group(Constants.YEAR_CJK_GROUP_NAME)) + + elif len(year_in_cjk_match) == 1 and len(year_match) == 1: + + if year_match[0].start < year_in_cjk_match[0].start: + begin_year = int(year_match[0].get_group(Constants.YEAR_GROUP_NAME)) + end_year = self.convert_cjk_to_integer( + year_in_cjk_match[0].get_group(Constants.YEAR_CJK_GROUP_NAME)) + + else: + begin_year = self.convert_cjk_to_integer( + year_in_cjk_match[0].get_group(Constants.YEAR_CJK_GROUP_NAME)) + end_year = int(year_match[0].get_group(Constants.YEAR_GROUP_NAME)) + + if 100 > begin_year >= self.config.two_num_year: + begin_year += Constants.BASE_YEAR_PAST_CENTURY + elif begin_year < 100 and begin_year < self.config.two_num_year: + begin_year += Constants.BASE_YEAR_CURRENT_CENTURY + + if 100 > end_year >= self.config.two_num_year: + end_year += Constants.BASE_YEAR_PAST_CENTURY + elif end_year < 100 and end_year < self.config.two_num_year: + end_year += Constants.BASE_YEAR_CURRENT_CENTURY + + begin_day = DateUtils.safe_create_from_min_value(begin_year, 1, 1) + end_day = DateUtils.safe_create_from_min_value(end_year, 1, 1) + ret.timex = TimexUtil.generate_date_period_timex(begin_day, end_day, timex_type=3) + ret.future_value = ret.past_value = [begin_day, end_day] + ret.success = True + + return ret + + return ret + + # handle like "3月到5月", "3月和5月之间" + def parse_month_to_month(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = self.config.month_to_month.match(source) + + if not match: + match = self.config.month_to_month_suffix_required.match(source) + + if match: + month_match = RegExpUtility.get_matches(self.config.month_regex, source) + + begin_month = 0 + end_month = 0 + + if len(month_match) == 2: + begin_month = self.config.to_month_number(month_match[0].get_group(Constants.MONTH_GROUP_NAME)) + end_month = self.config.to_month_number(month_match[1].get_group(Constants.MONTH_GROUP_NAME)) + + elif match.group(Constants.MONTH_FROM_GROUP_NAME) and match.group(Constants.MONTH_TO_GROUP_NAME): + begin_month = self.config.to_month_number(match.group(Constants.MONTH_FROM_GROUP_NAME)) + end_month = self.config.to_month_number(match.group(Constants.MONTH_TO_GROUP_NAME)) + + year_match = RegExpUtility.get_matches(self.config.year_regex, source) + has_year = False + + if len(year_match) > 0 and match.get_group(Constants.YEAR_GROUP_NAME): + has_year = True + + if len(year_match) == 2: + begin_year = self.parse_num_year(year_match[0].get_group(Constants.YEAR_GROUP_NAME)) + end_year = self.parse_num_year(year_match[1].get_group(Constants.YEAR_GROUP_NAME)) + + else: + begin_year = end_year = self.parse_num_year(year_match[0].get_group(Constants.YEAR_GROUP_NAME)) + + else: + begin_year = end_year = reference.year + + curr_year = reference.year + curr_month = reference.month + begin_year_for_past_resolution = begin_year + end_year_for_past_resolution = end_year + begin_year_for_future_resolution = begin_year + end_year_for_future_resolution = end_year + duration_months = 0 + + if has_year: + diff_months = end_month - begin_month + diff_year = end_year - begin_year + + duration_months = (diff_year * 12) + diff_months + + else: + if begin_month < end_month: + + # For this case, FutureValue and PastValue share the same resolution + if begin_month < curr_month <= end_month: + # Keep the beginYear and endYear equal to currentYear + pass + + elif begin_month >= curr_month: + begin_year_for_past_resolution = end_year_for_past_resolution = curr_year - 1 + + elif end_month < curr_month: + begin_year_for_future_resolution = end_year_for_future_resolution = curr_year + 1 + + duration_months = end_month - begin_month + + elif begin_month > end_month: + + # For this case, FutureValue and PastValue share the same resolution + if begin_month < curr_month: + end_year_for_past_resolution = end_year_for_future_resolution = curr_year + 1 + else: + begin_year_for_past_resolution = curr_year - 1 + end_year_for_future_resolution = curr_year + 1 + + duration_months = begin_month - end_month + + if duration_months != 0: + begin_date_for_past_resolution = DateUtils.safe_create_from_min_value(begin_year_for_past_resolution, + begin_month, 1) + end_date_for_past_resolution = DateUtils.safe_create_from_min_value(end_year_for_past_resolution, + end_month, 1) + begin_date_for_future_resolution = DateUtils.safe_create_from_min_value( + begin_year_for_future_resolution, + begin_month, 1) + end_date_for_future_resolution = DateUtils.safe_create_from_min_value(end_year_for_future_resolution, + end_month, 1) + + day_match = RegExpUtility.get_matches(self.config.day_regex_for_period, source) + + # handle cases like 2019年2月1日から3月まで + if day_match and match.get_group(Constants.DAY_GROUP_NAME): + ret.timex = TimexUtil.generate_date_period_timex(begin_date_for_future_resolution, + end_date_for_future_resolution, 0, + begin_date_for_past_resolution, + end_date_for_past_resolution, has_year) + + # If the year is not specified, the combined range timex will use fuzzy years. + else: + ret.timex = TimexUtil.generate_date_period_timex(begin_date_for_future_resolution, + end_date_for_future_resolution, 2, + begin_date_for_past_resolution, + end_date_for_past_resolution, has_year) + + ret.past_value = [begin_date_for_past_resolution, end_date_for_past_resolution] + ret.future_value = [begin_date_for_future_resolution, end_date_for_future_resolution] + ret.success = True + + return ret + + def parse_num_year(self, year_num: str) -> int: + year = self.convert_cjk_to_integer(year_num) + + if 100 > year >= self.config.two_num_year: + year += Constants.BASE_YEAR_PAST_CENTURY + elif year < 100 and year < self.config.two_num_year: + year += Constants.BASE_YEAR_CURRENT_CENTURY + + return year + + def parse_day_to_day(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = self.config.day_to_day.match(source) + + if match: + day_match_match = list(regex.finditer(self.config.day_regex_for_period, source)) + + begin_day = end_day = 0 + + if len(day_match_match) == 2: + day_from = RegExpUtility.get_group(day_match_match[0], Constants.DAY_GROUP_NAME) + day_to = RegExpUtility.get_group(day_match_match[1], Constants.DAY_GROUP_NAME) + + begin_day = self.config.day_of_month[day_from] + end_day = self.config.day_of_month[day_to] + + elif match.group(Constants.HALF_GROUP_NAME): + er = self.config.duration_extractor.extract(match.group(Constants.HALF_GROUP_NAME), reference) + pr = self.config.duration_parser.parse(er[0], reference) + + num = TimexUtil.parse_number_from_duration_timex(pr.timex_str) + + begin_day_2 = reference + end_day_2 = reference + datedelta(days=num) + + ret.timex = TimexUtil.generate_date_period_timex(begin_day_2, end_day_2, timex_type=0) + ret.past_value = ret.future_value = [begin_day_2, end_day_2] + ret.success = True + return ret + + begin_year_for_past_resolution = reference.year + end_year_for_past_resolution = reference.year + begin_year_for_future_resolution = reference.year + end_year_for_future_resolution = reference.year + + curr_day = reference.day + duration_months = duration_days = 0 + + relative_month = self.config.relative_month_regex.match(source) + curr_month = reference + datedelta(months=self.config.get_swift_month(relative_month.value)) \ + if relative_month else reference.month + + begin_month_for_past_resolution = curr_month + end_month_for_past_resolution = curr_month + begin_month_for_future_resolution = curr_month + end_month_for_future_resolution = curr_month + + if begin_day < end_day: + + # For this case, FutureValue and PastValue share the same resolution + if begin_day < curr_day <= end_day: + # Keep the beginMonth and endMonth equal to currentMonth + pass + + elif begin_day >= curr_day: + if curr_month == 1: + begin_month_for_past_resolution = end_month_for_past_resolution = Constants.MAX_MONTH + begin_year_for_past_resolution -= 1 + end_year_for_past_resolution -= 1 + else: + begin_month_for_past_resolution = end_month_for_past_resolution = curr_month - 1 + + elif end_day < curr_day: + if curr_month == Constants.MAX_MONTH: + begin_month_for_future_resolution = end_month_for_future_resolution = 1 + begin_year_for_future_resolution += 1 + end_year_for_future_resolution += 1 + else: + begin_month_for_future_resolution = end_month_for_future_resolution = curr_month + 1 + + duration_days = end_day - begin_day + + elif begin_day > end_day: + + # For this case, FutureValue and PastValue share the same resolution + if begin_day < curr_day: + if curr_month == Constants.MAX_MONTH: + end_month_for_past_resolution = end_month_for_future_resolution = 1 + end_year_for_past_resolution += 1 + end_year_for_future_resolution += 1 + else: + end_month_for_past_resolution = end_month_for_future_resolution = curr_month + 1 + else: + if curr_month == Constants.MAX_MONTH: + begin_month_for_past_resolution = curr_month - 1 + end_month_for_future_resolution = 1 + end_year_for_future_resolution += 1 + elif curr_month == 1: + begin_month_for_past_resolution = 12 + begin_year_for_past_resolution -= 1 + end_month_for_future_resolution = curr_month + 1 + else: + begin_month_for_past_resolution = curr_month - 1 + end_month_for_future_resolution = curr_month + 1 + duration_days = begin_day - end_day + + if duration_days != 0: + begin_date_for_past_resolution = DateUtils.safe_create_from_min_value(begin_year_for_past_resolution, + begin_month_for_past_resolution, + begin_day) + end_date_for_past_resolution = DateUtils.safe_create_from_min_value(end_year_for_past_resolution, + end_month_for_past_resolution, + end_day) + begin_date_for_future_resolution = DateUtils.safe_create_from_min_value( + begin_year_for_future_resolution, + begin_month_for_future_resolution, + begin_day) + end_date_for_future_resolution = DateUtils.safe_create_from_min_value(end_year_for_future_resolution, + end_month_for_future_resolution, + end_day) + + if relative_month: + ret.timex = TimexUtil.generate_date_period_timex(begin_date_for_future_resolution, + end_date_for_future_resolution, 0) + else: + ret.timex = TimexUtil.generate_date_period_timex(begin_date_for_future_resolution, + end_date_for_future_resolution, 0, + has_year=False, has_month=False) + + ret.past_value = [begin_date_for_past_resolution, end_date_for_past_resolution] + ret.future_value = [begin_date_for_future_resolution, end_date_for_future_resolution] + ret.success = True + + return ret + + # for case "2016年5月" + def parse_year_and_month(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = RegExpUtility.exact_match(self.config.year_and_month, source, trim=True) + + if not match or not match.success: + match = RegExpUtility.exact_match(self.config.pure_num_year_and_month, source, trim=True) + + if not match or not match.success: + return ret + + year = reference.year + year_num = match.get_group(Constants.YEAR_GROUP_NAME) + year_cjk = match.get_group(Constants.YEAR_CJK_GROUP_NAME) + year_rel = match.get_group(Constants.YEAR_RELATIVE) + cardinal_str = match.get_group(Constants.CARDINAL) + + if year_num: + if self.config.is_year_only(year_num): + year_num = year_num[:len(year_num) - 1] + + year = self.convert_cjk_to_integer(year_num) + + elif year_cjk: + if self.config.is_year_only(year_cjk): + year_cjk = year_cjk[:len(year_num) - 1] + + year = self.convert_cjk_to_integer(year_cjk) + + elif year_rel: + if self.config.is_last_year(year_rel): + year -= 1 + elif self.config.is_next_year(year_rel): + year += 1 + + if 100 > year >= self.config.two_num_year: + year += int(Constants.BASE_YEAR_PAST_CENTURY) + elif year < self.config.two_num_year: + year += int(Constants.BASE_YEAR_CURRENT_CENTURY) + + month_str = match.get_group(Constants.MONTH_GROUP_NAME) + + if month_str: + month = self.config.to_month_number(month_str) + elif RegExpUtility.exact_match(self.config.wom_last_regex, cardinal_str, trim=True).success: + month = 12 + else: + month = self.config.cardinal_map[cardinal_str] + + begin_day = DateUtils.safe_create_from_min_value(year, month, 1) + + if month == 12: + end_day = DateUtils.safe_create_from_min_value(year + 1, 1, 1) + else: + end_day = DateUtils.safe_create_from_min_value(year, month + 1, 1) + + ret.timex = DateTimeFormatUtil.luis_date(year, month, 1) + ret.future_value = ret.past_value = [begin_day, end_day] + ret.success = True + return ret + + # case like "今年三月" "这个周末" "五月" + def parse_one_word_period(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + year = reference.year + month = reference.month + future_year = past_year = year + + is_reference_date_period = False + + trimmed_source = source.lower() + match = RegExpUtility.exact_match(self.config.one_word_period_regex, trimmed_source, trim=True) + + # For cases "that week|month|year" + if not match: + match = RegExpUtility.exact_match(self.config.reference_date_period_regex, trimmed_source, trim=True) + + if match and match.success: + is_reference_date_period = True + ret.mod = TimeTypeConstants.REF_UNDEF_MOD + + if not match: + match = RegExpUtility.exact_match(self.config.later_early_period_regex, trimmed_source, trim=True) + + if match and match.success: + self.parse_later_early_period(source, reference) + + if match and match.success: + month_str = match.get_group(Constants.MONTH_GROUP_NAME) + + if self.config.is_this_year(trimmed_source): + ret.timex = TimexUtil.generate_year_timex(reference) + ret.future_value = ret.past_value = [DateUtils.safe_create_from_min_value(year, 1, 1), reference] + ret.success = True + return ret + + if self.config.is_year_to_date(trimmed_source): + ret.timex = TimexUtil.generate_year_timex(reference.year) + ret.future_value = ret.past_value = [DateUtils.safe_create_from_min_value(year, 1, 1), reference] + ret.success = True + return ret + + next_match = self.config.next_regex.match(trimmed_source) + last_match = self.config.last_regex.match(trimmed_source) + + if month_str: + + swift = -10 + year_rel = match.get_group(Constants.YEAR_RELATIVE) + + if year_rel: + if self.config.is_next_year(year_rel): + swift = 1 + elif self.config.is_last_year(year_rel): + swift = -1 + elif self.config.is_this_year(year_rel): + swift = 0 + + month = self.config.to_month_number(month_str) + + if swift >= -1: + year += swift + ret.timex = DateTimeFormatUtil.luis_date(year, month, 1) + future_year = past_year = year + else: + ret.timex = DateTimeFormatUtil.luis_date(Constants.INVALID_YEAR, month, 1) + + if month < reference.month: + future_year += 1 + + if month >= reference.month: + past_year -= 1 + else: + swift = 0 + if next_match: + if next_match.group(Constants.AFTER_MOD): + swift = 2 + else: + swift = 1 + elif last_match: + swift = -1 + + # Handle cases with "(上|下)半" like "上半月"、 "下半年" + if match.get_group(Constants.HALF_TAG_GROUP_NAME): + return self.handle_with_half_tag(source, reference, ret, swift) + + if self.config.is_week_only(trimmed_source): + monday = DateUtils.this(reference, DayOfWeek.MONDAY) + datedelta(days=7 * swift) + ret.timex = TimexUtil.generate_week_timex() if is_reference_date_period else \ + TimexUtil.generate_week_timex(monday) + ret.future_value = ret.past_value = [monday, DateUtils.this(reference, DayOfWeek.SUNDAY) + + datedelta(days=7 * swift) + datedelta(days=1)] + ret.success = True + + return ret + elif match.get_group(Constants.REST_OF_GROUP_NAME): + duration_str = match.get_group(Constants.SYS_DATETIME_DURATION) + duration_unit = self.config.unit_map[duration_str] + begin_date = end_date = reference + + ret.timex = TimexUtil.generate_date_period_timex_with_diff(begin_date, end_date, duration_unit) + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + return ret + + if self.config.is_weekend(trimmed_source): + begin_date = DateUtils.this(reference, DayOfWeek.SATURDAY) + datedelta(days=7 * swift) + end_date = DateUtils.this(reference, DayOfWeek.SUNDAY) + datedelta(days=7 * swift) + + match = RegExpUtility.exact_match(self.config.reference_date_period_regex, trimmed_source, + trim=True) + + if match and match.success: + is_reference_date_period = True + ret.mod = TimeTypeConstants.REF_UNDEF_MOD + + ret.timex = TimexUtil.generate_weekend_timex() if is_reference_date_period else \ + TimexUtil.generate_weekend_timex(begin_date) + ret.future_value = ret.past_value = [begin_date, end_date + datedelta(days=1)] + ret.success = True + return ret + + if self.config.is_month_only(trimmed_source): + month = int(reference.month + swift) + year = int(reference.year + swift) + ret.timex = DateTimeFormatUtil.luis_date(year, month, reference.day) + ret.timex = TimexUtil.generate_month_timex() if is_reference_date_period else \ + DateTimeFormatUtil.luis_date(year, month, 1) + future_year = past_year = year + + elif self.config.is_year_only(trimmed_source): + + # Handle like "今年上半年","明年下半年" + swift = 0 + trimmed_source, has_half, is_first_half = self.handle_with_half_year(match, trimmed_source) + swift = 0 if has_half else swift + + year = int(reference.year) + swift + + if self.config.is_last_year(trimmed_source): + year -= 1 + elif self.config.is_next_year(trimmed_source): + year += 1 + elif self.config.is_year_before_last(trimmed_source): + year -= 2 + elif self.config.is_year_after_next(trimmed_source): + year += 2 + + return self.handle_year_result(ret, year, is_reference_date_period, has_half, is_first_half) + + else: + return ret + + # only "month" will come to here + + ret.future_value = [DateUtils.safe_create_from_min_value(future_year, month, 1), + DateUtils.safe_create_from_min_value(future_year, month, 1) + datedelta(months=1)] + ret.past_value = [DateUtils.safe_create_from_min_value(past_year, month, 1), + DateUtils.safe_create_from_min_value(past_year, month, 1) + datedelta(months=1)] + + ret.success = True + + return ret + + def parse_later_early_period(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + year = reference.year + month = reference.month + + future_year = past_year = year + + early_prefix = False + late_prefix = False + mid_prefix = False + earlier_prefix = False + later_prefix = False + is_reference_date_period = False + + trimmed_source = source.lower() + + match = RegExpUtility.exact_match(self.config.later_early_period_regex, trimmed_source, trim=True) + + if match and match.success: + if match.get_group(Constants.EARLY_PREFIX): + early_prefix = True + trimmed_source = str(match.get_group(Constants.SUFFIX_GROUP_NAME)) + ret.mod = TimeTypeConstants.EARLY_MOD + + elif match.get_group(Constants.LATE_PREFIX): + late_prefix = True + trimmed_source = str(match.get_group(Constants.SUFFIX_GROUP_NAME)) + ret.mod = TimeTypeConstants.LATE_MOD + + elif match.get_group(Constants.MID_PREFIX): + mid_prefix = True + trimmed_source = str(match.get_group(Constants.SUFFIX_GROUP_NAME)) + ret.mod = TimeTypeConstants.MID_MOD + + swift = 0 + if match.get_group(Constants.MONTH_GROUP_NAME): + swift = self.config.get_swift_year(trimmed_source) + else: + if match.get_group(Constants.NEXT_GROUP_NAME): + swift = 1 + elif match.get_group(Constants.LAST_GROUP_NAME): + swift = -1 + + if match.get_group(Constants.REL_EARLY): + earlier_prefix = True + if BaseDatePeriodParser.is_present(swift): + ret.mod = None + elif match.get_group(Constants.REL_LATE): + later_prefix = True + if BaseDatePeriodParser.is_present(swift): + ret.mod = None + + month_str = match.get_group(Constants.MONTH_GROUP_NAME) + + # Parse expressions "till date", "to date" + if match.get_group(Constants.TO_DATE_GROUP_NAME): + ret.timex = "PRESENT_REF" + ret.future_value = ret.past_value = reference + ret.mod = TimeTypeConstants.BEFORE_MOD + ret.success = True + return ret + + if month_str: + + swift = self.config.get_swift_year(trimmed_source) + month = self.config.month_of_year[month_str] + + if swift >= 1: + ret.timex = f'{reference + datedelta(years=swift):04d}-{month:02d}' + + year = year + swift + future_year = past_year = year + else: + ret.timex = f'XXXX-{month:02d}' + + if month < reference.month: + future_year += 1 + if month >= reference.month: + past_year -= 1 + + else: + if match.get_group(Constants.NEXT_GROUP_NAME): + swift = 1 + elif match.get_group(Constants.LAST_GROUP_NAME): + swift = -1 + + is_working_week = match.get_group(Constants.BUSINESS_DAY_GROUP_NAME).success + + is_week_only = self.config.is_week_only(trimmed_source) + + if is_working_week or is_week_only: + delta = Constants.WEEK_DAY_COUNT * swift + end_delta = delta + + monday = DateUtils.this(reference, DayOfWeek.MONDAY) + datedelta(days=delta) + end_day = DayOfWeek.FRIDAY if is_working_week else DayOfWeek.SUNDAY + + begin_date = monday + end_date = DateUtils.this(reference, end_day) + datedelta(days=end_delta) \ + if self._inclusive_end_period else \ + DateUtils.this(reference, end_day) + datedelta(days=end_delta + 1) + + if early_prefix: + end_date = DateUtils.this(reference, DayOfWeek.WEDNESDAY) + datedelta(days=end_delta) \ + if self._inclusive_end_period else \ + DateUtils.this(reference, DayOfWeek.WEDNESDAY) + datedelta(days=end_delta + 1) + + elif mid_prefix: + begin_date = DateUtils.this(reference, DayOfWeek.TUESDAY) + datedelta(days=delta) + end_date = DateUtils.this(reference, DayOfWeek.FRIDAY) + datedelta(days=end_delta) \ + if self._inclusive_end_period else \ + DateUtils.this(reference, DayOfWeek.FRIDAY) + datedelta(days=end_delta + 1) + + elif late_prefix: + begin_date = DateUtils.this(reference, DayOfWeek.THURSDAY) + datedelta(days=delta) + + if earlier_prefix and swift == 0: + if end_date > reference: + end_date = reference + elif later_prefix and swift == 0: + if begin_date < reference: + begin_date = reference + + ret.timex = TimexUtil.generate_week_timex() if is_reference_date_period else \ + TimexUtil.generate_week_timex(monday) + + if late_prefix and swift != 0: + ret.mod = TimeTypeConstants.LATE_MOD + + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + return ret + + if self.config.is_weekend(trimmed_source): + begin_date = DateUtils.this(reference, DayOfWeek.SATURDAY) + \ + datedelta(days=Constants.WEEK_DAY_COUNT * swift) + end_date = DateUtils.this(reference, DayOfWeek.SUNDAY) + \ + datedelta(days=Constants.WEEK_DAY_COUNT * swift) + ret.timex = TimexUtil.generate_weekend_timex() if is_reference_date_period else \ + TimexUtil.generate_weekend_timex(begin_date) + end_date = end_date if self._inclusive_end_period else end_date + datedelta(days=1) + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + return ret + + if self.config.is_month_only(trimmed_source): + date = reference + datedelta(months=swift) + month = date.month + year = date.year + ret.timex = TimexUtil.generate_month_timex() if is_reference_date_period else \ + TimexUtil.generate_month_timex(date) + future_year = past_year = year + + elif self.config.is_year_only(trimmed_source): + date = reference + datedelta(years=swift) + year = date.year + + if match.get_group(Constants.SPECIAL_GROUP_NAME): + swift = self.config.get_swift_year(trimmed_source) + date = Constants.INVALID_YEAR if swift < -1 else date + ret.timex = TimexUtil.generate_year_timex(date, None) + ret.success = True + return ret + + begin_date = DateUtils.safe_create_from_min_value(year, 1, 1) + end_date = DateUtils.safe_create_from_min_value(year, 12, 31) if self._inclusive_end_period else \ + DateUtils.safe_create_from_min_value(year, 12, 31) + datedelta(days=1) + + if early_prefix: + end_date = DateUtils.safe_create_from_min_value(year, 6, 30) if self._inclusive_end_period else \ + DateUtils.safe_create_from_min_value(year, 6, 30) + datedelta(days=1) + + elif mid_prefix: + begin_date = DateUtils.safe_create_from_min_value(year, 4, 1) + end_date = DateUtils.safe_create_from_min_value(year, 9, 30) if self._inclusive_end_period else \ + DateUtils.safe_create_from_min_value(year, 9, 30) + datedelta(days=1) + + elif late_prefix: + begin_date = DateUtils.safe_create_from_min_value(year, Constants.WEEK_DAY_COUNT, 1) + + if earlier_prefix and swift == 0: + if end_date > reference: + end_date = reference + + elif later_prefix and swift == 0: + if begin_date < reference: + begin_date = reference + + ret.timex = TimexUtil.generate_year_timex() if is_reference_date_period else \ + TimexUtil.generate_year_timex(date) + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + + return ret + + # Early/mid/late are resolved in this policy to 4 month ranges at the start/middle/end of the year. + elif match.get_group(Constants.FOUR_DIGIT_YEAR_GROUP_NAME): + date = reference + datedelta(years=swift) + year = int(match.get_group(Constants.FOUR_DIGIT_YEAR_GROUP_NAME)) + + begin_date = DateUtils.safe_create_from_min_value(year, 1, 1) + end_date = DateUtils.safe_create_from_min_value(year, 12, 31) if self._inclusive_end_period else \ + DateUtils.safe_create_from_min_value(year, 12, 31) + datedelta(days=1) + + if early_prefix: + end_date = DateUtils.safe_create_from_min_value(year, 4, 30) if self._inclusive_end_period \ + else DateUtils.safe_create_from_min_value(year, 4, 30) + datedelta(days=1) + elif mid_prefix: + begin_date = DateUtils.safe_create_from_min_value(year, 5, 1) + end_date = DateUtils.safe_create_from_min_value(year, 8, 31) if self._inclusive_end_period \ + else DateUtils.safe_create_from_min_value(year, 8, 31) + datedelta(days=1) + + elif late_prefix: + begin_date = DateUtils.safe_create_from_min_value(year, 9, 1) + + ret.timex = TimexUtil.generate_year_timex() if is_reference_date_period else \ + TimexUtil.generate_year_timex(begin_date) + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + + return ret + + else: + return ret + + # only "month" will come to here + future_start = DateUtils.safe_create_from_min_value(future_year, month, 1) + future_end = DateUtils.safe_create_from_min_value(future_year, month, 1) + datedelta(months=1) - datedelta( + days=1) \ + if self._inclusive_end_period else DateUtils.safe_create_from_min_value(future_year, month, 1) + datedelta( + months=1) + + past_start = DateUtils.safe_create_from_min_value(past_year, month, 1) + past_end = DateUtils.safe_create_from_min_value(past_year, month, 1) + datedelta(months=1) - datedelta(days=1) \ + if self._inclusive_end_period else DateUtils.safe_create_from_min_value(past_year, month, 1) + datedelta( + months=1) + + if early_prefix: + future_end = DateUtils.safe_create_from_min_value(future_year, month, 15) if self._inclusive_end_period else \ + DateUtils.safe_create_from_min_value(future_year, month, 15) + datedelta(days=1) + + past_end = DateUtils.safe_create_from_min_value(past_year, month, 15) if self._inclusive_end_period else \ + DateUtils.safe_create_from_min_value(past_year, month, 15) + datedelta(days=1) + + elif mid_prefix: + future_start = DateUtils.safe_create_from_min_value(future_year, month, 10) + past_start = DateUtils.safe_create_from_min_value(past_year, month, 10) + + future_end = DateUtils.safe_create_from_min_value(future_year, month, 20) if self._inclusive_end_period \ + else DateUtils.safe_create_from_min_value(future_year, month, 20) + datedelta(days=1) + + past_end = DateUtils.safe_create_from_min_value(past_year, month, 20) if self._inclusive_end_period \ + else DateUtils.safe_create_from_min_value(past_year, month, 20) + datedelta(days=1) + + elif late_prefix: + future_start = DateUtils.safe_create_from_min_value(future_year, month, 16) + past_start = DateUtils.safe_create_from_min_value(past_year, month, 16) + + if earlier_prefix and future_end == past_end: + if future_end > reference: + future_end = past_end = reference + + elif later_prefix and future_start == past_start: + if future_start < reference: + future_start = past_start = reference + + ret.future_value = [future_start, future_end] + ret.past_value = [past_start, past_end] + ret.success = True + + return ret + + def handle_with_half_tag(self, source: str, reference: datetime, ret: DateTimeResolutionResult, swift: int) \ + -> DateTimeResolutionResult: + year = reference.year + month = reference.month + + if self.config.is_week_only(source): + + # Handle like "上半周","下半周" + begin_day = DateUtils.this(reference, DayOfWeek.MONDAY) if swift == -1 else \ + DateUtils.this(reference, DayOfWeek.THURSDAY) + end_day = DateUtils.this(reference, DayOfWeek.THURSDAY) if swift == -1 else \ + DateUtils.this(reference, DayOfWeek.SUNDAY) + datedelta(days=1) + ret.timex = TimexUtil.generate_date_period_timex(begin_day, end_day, timex_type=0) + + elif self.config.is_month_only(source): + + # Handle like "上半月","下半月" + month_start_day = DateUtils.safe_create_from_min_value(year, month, 1) + month_end_day = DateUtils.safe_create_from_min_value(year, month + 1, 1) + half_month_day = int((month_end_day.day - month_start_day.day) / 2) + + begin_day = month_start_day if swift == -1 else month_start_day + datedelta(days=half_month_day) + end_day = month_start_day + datedelta(days=half_month_day) if swift == -1 else month_end_day + ret.timex = TimexUtil.generate_date_period_timex(begin_day, end_day, timex_type=0) + + else: + # Handle like "上(个)半年","下(个)半年" + begin_day = DateUtils.safe_create_from_min_value(year, 1, 1) if swift == -1 \ + else DateUtils.safe_create_from_min_value(year, 7, 1) + end_day = DateUtils.safe_create_from_min_value(year, 7, 1) if swift == -1 \ + else DateUtils.safe_create_from_min_value(year + 1, 1, 1) + ret.timex = TimexUtil.generate_date_period_timex(begin_day, end_day, timex_type=2) + + ret.future_value = ret.past_value = [begin_day, end_day] + ret.success = True + return ret + + # only contains year like "2016年" or "2016年上半年" + def parse_year(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = RegExpUtility.exact_match(self.config.year_regex, source, trim=True) + + if match and match.success: + year_str = match.value + + # Handle like "2016年上半年","2017年下半年" + year_str = self.handle_with_half_year(match, year_str)[0] + + # Trim() to handle extra whitespaces like '07 年' + if self.config.is_year_only(year_str): + year_str = year_str[:len(year_str) - 1] + + year = self.convert_cjk_to_integer(year_str) + + return self.handle_year_result(ret, year, False) + + match = RegExpUtility.exact_match(self.config.year_in_cjk_regex, source, trim=True) + + if match and match.success: + year_str = match.value + + # Handle like "二零一七年上半年","二零一七年下半年" + year_str = self.handle_with_half_year(match, year_str)[0] + + if self.config.is_year_only(year_str): + year_str = year_str[:len(year_str) - 1] + + if len(year_str) == 1: + return ret + + year = self.convert_cjk_to_integer(year_str) + + return self.handle_year_result(ret, year, False) + + return ret + + def handle_with_half_year(self, match: ConditionalMatch, source: str) -> [str, bool, bool]: + first_half = match.get_group(Constants.FIRST_HALF_GROUP_NAME) + second_half = match.get_group(Constants.SECOND_HALF_GROUP_NAME) + + has_half = False + is_first_half = True if first_half else False + + if is_first_half or second_half: + half_text = first_half if is_first_half else second_half + source = source[:len(source) - len(half_text)] + has_half = True + + return source.lower(), has_half, is_first_half + + def handle_year_result(self, ret: DateTimeResolutionResult, year: int, is_reference_date_period: bool, + has_half: bool = False, is_first_half: bool = False) -> DateTimeResolutionResult: + if 100 > year >= self.config.two_num_year: + year += Constants.BASE_YEAR_PAST_CENTURY + elif year < 100 and year < self.config.two_num_year: + year += Constants.BASE_YEAR_CURRENT_CENTURY + + begin_day = DateUtils.safe_create_from_min_value(year, 1, 1) + end_day = DateUtils.safe_create_from_min_value(year + 1, 1, 1) + + ret.timex = TimexUtil.generate_year_timex() if is_reference_date_period else \ + DateTimeFormatUtil.luis_date(year, 1, 1) + + if has_half: + if is_first_half: + end_day = DateUtils.safe_create_from_min_value(year, 7, 1) + else: + begin_day = DateUtils.safe_create_from_min_value(year, 7, 1) + + ret.timex = TimexUtil.generate_date_period_timex(begin_day, end_day, timex_type=2) + + ret.future_value = ret.past_value = [begin_day, end_day] + ret.success = True + + return ret + + # parse entities that made up by two time points + def merge_two_time_points(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + er = self.config.date_extractor.extract(source, reference) + + if len(er) < 2: + er = self.config.date_extractor.extract(self.config.token_before_date + source, reference) + + if len(er) < 2: + return ret + + er[0].start -= len(self.config.token_before_date) + er[1].start -= len(self.config.token_before_date) + + pr1 = self.config.date_parser.parse(er[0], reference) + pr2 = self.config.date_parser.parse(er[1], reference) + + if len(er) >= 2: + + match = self.config.week_with_week_day_range_regex.match(source) + + if match: + week_prefix = str(match.group(Constants.WEEK_GROUP_NAME).value) + + # Check if weekPrefix is already included in the extractions otherwise include it + if week_prefix: + + if week_prefix not in er[0].text: + er[0].text = week_prefix + er[0].text + + if week_prefix not in er[1].text: + er[1].text = week_prefix + er[1].text + + pr1 = self.config.date_parser.parse(er[0], reference) + pr2 = self.config.date_parser.parse(er[1], reference) + + else: + date_context = self.get_year_context(er[0].text, er[1].text, source) + + if pr1.value is None or pr2.value is None: + return ret + + pr1 = date_context.process_date_entity_parsing_result(pr1) + pr2 = date_context.process_date_entity_parsing_result(pr2) + + if date_context.is_empty() and (DateUtils.is_Feb_29th_datetime(pr1.value.future_value) or + DateUtils.is_Feb_29th_datetime(pr2.value.future_value)): + [pr1, pr2] = date_context.sync_year(pr1, pr2) + + future_begin = pr1.value.future_value + future_end = pr2.value.future_value + past_begin = pr1.value.past_value + past_end = pr2.value.past_value + + if future_begin > future_end: + future_begin = past_begin + + if past_end < past_begin: + past_end = future_end + + ret.timex = TimexUtil.generate_date_period_timex_str(future_begin, future_end, 0, pr1.timex_str, pr2.timex_str) + + if pr1.timex_str.startswith(Constants.TIMEX_FUZZY_YEAR) and \ + future_begin <= DateUtils.safe_create_from_value(DateUtils.min_value, future_begin.year, 2, 28) and \ + future_end >= DateUtils.safe_create_from_value(DateUtils.min_value, future_begin.year, 3, 1): + # Handle cases like "2月28日到3月1日". + # There may be different timexes for FutureValue and PastValue due to the different validity of Feb 29th. + + ret.comment = Constants.COMMENT_DOUBLETIMEX + past_timex = TimexUtil.generate_date_period_timex_str(past_begin, past_end, 0, pr1.timex_str, pr2.timex_str) + ret.timex = TimexUtil.merge_timex_alternatives(ret.timex, past_timex) + + ret.future_value = [future_begin, future_end] + ret.past_value = [past_begin, past_end] + ret.success = True + + return ret + + # handle like "前两年" "前三个月" + def parse_number_with_unit(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + # if there are NO spaces between number and unit + match = self.config.number_combined_with_unit.match(source) + + if match: + src_unit = match.group(Constants.UNIT_GROUP_NAME) + + before_str = source[:match.start()] + + if src_unit in self.config.unit_map: + unit_str = self.config.unit_map[src_unit] + num_str = match.group(Constants.NUM) + num_int = int(num_str) + + if RegExpUtility.exact_match(self.config.past_regex, before_str, trim=True).success: + if unit_str == Constants.TIMEX_DAY: + begin_date = reference - datedelta(days=num_int) + end_date = reference + elif unit_str == Constants.TIMEX_WEEK: + begin_date = reference - datedelta(days=7 * num_int) + end_date = reference + elif unit_str == Constants.TIMEX_MONTH_FULL: + begin_date = reference - datedelta(months=num_int) + end_date = reference + elif unit_str == Constants.TIMEX_YEAR: + begin_date = reference - datedelta(years=num_int) + end_date = reference + else: + return ret + + ret.timex = f'({DateTimeFormatUtil.luis_date(begin_date.year, begin_date.month, begin_date.day)},' \ + f'{DateTimeFormatUtil.luis_date(end_date.year, end_date.month, end_date.day)},' \ + f'P{num_str}{unit_str[0]})' + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + return ret + + if RegExpUtility.exact_match(self.config.future_regex, before_str, trim=True).success: + if unit_str == Constants.TIMEX_DAY: + begin_date = reference + end_date = reference + datedelta(days=num_int) + elif unit_str == Constants.TIMEX_WEEK: + begin_date = reference + end_date = reference + datedelta(days=7 * num_int) + elif unit_str == Constants.TIMEX_MONTH_FULL: + begin_date = reference + end_date = reference + datedelta(months=num_int) + elif unit_str == Constants.TIMEX_YEAR: + begin_date = reference + end_date = reference + datedelta(years=num_int) + else: + return ret + + ret.timex = f'({DateTimeFormatUtil.luis_date(begin_date.year, begin_date.month, begin_date.day) + datedelta(days=1)},' \ + f'{DateTimeFormatUtil.luis_date(end_date.year, end_date.month, end_date.day) + datedelta(days=1)},' \ + f'P{num_str}{unit_str[0]})' + ret.future_value = ret.past_value = [begin_date + datedelta(days=1), end_date + datedelta(days=1)] + ret.success = True + return ret + return ret + + # Analogous to the same method in BaseDatePeriodParser, it deals with date periods that involve durations + # e.g. "past 2 years", "within 2 days", "first 2 weeks of 2018". + def parse_duration(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + # For cases like 'first 2 weeks of 2021' (2021年的前2周), 'past 2 years' (前两年), 'next 3 years' (后三年) + duration_res = self.config.duration_extractor.extract(source, reference) + + match_half = RegExpUtility.exact_match(self.config.one_word_period_regex, source, trim=True) + + # halfTag cases are processed in ParseOneWordPeriod + if match_half.success and match_half.get_group(Constants.HALF_TAG_GROUP_NAME): + ret.success = False + return ret + + if len(duration_res) > 0: + before_str = source[:duration_res[0].start] + after_str = source[duration_res[0].start:] + + matches = list(regex.finditer(self.config.unit_regex, duration_res[0].text)) + # matches = RegExpUtility.get_matches(self.config.unit_regex, duration_res[0].text) + match_business_days = RegExpUtility.exact_match(self.config.duration_unit_regex, source, trim=True) + + # handle duration cases like "5 years 1 month 21 days" and "multiple business days" + if (1 < len(matches) <= 3) or ( + matches and match_business_days.get_group(Constants.BUSINESS_DAY_GROUP_NAME) + ): + ret = self.parse_multiple_dates_duration(source, reference) + return ret + + elif len(matches) == 1: + src_unit = RegExpUtility.get_group(matches[0], Constants.UNIT_GROUP_NAME) + src_unit_index = duration_res[0].text.index(src_unit) + + number_str = duration_res[0].text[:src_unit_index] + match_few = self.config.duration_relative_duration_unit_regex.match(source) + + if match_few and number_str == match_few.get_group(Constants.FEW_GROUP_NAME).Value: + number = 3 + else: + number = self.convert_cjk_to_num(number_str) + + if src_unit in self.config.unit_map: + begin_date = reference + end_date = reference + + unit_str = self.config.unit_map[src_unit] + + # Get prefix + prefix_match = None + + if self.config.unit_regex.match(src_unit).groups(Constants.UNIT_OF_YEAR_GROUP_NAME): + # Patterns like 'first 2 weeks of 2018' are considered only if the unit is compatible + prefix_match = RegExpUtility.exact_match(self.config.first_last_of_year_regex, before_str, + trim=True) + + if prefix_match.success: + is_of_year_match = prefix_match.success + is_past_match = prefix_match.groups(Constants.LAST_GROUP_NAME) + else: + is_of_year_match = False + is_past_match = None + + is_future = False + + if not prefix_match: + prefix_match = self.config.past_regex.match_exact(before_str) + is_past_match = prefix_match.success + + if not prefix_match: + prefix_match = RegExpUtility.exact_match(self.config.future_regex, before_str, trim=True) + is_future = prefix_match.success + + if not prefix_match: + prefix_match = RegExpUtility.exact_match(self.config.future_regex, after_str, trim=True) + is_future = prefix_match.success + + if is_future and not RegExpUtility.exact_match(self.config.future_regex, after_str, trim=True). \ + get_groups(Constants.WITHIN_GROUP_NAME): + # for the "within" case it should start from the current day + begin_date = begin_date + datedelta(days=1) + end_date = end_date + datedelta(days=1) + + # Shift by year (if present) + if is_of_year_match: + + # Get Year + year = self.get_year_from_text(prefix_match) + + if year == Constants.INVALID_YEAR: + swift = 0 + year_rel = prefix_match.get_group(Constants.YEAR_RELATIVE) + if self.config.is_last_year(year_rel): + swift = -1 + elif self.config.is_next_year(year_rel): + swift = 1 + year = reference.year + datedelta(years=swift) + + # Get begin/end dates for year + if unit_str == Constants.TIMEX_WEEK: + # First/last week of the year is calculated according to ISO definition + begin_date = DateUtils.this(DateUtils.get_first_thursday(year), DayOfWeek.MONDAY) + end_date = DateUtils.this(DateUtils.get_last_thursday(year), DayOfWeek.MONDAY) \ + + datedelta(days=7) + else: + begin_date = DateUtils.safe_create_from_min_value(year, 1, 1) + end_date = DateUtils.safe_create_from_min_value(year, 12, 31) + datedelta(days=1) + + # Shift begin/end dates by duration span + if prefix_match: + if is_past_match: + begin_date = end_date + + if unit_str == Constants.TIMEX_DAY: + begin_date = begin_date - datedelta(days=number) + pass + elif unit_str == Constants.TIMEX_WEEK: + begin_date = begin_date - datedelta(days=7 * number) + pass + elif unit_str == Constants.TIMEX_MONTH_FULL: + begin_date = begin_date - datedelta(months=number) + pass + elif unit_str == Constants.TIMEX_YEAR: + begin_date = begin_date - datedelta(years=number) + pass + else: + return ret + else: + end_date = begin_date + + if unit_str == Constants.TIMEX_DAY: + end_date = end_date + datedelta(days=number) + pass + elif unit_str == Constants.TIMEX_WEEK: + end_date = end_date + datedelta(days=7 * number) + pass + elif unit_str == Constants.TIMEX_MONTH_FULL: + end_date = end_date + datedelta(months=number) + pass + elif unit_str == Constants.TIMEX_YEAR: + end_date = end_date + datedelta(years=number) + pass + else: + return ret + + ret.timex = f'({DateTimeFormatUtil.luis_date(begin_date.year, begin_date.month, begin_date.day)},\ + {DateTimeFormatUtil.luis_date(end_date.year, end_date.month, end_date.day)},' \ + f'P{number}{unit_str[0]})' + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + return ret + + return ret + + def parse_multiple_dates_duration(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + begin_date = end_date = reference + duration_timex = '' + rest_now_sunday = False + + duration_ers = self.config.duration_extractor.extract(source, reference) + + if len(duration_ers) > 0: + duration_pr = self.config.duration_parser.parse(duration_ers[0]) + before_str = source[:duration_pr.start] + after_str = source[duration_pr.start + duration_pr.length] + + mod_and_date = ModAndDateResult() + mod_and_date_result = mod_and_date.mod_and_date_result(begin_date, end_date) + + if duration_pr.value: + duration_result = duration_pr.value + + if not duration_result.timex: + return ret + + if self.config.past_regex.match(before_str) or self.config.past_regex.match(after_str): + mod_and_date_result = ModAndDateResult.get_mod_and_date(begin_date, end_date, reference, + duration_result.timex, False) + + if (RegExpUtility.exact_match(self.config.future_regex, before_str, trim=True) or + RegExpUtility.exact_match(self.config.future_regex, after_str, trim=True)) \ + and DurationParsingUtil.is_date_duration(duration_result.timex): + + mod_and_date_result = ModAndDateResult.get_mod_and_date(begin_date, end_date, reference, + duration_result.timex, True) + begin_date = mod_and_date_result.begin_date + end_date = mod_and_date_result.end_date + + # In GetModAndDate, this "future" resolution will add one day to beginDate/endDate, + # but for the "within" case it should start from the current day. + + if RegExpUtility.exact_match(self.config.future_regex, after_str, trim=True). \ + get_group(Constants.WITHIN_GROUP_NAME): + begin_date = begin_date - datedelta(days=1) + end_date = end_date - datedelta(days=1) + + if mod_and_date_result.mod: + duration_pr.value.mod = mod_and_date_result.mod + + duration_timex = duration_result.timex + ret.sub_date_time_entities = [duration_pr] + + if mod_and_date_result.date_list is not None: + ret.list = mod_and_date_result.date_list + + if (begin_date != end_date) or rest_now_sunday: + end_date = end_date - datedelta(days=1) if self._inclusive_end_period else end_date + + ret.timex = f'({DateTimeFormatUtil.luis_date(begin_date.year, begin_date.month, begin_date.day)},' \ + f'{DateTimeFormatUtil.luis_date(end_date.year, end_date.month, end_date.day)},' \ + f'{duration_timex})' + ret.future_value = ret.past_value = [begin_date, end_date] + ret.success = True + return ret + + ret.success = False + return ret + + # case like "三月的第一周" + def parse_week_of_month(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + trimmed_source = source.lower() + + match = self.config.week_of_month_regex.match(source) + + if not match: + return ret + + cardinal_str = match.get_group(Constants.CARDINAL) + month_str = match.get_group(Constants.MONTH_GROUP_NAME) + no_year = False + + if month_str is None: + swift = 0 + if RegExpUtility.match_begin(self.config.wom_next_regex, trimmed_source, trim=True): + swift = 1 + elif RegExpUtility.match_begin(self.config.wom_previous_regex, trimmed_source, trim=True): + swift = -1 + + month = reference + datedelta(months=swift) + year = reference + datedelta(years=swift) + ret.timex = DateTimeFormatUtil.luis_date(reference.year, month, 1) + else: + month = self.config.to_month_number(month_str) + year = self.get_year_from_text(match) + + if year == Constants.INVALID_YEAR: + year = reference.year + no_year = True + + ret = self.get_week_of_month(cardinal_str, month, year, reference, no_year) + + return ret + + def parse_week_of_date(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = self.config.week_of_date_regex.match(source) + date_ers = self.config.date_extractor.extract(source, reference) + + # Cases like 'week of september 16th' (9月16日の週) + + if match and len(date_ers) == 1: + pr = self.config.date_parser.parse(date_ers[0], reference).value + + if (self.config.options and DateTimeOptions.CALENDAR) != 0: + monday = DateUtils.this(pr.future_value, DayOfWeek.MONDAY) + ret.timex = DateTimeFormatUtil.to_iso_week_timex(monday) + else: + ret.timex = pr.timex + + ret.comment = Constants.COMMENT_WEEK_OF + ret.future_value = BaseDatePeriodParser.get_week_range_from_date(pr.future_value) + ret.past_value = BaseDatePeriodParser.get_week_range_from_date(pr.past_value) + ret.success = True + + return ret + + def parse_month_of_date(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = self.config.month_of_date_regex.match(source) + ex = self.config.date_extractor.extract(source, reference) + + # Cases like 'month of september 16th' (9月16日の月) + + if match and len(ex) == 1: + pr = self.config.date_parser.parse(ex[0], reference).value + ret.timex = pr.timex + ret.comment = Constants.COMMENT_MONTH_OF + ret.future_value = BaseDatePeriodParser.get_month_range_from_date(pr.future_value) + ret.past_value = BaseDatePeriodParser.get_month_range_from_date(pr.past_value) + ret.success = True + + return ret + + def parse_which_week(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = RegExpUtility.exact_match(self.config.which_week_regex, source, trim=True) + + if match and match.success: + num = int(match.get_group(Constants.NUMBER)) + if num == 0: + return ret + + year = reference.year + ret.timex = f'{year:04d}-W{num:02d}' + + first_day = DateUtils.safe_create_from_value(DateUtils.min_value, year, 1, 1) + first_thursday = DateUtils.this(first_day, DayOfWeek.THURSDAY) + first_week = DateUtils.week_of_year(first_thursday) + + if first_week == 1: + num -= 1 + + value = first_thursday + datedelta(days=(7 * num) - 3) + + ret.future_value = [value, value + datedelta(days=7)] + ret.past_value = [value, value + datedelta(days=7)] + ret.success = True + + return ret + + def get_week_of_month(self, cardinal_str: str, month: int, year: int, reference: datetime, no_year: bool) \ + -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + target_monday = self.get_monday_of_target_week(cardinal_str, month, year) + + future_date = past_date = target_monday + + if no_year and future_date < reference: + future_date = self.get_monday_of_target_week(cardinal_str, month, year + 1) + + if no_year and past_date >= reference: + past_date = self.get_monday_of_target_week(cardinal_str, month, year - 1) + + if no_year: + year = Constants.INVALID_YEAR + + # Note that if the cardinalStr equals to "last", the weekNumber would be fixed at "5" + # This may lead to some inconsistency between Timex and Resolution + # the StartDate and EndDate of the resolution would always be correct (following ISO week definition) + # But week number for "last week" might be inconsistent with the resolution as we only have one Timex, + # but we may have past and future resolutions which may have different week numbers + + week_num = self.get_week_number_for_month(cardinal_str) + ret.timex = TimexUtil.generate_week_of_month_timex(year, month, week_num) + + ret.future_value = [future_date, future_date + datedelta(days=Constants.WEEK_DAY_COUNT - 1)] if \ + self._inclusive_end_period else [future_date, future_date + datedelta(days=Constants.WEEK_DAY_COUNT)] + ret.past_value = [past_date, past_date + datedelta(days=Constants.WEEK_DAY_COUNT - 1)] if \ + self._inclusive_end_period else [past_date, past_date + datedelta(days=Constants.WEEK_DAY_COUNT)] + ret.success = True + + return ret + + def get_monday_of_target_week(self, cardinal_str: str, month: int, year: int) -> datetime: + + if RegExpUtility.exact_match(self.config.wom_last_regex, cardinal_str, trim=True).success: + last_thursday = DateUtils.get_last_thursday(year, month) + result = DateUtils.this(last_thursday, DayOfWeek.MONDAY) + else: + cardinal = self.get_week_number_for_month(cardinal_str) + first_thursday = DateUtils.get_first_thursday(year, month) + + result = DateUtils.this(first_thursday, DayOfWeek.MONDAY) + \ + datedelta(days=Constants.WEEK_DAY_COUNT * (cardinal - 1)) + + return result + + def get_week_number_for_month(self, cardinal_str: str) -> int: + + # "last week of month" might not be "5th week of month" + # Sometimes it can also be "4th week of month" depends on specific year and month + # But as we only have one Timex, we use "5" to indicate it's the "last week" + + if RegExpUtility.exact_match(self.config.wom_last_regex, cardinal_str, trim=True).success: + cardinal = 5 + else: + cardinal = self.config.cardinal_map[cardinal_str] + + return cardinal + + # Cases like 'second week of 2021' (2021年的第二周) + def parse_week_of_year(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + match = self.config.week_of_year_regex.match(source) + + if not match: + return ret + + cardinal_str = match.get_group(Constants.CARDINAL) + order_str = match.get_group(Constants.ORDER) + + year = self.get_year_from_text(match) + + if year == Constants.INVALID_YEAR: + swift = self.config.get_swift_year(order_str) + + if swift < -1: + return ret + + year = reference.year + datedelta(years=swift) + + if RegExpUtility.exact_match(self.config.wom_last_regex, cardinal_str, trim=True).success: + target_week_monday = DateUtils.this(DateUtils.get_last_thursday(year), DayOfWeek.MONDAY) + ret.timex = TimexUtil.generate_week_timex(target_week_monday) + else: + week_num = self.config.cardinal_map[cardinal_str] + target_week_monday = DateUtils.this(DateUtils.get_last_thursday(year), DayOfWeek.MONDAY) + \ + datedelta(days=Constants.WEEK_DAY_COUNT * (week_num - 1)) + ret.timex = TimexUtil.generate_week_of_year_timex(year, week_num) + + ret.future_value = [target_week_monday, target_week_monday + datedelta(days=Constants.WEEK_DAY_COUNT - 1)] \ + if self._inclusive_end_period else \ + [target_week_monday, target_week_monday + datedelta(days=Constants.WEEK_DAY_COUNT)] + + ret.past_value = [target_week_monday, target_week_monday + datedelta(days=Constants.WEEK_DAY_COUNT - 1)] \ + if self._inclusive_end_period else \ + [target_week_monday, target_week_monday + datedelta(days=Constants.WEEK_DAY_COUNT)] + + ret.success = True + + return ret + + # parse "今年夏天" + def parse_season(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = RegExpUtility.exact_match(self.config.season_with_year, source, trim=True) + + if match and match.success: + + # parse year + year = reference.year + has_year = False + year_num = match.get_group(Constants.YEAR_GROUP_NAME) + year_cjk = match.get_group(Constants.YEAR_CJK_GROUP_NAME) + year_rel = match.get_group(Constants.YEAR_RELATIVE) + + if year_num: + has_year = True + + if self.config.is_year_only(year_num): + year_num = year_num[:len(year_num) - 1] + year = int(year_num) + + elif year_cjk: + has_year = True + + if self.config.is_year_only(year_cjk): + year_cjk = year_cjk[:len(year_cjk) - 1] + year = self.convert_cjk_to_integer(year_cjk) + + elif year_rel: + has_year = True + + if self.config.is_last_year(year_rel): + year -= 1 + elif self.config.is_next_year(year_rel): + year += 1 + + RegExpUtility.match_begin(self.config.this_regex, source, trim=True) + + # handle cases like "this summer" 今夏 + if not has_year and RegExpUtility.match_begin(self.config.this_regex, source, trim=True): + has_year = True + year = reference.year + elif not has_year and RegExpUtility.match_begin(self.config.next_regex, source, trim=True): + has_year = True + year = reference.year + datedelta(years=1) + elif not has_year and RegExpUtility.match_begin(self.config.last_regex, source, trim=True): + has_year = True + year = reference.year - datedelta(years=1) + + if 100 > year >= self.config.two_num_year: + year += Constants.BASE_YEAR_PAST_CENTURY + elif year < 100 and year < self.config.two_num_year: + year += Constants.BASE_YEAR_CURRENT_CENTURY + + # parse season + season_str = match.get_group(Constants.SEASON) + + if match.get_group(Constants.EARLY_PREFIX): + ret.mod = TimeTypeConstants.EARLY_MOD + if match.get_group(Constants.MID_PREFIX): + ret.mod = TimeTypeConstants.MID_MOD + if match.get_group(Constants.LATE_PREFIX): + ret.mod = TimeTypeConstants.LATE_MOD + + ret.timex = self.config.season_map[season_str] + + if has_year: + ret.timex = f'{year:04d}-{ret.timex}' + + ret.success = True + return ret + + return ret + + def parse_quarter(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = RegExpUtility.exact_match(self.config.quarter_regex, source, trim=True) + + if not match or not match.success: + return ret + + # parse year + year = reference.year + year_num = match.get_group(Constants.YEAR_GROUP_NAME) + year_cjk = match.get_group(Constants.YEAR_CJK_GROUP_NAME) + year_rel = match.get_group(Constants.YEAR_RELATIVE) + + if year_num: + if self.config.is_year_only(year_num): + year_num = year_num[:len(year_num) - 1] + + year = int(year_num) + + elif year_cjk: + if self.config.is_year_only(year_cjk): + year_cjk = year_cjk[:len(year_cjk) - 1] + + year = self.convert_cjk_to_integer(year_cjk) + + elif year_rel: + if self.config.is_last_year(year_rel): + year -= 1 + elif self.config.is_next_year(year_rel): + year += 1 + + if 100 > year >= self.config.two_num_year: + year += Constants.BASE_YEAR_PAST_CENTURY + elif year < 100 and year < self.config.two_num_year: + year += Constants.BASE_YEAR_CURRENT_CENTURY + + # parse quarter_num + cardinal_str = match.get_group(Constants.CARDINAL) + quarter_num = self.config.cardinal_map[cardinal_str] + + if year_num or year_rel: + begin_date = DateUtils.safe_create_from_value(DateUtils.min_value, year, + ((quarter_num - 1) * Constants.TRIMESTER_MONTH_COUNT) + 1, 1) + end_date = DateUtils.safe_create_from_value(DateUtils.min_value, year, quarter_num * + Constants.TRIMESTER_MONTH_COUNT, 1) + datedelta(months=1) + ret.future_value = ret.past_value = [begin_date, end_date] + ret.timex = TimexUtil.generate_date_period_timex(begin_date, end_date, 2) + ret.success = True + else: + begin_date = DateUtils.safe_create_from_value(DateUtils.min_value, year, + ((quarter_num - 1) * Constants.TRIMESTER_MONTH_COUNT) + 1, 1) + end_date = DateUtils.safe_create_from_value(DateUtils.min_value, year, quarter_num * + Constants.TRIMESTER_MONTH_COUNT, 1) + datedelta(months=1) + ret.past_value = [begin_date, end_date] + ret.timex = TimexUtil.generate_date_period_timex(begin_date, end_date, 2) + begin_date = DateUtils.safe_create_from_value(DateUtils.min_value, year + 1, + ((quarter_num - 1) * Constants.TRIMESTER_MONTH_COUNT) + 1, 1) + end_date = DateUtils.safe_create_from_value(DateUtils.min_value, year + 1, quarter_num * + Constants.TRIMESTER_MONTH_COUNT, 1) + datedelta(months=1) + ret.future_value = [begin_date, end_date] + + ret.success = True + return ret + + def parse_decade(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + century = int((reference.year / 100) + 1) + decade_last_year = 10 + input_century = False + + match = RegExpUtility.exact_match(self.config.decade_regex, source, trim=True) + + if match and match.success: + decade_str = match.get_group(Constants.DECADE) + decade = int(decade_str) + + if not DateUtils.int_try_parse(decade_str)[1]: + decade = self.convert_cjk_to_num(decade_str) + + century_str = match.get_group(Constants.CENTURY) + + if century_str: + century = int(century_str) + + if not DateUtils.int_try_parse(century_str)[1]: + century = self.convert_cjk_to_num(century_str) + + else: + century_str = match.get_group(Constants.REL_CENTURY) + + if century_str: + + century_str = century_str.lower() + this_match = self.config.this_regex.match(century_str) + next_match = self.config.next_regex.match(century_str) + + if this_match: + pass + elif next_match: + century += 1 + else: + century -= 1 + + input_century = True + else: + return ret + + begin_year = ((century - 1) * 100) + decade + first_two_num_of_year = match.get_group(Constants.FIRST_TWO_YEAR_NUM) + + # handle cases like "2000年代" + if first_two_num_of_year: + begin_year = (self.convert_cjk_to_integer(first_two_num_of_year) * 100) + decade + + ret.timex = TimexUtil.generate_decade_timex(begin_year, decade_last_year, decade, input_century) + + future_year = past_year = begin_year + + start_date = DateUtils.safe_create_from_value(DateUtils.min_value, begin_year, 1, 1) + + if not input_century and start_date < reference and not first_two_num_of_year: + future_year += 100 + + if not input_century and start_date >= reference and not first_two_num_of_year: + past_year -= 100 + + ret.future_value = [DateUtils.safe_create_from_value(DateUtils.min_value, future_year, 1, 1), + DateUtils.safe_create_from_value(DateUtils.min_value, future_year + decade_last_year, 1, 1)] + ret.past_value = [DateUtils.safe_create_from_value(DateUtils.min_value, past_year, 1, 1), + DateUtils.safe_create_from_value(DateUtils.min_value, past_year + decade_last_year, 1, 1)] + ret.success = True + + return ret + + def parse_century(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + century = (reference.year / 100) + 1 + + match = RegExpUtility.exact_match(self.config.century_regex, source, trim=True) + + if match and match.success: + century_str = match.get_group(Constants.CENTURY) + + if century_str: + century = int(century_str) + + if not DateUtils.int_try_parse(century_str)[1]: + century = self.convert_cjk_to_num(century_str) + + begin_year = (century - 1) * Constants.CENTURY_YEARS_COUNT + end_year = begin_year + Constants.CENTURY_YEARS_COUNT + + start_date = DateUtils.safe_create_from_value(begin_year, 1, 1, 1) + end_date = DateUtils.safe_create_from_value(end_year, 1, 1, 1) + + ret.timex = TimexUtil.generate_date_period_timex(start_date, end_date, 3) + ret.future_value = ret.past_value = [start_date, end_date] + ret.success = True + + return ret + + # Only handle cases like "within/less than/more than x weeks from/before/after today" + def parse_date_point_with_ago_and_later(self, source: str, reference: datetime) -> DateTimeResolutionResult: + + ret = DateTimeResolutionResult() + er = self.config.date_extractor.extract(source, reference)[0] + trimmed_source = source.lower() + match = RegExpUtility.exact_match(self.config.date_point_with_ago_and_later, trimmed_source, trim=True) + + if er and match: + is_ago = match.get_group(Constants.AGO_LABEL).success + is_within = match.get_group(Constants.WITHIN_GROUP_NAME).success + is_more_than = match.get_group(Constants.MORE_GROUP_NAME).success + + if match.get_group(Constants.YESTERDAY_GROUP_NAME): + reference = reference - datedelta(days=1) + + er.text = source + pr = self.config.date_parser.parse(er, reference) + duration_extraction_result = self.config.duration_extractor.extract(er.text, reference)[0] + + if duration_extraction_result: + + duration = self.config.duration_parser.parse(duration_extraction_result, reference) + duration_in_seconds = duration.value.past_value + + if is_within: + + if is_ago: + start_date = pr.value.past_value + end_date = start_date + timedelta(seconds=duration_in_seconds) + else: + end_date = pr.value.future_value + start_date = end_date - timedelta(seconds=duration_in_seconds) + + if start_date != DateUtils.min_value(): + duration_timex = duration.value.timex + + ret.timex = TimexUtil.generate_date_period_timex_with_duration(start_date, end_date, + duration_timex) + ret.future_value = ret.past_value = [start_date, end_date] + ret.success = True + + return ret + + elif is_more_than: + ret.mod = Constants.BEFORE_MOD if is_ago else Constants.AFTER_MOD + ret.timex = pr.timex_str + ret.future_value = pr.value.future_value + ret.past_value = pr.value.past_value + ret.success = True + + return ret + + ret.success = False + return ret + + def parse_complex_date_period(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = self.config.complex_date_period_regex.match(source) + + if match and match.success: + future_begin = DateUtils.min_value() + future_end = DateUtils.min_value() + past_begin = DateUtils.min_value() + past_end = DateUtils.min_value() + + is_specific_date = False + is_start_by_week = False + is_end_by_week = False + is_ambiguous_start = False + is_ambiguous_end = False + + ambiguous_res = DateTimeResolutionResult() + date_context = self.get_year_context(match.get_group(TimeTypeConstants.START).value, + match.get_group(TimeTypeConstants.END).value, source) + + start_resolution = self.parse_single_time_point(match.get_group(TimeTypeConstants.START).value, + reference, date_context) + + if start_resolution.success: + future_begin = start_resolution.future_value + past_begin = start_resolution.past_value + is_specific_date = True + + if not start_resolution.success: + start_resolution = self.parse_base_date_period(match.get_group(TimeTypeConstants.START).value, + reference, date_context) + + if start_resolution.success: + future_begin = self.shift_resolution(start_resolution.future_value, match, start=True) + past_begin = self.shift_resolution(start_resolution.past_value, match, start=True) + + if "-W" in start_resolution.timex: + is_start_by_week = True + + if start_resolution.success: + end_resolution = self.parse_single_time_point(match.get_group(TimeTypeConstants.END).value, + reference, date_context) + + if end_resolution.success: + future_end = end_resolution.future_value + past_end = end_resolution.past_value + is_specific_date = True + + if not end_resolution.success or is_ambiguous_end: + end_resolution = self.parse_base_date_period(match.get_group(TimeTypeConstants.END).value, + reference, date_context) + + if end_resolution.success: + # When the end group contains modifiers such as 'end of', 'middle of', the end resolution + # must be updated accordingly. + + future_end = self.shift_resolution(end_resolution.future_value, match, start=False) + past_end = self.shift_resolution(end_resolution.past_value, match, start=False) + + if "-W" in end_resolution.timex: + is_end_by_week = True + + if end_resolution.success: + # When start or end is ambiguous it is better to resolve it to the type of the unambiguous + # extraction. In Spanish, for example, 'de lunes a mar' (from Monday to Tuesday) or + # 'de enero a mar' (from January to March). In the first case 'mar' is resolved as Date (weekday), + # in the second case it is resolved as DatePeriod (month). if (isAmbiguousStart && isSpecificDate) + + if is_ambiguous_start and is_specific_date: + start_resolution = ambiguous_res + future_begin = start_resolution.future_value + past_begin = start_resolution.past_value + + elif is_ambiguous_end and is_specific_date: + end_resolution = ambiguous_res + future_end = end_resolution.future_value + past_end = end_resolution.past_value + + if future_begin > future_end: + if not date_context: + future_begin = past_begin + else: + future_begin = DateContext.swift_date_object(future_begin, future_end) + + if past_end < past_begin: + if not date_context: + past_end = future_end + else: + past_begin = DateContext.swift_date_object(past_begin, past_end) + + # If both begin/end are date ranges in "Month", the Timex should be ByMonth + # The year period case should already be handled in Basic Cases + date_period_timex_type = 2 + + if is_specific_date: + # If at least one of the begin/end is specific date, the Timex should be ByDay + date_period_timex_type = 0 + + elif is_start_by_week and is_end_by_week: + # If both begin/end are date ranges in "Week", the Timex should be ByWeek + date_period_timex_type = 1 + + has_year = not start_resolution.timex.startswith(Constants.TIMEX_FUZZY_YEAR) or \ + not end_resolution.timex.startswith(Constants.TIMEX_FUZZY_YEAR) + + # If the year is not specified, the combined range timex will use fuzzy years. + ret.timex = TimexUtil.generate_date_period_timex(future_begin, future_end, date_period_timex_type, + past_begin, past_end, has_year) + ret.future_value = [future_begin, future_end] + ret.past_value = [past_begin, past_end] + ret.success = True + + return ret diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_datetime.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_datetime.py new file mode 100644 index 0000000000..770f3e6ede --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_datetime.py @@ -0,0 +1,632 @@ +from abc import abstractmethod +from typing import List, Optional, Pattern, Dict, Match +from datetime import datetime, timedelta +from collections import namedtuple +import regex + +from recognizers_text import MetaData +from recognizers_text.extractor import ExtractResult, Extractor +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.parsers import BaseNumberParser +from recognizers_date_time.date_time.constants import Constants, TimeTypeConstants +from recognizers_number.number.constants import Constants as NumConstants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.utilities import Token, merge_all_tokens, DateTimeResolutionResult, \ + DateTimeFormatUtil, RegExpUtility, DateTimeOptionsConfiguration, TimexUtil, DurationParsingUtil, \ + ExtractResultExtension + + +class CJKDateTimeExtractorConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def now_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def preposition_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def night_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_of_special_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_of_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def before_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def connector_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_point_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_point_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def ambiguity_date_time_filters(self) -> Dict[Pattern, Pattern]: + raise NotImplementedError + + +class BaseCJKDateTimeExtractor(Extractor): + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_DATETIME + + def __init__(self, config: CJKDateTimeExtractorConfiguration): + self.config = config + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + + if reference is None: + reference = datetime.now() + + tokens: List[Token] = list() + + tokens.extend(self.merge_date_and_time(source, reference)) + tokens.extend(self.basic_regex_match(source)) + tokens.extend(self.time_of_today(source, reference)) + # tokens.extend(self.duration_with_ago_and_later(source, reference)) + + result = merge_all_tokens(tokens, source, self.extractor_type_name) + + result = ExtractResultExtension.filter_ambiguity(result, source, self.config.ambiguity_date_time_filters) + + return result + + # match "now" + def basic_regex_match(self, source: str) -> List[Token]: + tokens: List[Token] = list() + # handle "now" + matches: List[Match] = list( + regex.finditer(self.config.now_regex, source)) + tokens.extend(map(lambda x: Token(x.start(), x.end()), matches)) + return tokens + + # Merge a Date entity and a Time entity, like "明天早上七点" + def merge_date_and_time(self, source: str, reference: datetime) -> List[Token]: + tokens: List[Token] = list() + ers: List[ExtractResult] = self.config.date_point_extractor.extract( + source, reference) + + if len(ers) < 1: + return tokens + + ers.extend(self.config.time_point_extractor.extract(source, reference)) + + if len(ers) < 2: + return tokens + + ers = sorted(ers, key=lambda x: x.start) + i = 0 + + while i < len(ers) - 1: + j = i + 1 + + while j < len(ers) and ers[i].overlap(ers[j]): + j += 1 + + if j >= len(ers): + break + + if ers[i].type is Constants.SYS_DATETIME_DATE and ers[j].type is Constants.SYS_DATETIME_TIME: + middle_begin = ers[i].start + ers[i].length + middle_end = ers[j].start + + if middle_begin > middle_end: + break + + middle = source[middle_begin:middle_end].strip().lower() + + if not middle or RegExpUtility.get_matches(self.config.connector_regex, middle) or \ + RegExpUtility.get_matches(self.config.preposition_regex, middle): + begin = ers[i].start + end = ers[j].start + ers[j].length + tokens.append(Token(begin, end)) + i = j + 1 + continue + i = j + return tokens + + # Parse a specific time of today, tonight, this afternoon, "今天下午七点" + def time_of_today(self, source: str, reference: datetime) -> List[Token]: + tokens: List[Token] = list() + ers = self.config.time_point_extractor.extract(source, reference) + + for er in ers: + before = source[:er.start] + inner_match = regex.search(self.config.night_regex, er.text) + + if inner_match is not None and inner_match.start() == 0: + before = source[:er.start + len(inner_match.group())] + if not before: + continue + + match = regex.search(self.config.time_of_special_day_regex, before) + if match is not None and not before[match.end():].strip(): + begin = match.start() + end = er.start + er.length + tokens.append(Token(begin, end)) + + # TimePeriodExtractor cases using TimeOfDayRegex are not processed here + match_time_of_today = regex.search(self.config.time_of_special_day_regex, source) + match_time_of_day = regex.search(self.config.time_of_day_regex, source) + + if match_time_of_today and not match_time_of_day: + tokens.append(Token(match_time_of_today.start(), + (match_time_of_today.end()) + )) + + return tokens + + # Process case like "5分钟前" "二小时后" + def duration_with_ago_and_later(self, source: str, reference: datetime) -> List[Token]: + ret: List[Token] = list() + duration_er = self.config.duration_extractor.extract(source, reference) + + for er in duration_er: + pos = er.start + er.length + if pos < len(source): + suffix = source[pos] + before_match = RegExpUtility.get_matches(self.config.before_regex, suffix) + after_match = RegExpUtility.get_matches(self.config.after_regex, suffix) + + if (before_match and suffix.startswith(before_match[0])) \ + or (after_match and suffix.startswith(after_match[0])): + meta_data = MetaData() + meta_data.is_duration_with_ago_and_later = True + ret.append(Token(er.start, pos + 1, meta_data)) + return ret + + +MatchedTimex = namedtuple('MatchedTimex', ['matched', 'timex']) + + +class CJKDateTimeParserConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def duration_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def integer_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def number_parser(self) -> BaseNumberParser: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def now_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def lunar_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def lunar_holiday_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def simple_pm_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def simple_am_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_of_special_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def datetime_period_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def duration_relative_duration_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def ago_later_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def before_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + raise NotImplementedError + + @abstractmethod + def get_matched_now_timex(self, source: str) -> MatchedTimex: + raise NotImplementedError + + @abstractmethod + def get_swift_day(self, source: str) -> int: + raise NotImplementedError + + @abstractmethod + def adjust_by_time_of_day(self, source: str, hour: int, swift: int) -> None: + raise NotImplementedError + + +class BaseCJKDateTimeParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_DATETIME + + def __init__(self, config: CJKDateTimeParserConfiguration): + self.config = config + + def parse(self, source: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + if reference is None: + reference = datetime.now() + + result = DateTimeParseResult(source) + + if source.type is self.parser_type_name: + source_text = source.text.lower() + inner_result = self.merge_date_and_time(source_text, reference) + + if not inner_result.success: + inner_result = self.parse_basic_regex(source_text, reference) + + if not inner_result.success: + inner_result = self.parse_time_of_special_day_regex(source_text, reference) + + # if not inner_result.success: + # inner_result = self.parser_duration_with_ago_and_later(source_text, reference) + + if inner_result.success: + inner_result.future_resolution[TimeTypeConstants.DATETIME] = DateTimeFormatUtil.format_date_time( + inner_result.future_value) + inner_result.past_resolution[TimeTypeConstants.DATETIME] = DateTimeFormatUtil.format_date_time( + inner_result.past_value) + + inner_result.is_lunar = self.is_lunar_calendar(source_text) + + result.value = inner_result + result.timex_str = inner_result.timex if inner_result else '' + result.resolution_str = '' + + return result + + def filter_results(self, query: str, candidate_results: List[DateTimeParseResult]): + return candidate_results + + def parse_basic_regex(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + source = source.strip().lower() + + # handle "现在" + match = regex.search(self.config.now_regex, source) + if match and match.start() == 0 and match.group() == source: + matched_now_timex = self.config.get_matched_now_timex(source) + result.timex = matched_now_timex.timex + result.future_value = reference + result.past_value = reference + result.success = matched_now_timex.matched + return result + + # parse if lunar contains + def is_lunar_calendar(self, source: str): + source = source.strip().lower() + match = regex.match(self.config.lunar_regex, source) + if match: + return True + match = regex.match(self.config.lunar_holiday_regex, source) + if match: + return True + return False + + # merge a Date entity and a Time entity + def merge_date_and_time(self, source: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match_ago_later = regex.search(self.config.ago_later_regex, source) + if match_ago_later: + return ret + + er1 = self.config.date_extractor.extract(source, reference) + if not er1: + return ret + + er2 = self.config.time_extractor.extract(source, reference) + if not er2: + return ret + + pr1 = self.config.date_parser.parse(er1[0], reference) + pr2 = self.config.time_parser.parse(er2[0], reference) + if pr1.value is None or pr2.value is None: + return ret + + future_date = pr1.value.future_value + past_date = pr1.value.past_value + time = pr2.value.future_value + + # handle cases with time like 25時 which resolve to the next day + timex_hour = TimexUtil.parse_hour_from_time_timex(pr2.timex_str) + if timex_hour > Constants.DAY_HOUR_COUNT: + future_date.day += timedelta(days=1) + past_date.day += timedelta(days=1) + + hour = time.hour + minute = time.minute + second = time.second + + # handle morning, afternoon + if self.config.simple_pm_regex.search(source) and hour < Constants.HALF_DAY_HOUR_COUNT: + hour += Constants.HALF_DAY_HOUR_COUNT + elif self.config.simple_am_regex.search(source) and hour >= Constants.HALF_DAY_HOUR_COUNT: + hour -= Constants.HALF_DAY_HOUR_COUNT + + time_str = pr2.timex_str + if time_str.endswith(Constants.COMMENT_AMPM): + time_str = time_str[0:len(time_str) - 4] + + ret.timex = pr1.timex_str + time_str + + val = pr2.value + if hour <= Constants.HALF_DAY_HOUR_COUNT and not self.config.simple_pm_regex.search(source) and not \ + self.config.simple_am_regex.search(source) and val.comment: + ret.comment = Constants.COMMENT_AMPM + + ret.future_value = datetime( + future_date.year, future_date.month, future_date.day, hour, minute, second) + ret.past_value = datetime( + past_date.year, past_date.month, past_date.day, hour, minute, second) + ret.success = True + + return ret + + def parse_time_of_special_day_regex(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + ers = self.config.time_extractor.extract(source, reference) + + # Handle 'eod', 'end of day' + eod = regex.search(self.config.time_of_special_day_regex, source) + match_ago_and_later = regex.search(self.config.ago_later_regex, source) + if match_ago_and_later: + duration_res = self.config.duration_extractor.extract(source, reference) + if duration_res: + pr1 = self.config.duration_parser.parse(duration_res[0], reference) + is_future = False + if RegExpUtility.get_group(match_ago_and_later, Constants.LATER_GROUP_NAME): + is_future = True + timex = pr1.timex_str + + # handle less and more mode + if RegExpUtility.get_group(eod, Constants.LESS_GROUP_NAME): + result.mod = Constants.LESS_THAN_MOD + elif RegExpUtility.get_group(eod, Constants.MORE_GROUP_NAME): + result.mod = Constants.MORE_THAN_MOD + + result_datetime = DurationParsingUtil.shift_date_time(timex, reference, future=is_future) + result.timex = TimexUtil.generate_date_time_timex(result_datetime) + result.future_value = result.past_value = result_datetime + result.sub_date_time_entities = [pr1] + + result.success = True + return result + + if RegExpUtility.get_group(eod, Constants.SPECIFIC_END_OF_GROUP_NAME) and len(ers) == 0: + result = self.parse_special_time_of_date(source, reference) + return result + + if eod and len(ers) != 1: + if RegExpUtility.get_group(eod, Constants.TOMORROW_GROUP_NAME): + tomorrow_date = reference + timedelta(days=1) + result = DateTimeFormatUtil.resolve_end_of_day(DateTimeFormatUtil.format_date(tomorrow_date), + tomorrow_date, tomorrow_date) + else: + result = DateTimeFormatUtil.resolve_end_of_day(DateTimeFormatUtil.format_date(reference), + reference, reference) + return result + + if len(ers) != 1: + return result + + pr = self.config.time_parser.parse(ers[0], reference) + if not pr.value: + return result + + time = pr.value.future_value + + hour = time.hour + min = time.minute + sec = time.second + + match = regex.search(self.config.time_of_special_day_regex, source) + if match: + swift = 0 + self.config.adjust_by_time_of_day(match.group(0), hour, swift) + date = reference + timedelta(days=swift) + + # in this situation, luisStr cannot end up with "ampm", because we always have a "morning" or "night" + time_str = pr.timex_str + if time_str.endswith(Constants.COMMENT_AMPM): + time_str = time_str[0:-4] + + # handle less and more mode + if RegExpUtility.get_group(match, Constants.LESS_GROUP_NAME): + result.mod = Constants.LESS_THAN_MOD + elif RegExpUtility.get_group(match, Constants.MORE_GROUP_NAME): + result.mod = Constants.MORE_THAN_MOD + + time_str = Constants.TIME_TIMEX_PREFIX + DateTimeFormatUtil.to_str(hour, 2) + time_str[3:] + result.timex = DateTimeFormatUtil.format_date(date) + time_str + result.future_value = datetime( + date.year, date.month, date.day, hour, min, sec) + result.past_value = result.future_value + result.success = True + return result + return result + + def parse_special_time_of_date(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + ers = self.config.date_extractor.extract(source, reference) + + if len(ers) != 1: + return result + + parse_result = self.config.date_parser.parse(ers[0], reference) + future_date = parse_result.value.future_value + past_date = parse_result.value.past_value + + result = DateTimeFormatUtil.resolve_end_of_day(parse_result.timex_str, future_date, past_date) + return result + + # handle cases like "5分钟前", "1小时以后" + def parser_duration_with_ago_and_later(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + duration_result = self.config.duration_extractor.extract(source, reference) + + if len(duration_result) > 0: + match_ago_later = regex.search(self.config.ago_later_regex, source) + + if match_ago_later: + parse_result = self.config.duration_parser.parse(duration_result[0], reference) + is_future = False + if RegExpUtility.get_group(match_ago_later, Constants.LATER_GROUP_NAME): + is_future = True + timex = parse_result.timex_str + + result_date_time = DurationParsingUtil.shift_date_time(timex, reference, future=is_future) + result.timex = TimexUtil.generate_date_time_timex(result_date_time) + result.future_value = result_date_time + result.past_value = result_date_time + result.sub_date_time_entities = [parse_result] + + result.success = True + + return result + + match = regex.match(self.config.datetime_period_unit_regex, source) + if match: + suffix = source[duration_result[0].start:match.start() + duration_result[0].length].strip() + src_unit = RegExpUtility.get_group(match, Constants.UNIT_GROUP_NAME) + + number_str = source[duration_result[0].start:match.start() - duration_result[0].start].strip() + number = self.convert_CJK_to_num(number_str) + + if src_unit in self.config.unit_map: + unit_str = self.config.unit_map[src_unit] + before_match = regex.search(self.config.before_regex, suffix) + if before_match and suffix.startswith(before_match.group()): + if unit_str == Constants.TIMEX_HOUR: + date = reference + timedelta(hours=-number) + elif unit_str == Constants.TIMEX_MINUTE: + date = reference + timedelta(minutes=-number) + elif unit_str == Constants.TIMEX_SECOND: + date = reference + timedelta(seconds=-number) + else: + return result + + result.timex = DateTimeFormatUtil.luis_date_from_datetime(date) + result.future_value = result.past_value = date + result.success = True + return result + + after_match = regex.search(self.config.after_regex, source) + if after_match and suffix.startswith(after_match.group()): + if unit_str == Constants.TIMEX_HOUR: + date = reference + timedelta(hours=number) + elif unit_str == Constants.TIMEX_MINUTE: + date = reference + timedelta(minutes=number) + elif unit_str == Constants.TIMEX_SECOND: + date = reference + timedelta(seconds=number) + else: + return result + + result.timex = DateTimeFormatUtil.luis_date_from_datetime(date) + result.future_value = result.past_value = date + result.success = True + return result + return result + + def convert_CJK_to_num(self, num_str: str) -> int: + num = -1 + er: ExtractResult = next( + iter(self.config.integer_extractor.extract(num_str)), None) + if er and er.type == NumConstants.SYS_NUM_INTEGER: + try: + num = int(self.config.number_parser.parse(er).value) + except ValueError: + num = 0 + return num diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_datetimeperiod.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_datetimeperiod.py new file mode 100644 index 0000000000..7e6affd3eb --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_datetimeperiod.py @@ -0,0 +1,1239 @@ +from abc import abstractmethod +from datetime import datetime, timedelta +from collections import namedtuple +from typing import List, Pattern, Dict, Match + +import regex + +from recognizers_text.extractor import Extractor, ExtractResult +from recognizers_text.parser import Parser +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration, Token, merge_all_tokens, \ + ExtractResultExtension, RegExpUtility, DateTimeParseResult, DateTimeResolutionResult, \ + TimexUtil, DateUtils, DateTimeFormatUtil, TimeTypeConstants + +MatchedIndex = namedtuple('MatchedIndex', ['matched', 'index']) +MatchedTimeRegex = namedtuple( + 'MatchedTimeRegex', ['matched', 'timex', 'begin_hour', 'end_hour', 'end_min']) +MatchedTimeRegexAndSwift = namedtuple( + 'MatchedTimeRegex', ['matched', 'timex', 'begin_hour', 'end_hour', 'end_min', 'swift']) +BeginEnd = namedtuple('BeginEnd', ['begin', 'end']) + + +class CJKDateTimePeriodExtractorConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def preposition_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def till_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def specific_time_of_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_of_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def followed_unit(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def past_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def future_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_period_left_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def relative_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def rest_of_date_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def am_pm_desc_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def this_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def before_after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_extractor(self) -> Extractor: + raise NotImplementedError + + @property + @abstractmethod + def single_date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def single_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def single_date_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @abstractmethod + def get_from_token_index(self, text: str) -> MatchedIndex: + raise NotImplementedError + + @abstractmethod + def has_connector_token(self, text: str) -> bool: + raise NotImplementedError + + @abstractmethod + def get_between_token_index(self, text: str) -> MatchedIndex: + raise NotImplementedError + + +class BaseCJKDateTimePeriodExtractor(DateTimeExtractor): + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_DATETIME + + def __init__(self, config: CJKDateTimePeriodExtractorConfiguration): + self.config = config + + def extract(self, text: str, reference_time: datetime = None) -> List[ExtractResult]: + if reference_time is None: + reference_time = datetime.now() + # Date and time Extractions should be extracted from the text only once, + # and shared in the methods below, passed by value + + date_ers = self.config.single_date_extractor.extract(text, reference_time) + time_ers = self.config.single_time_extractor.extract(text, reference_time) + time_range_ers = self.config.time_period_extractor.extract(text, reference_time) + date_time_ers = self.config.single_date_time_extractor.extract(text, reference_time) + + tokens: List[Token] = list() + + tokens.extend(self.merge_date_and_time_period(text, date_ers, time_range_ers)) + tokens.extend(self.merge_two_time_points(text, date_time_ers, time_ers)) + tokens.extend(self.match_duration(text, reference_time)) + tokens.extend(self.match_relative_unit(text)) + tokens.extend(self.match_date_with_period_suffix(text, date_ers)) + tokens.extend(self.match_number_with_unit(text)) + tokens.extend(self.match_night(text, reference_time)) + tokens.extend(self.merge_date_with_time_period_suffix(text, date_ers, time_ers)) + + return merge_all_tokens(tokens, text, self.extractor_type_name) + + # merge Date and Time period + def merge_date_and_time_period(self, text: str, data_ers: List[ExtractResult], time_range_ers: List[ExtractResult]) \ + -> List[Token]: + ret: List[Token] = list() + time_points: List[ExtractResult] = list() + + # handle the overlap problem + j = 0 + for data_er in data_ers: + time_points.append(data_er) + while j < len(time_range_ers) and time_range_ers[j].start + time_range_ers[j].length <= data_er.start: + time_points.append(time_range_ers[j]) + j += 1 + + while j < len(time_range_ers) and ExtractResultExtension.is_overlap(time_range_ers[j], data_er): + j += 1 + + while j < len(time_range_ers): + time_points.append(time_range_ers[j]) + j += 1 + + time_points = list(sorted(time_points, key=lambda x: x.start)) + + # merge {Date} {TimePeriod} + idx = 0 + while idx < len(time_points) - 1: + if time_points[idx].type == Constants.SYS_DATETIME_DATE and \ + time_points[idx + 1].type == Constants.SYS_DATETIME_TIMEPERIOD: + middle_begin = time_points[idx].start + time_points[idx].length + middle_end = time_points[idx + 1].start + + middle_str = text[middle_begin: middle_end - middle_begin].strip() + preposition_regex_match = regex.match(self.config.preposition_regex, middle_str) + if middle_str or preposition_regex_match: + period_begin = time_points[idx].start + period_end = time_points[idx + 1].start + time_points[idx + 1].length + ret.append(Token(period_begin, period_end)) + idx += 2 + continue + idx += 1 + idx += 1 + return ret + + def merge_two_time_points(self, text: str, date_time_ers: List[ExtractResult], time_ers: List[ExtractResult]) \ + -> List[Token]: + + ret: List[Token] = list() + time_points: List[ExtractResult] = list() + + # handle the overlap problem + j = 0 + for date_time_er in date_time_ers: + time_points.append(date_time_er) + while j < len(time_ers) and time_ers[j].start + time_ers[j].length <= date_time_er.start: + time_points.append(time_ers[j]) + j += 1 + while j < len(time_ers) and ExtractResultExtension.is_overlap(time_ers[j], date_time_er): + j += 1 + + while j < len(time_ers): + time_points.append(time_ers[j]) + j += 1 + + time_points = list(sorted(time_points, key=lambda x: x.start)) + + # merge "{TimePoint} to {TimePoint}", "between {TimePoint} and {TimePoint}" + idx = 0 + while idx < len(time_points) - 1: + # if both ends are Time. then this is a TimePeriod, not a DateTimePeriod + if time_points[idx].type == Constants.SYS_DATETIME_TIME \ + and time_points[idx + 1].type == Constants.SYS_DATETIME_TIME: + idx += 1 + continue + + middle_begin = time_points[idx].start + time_points[idx].length + middle_end = time_points[idx + 1].start + + middle_str = text[middle_begin: middle_end - middle_begin].strip() + + # handle "{TimePoint} to {TimePoint}" + if RegExpUtility.is_exact_match(self.config.till_regex, middle_str, True): + period_begin = time_points[idx].start + period_end = time_points[idx + 1].start + time_points[idx + 1].length + + # handle "from" + before_str = time_points[0:period_begin] + match_from = self.config.get_from_token_index(before_str) + from_token_index = match_from if match_from.matched else self.config.get_between_token_index(before_str) + + if from_token_index.matched: + period_begin = from_token_index.index + else: + after_str = text[period_end:] + after_token_index = self.config.get_from_token_index(after_str) + if after_token_index.matched: + period_end += after_token_index.index + + ret.append(Token(period_begin, period_end)) + idx += 2 + continue + + # handle "between {TimePoint} and {TimePoint}" + if self.config.has_connector_token(middle_str): + period_begin = time_points[idx].start + period_end = time_points[idx + 1].start + time_points[idx + 1].length + + # handle "between" + after_str = text[period_end:] + after_token_between_index = self.config.get_between_token_index(after_str) + if after_token_between_index.matched: + ret.append(Token(period_begin, period_end + after_token_between_index.index)) + idx += 2 + continue + + idx += 1 + + return ret + + def match_night(self, text: str, reference_time: datetime) -> List[Token]: + ret: List[Token] = list() + + matches = regex.finditer(self.config.specific_time_of_day_regex, text) + ret.extend(map(lambda x: Token(x.start(), x.end()), matches)) + + # Date followed by morning, afternoon + ers = self.config.single_date_extractor.extract(text, reference_time) + if len(ers) == 0: + return ret + + for er in ers: + if er.start + er.length > len(text): + after_str = text[er.start + er.length] + else: + after_str = text[0] + match = regex.match(self.config.time_of_day_regex, after_str) + if match: + middle_str = after_str[0:match.start()] + if not middle_str.strip() or regex.search(self.config.preposition_regex, middle_str): + ret.append(Token(er.start, er.start + er.length + match.start() + match.end())) + return ret + + # Cases like "2015年1月1日の2時以降", "On January 1, 2015 after 2:00" + def merge_date_with_time_period_suffix(self, text: str, date_ers: List[ExtractResult], + time_ers: List[ExtractResult]) -> List[Token]: + ret: List[Token] = list() + + if not any(date_ers): + return ret + if not any(time_ers): + return ret + + ers: [Match] = date_ers + ers.extend(time_ers) + + ers = sorted(ers, key=lambda x: x.start) + + i = 0 + while i < len(ers) - 1: + j = i + 1 + while j < len(ers) and ExtractResultExtension.is_overlap(ers[i], ers[j]): + j += 1 + if j >= len(ers): + break + + if ers[i].type == Constants.SYS_DATETIME_DATE and ers[j].type == Constants.SYS_DATETIME_TIME: + middle_begin = ers[i].start + (ers[i].length or 0) + middle_end = ers[j].start or 0 + + if middle_begin > middle_end: + i = j + 1 + continue + + middle_str = text[middle_begin: middle_end - middle_begin].strip() + + match = regex.match(self.config.before_after_regex, middle_str) + if match: + begin = ers[i].start or 0 + end = (ers[j].start or 0) + (ers[j].length or 0) + ret.append(Token(begin, end)) + + i = j + 1 + continue + i = j + return ret + + # Extract patterns that involve durations e.g. "Within 5 hours from now" + def match_duration(self, text: str, reference: datetime) -> List[Token]: + ret: List[Token] = list() + duration_extractions: List[ExtractResult] = self.config.duration_extractor.extract(text, reference) + + for duration_extraction in duration_extractions: + if not regex.search(self.config.unit_regex, duration_extraction.text): + continue + duration = Token(duration_extraction.start or 0, + (duration_extraction.start + duration_extraction.length or 0)) + before_str = text[0:duration.start] + after_str = text[duration.start + duration.length:].strip() + + if not before_str and not after_str: + continue + + start_out = -1 + end_out = -1 + match = regex.match(self.config.future_regex, after_str) + + in_prefix_match = regex.match(self.config.this_regex, before_str) + in_prefix = True if in_prefix_match else False + + if RegExpUtility.get_group(match, Constants.WITHIN_GROUP_NAME): + start_token = in_prefix_match.start() if in_prefix else duration.start + within_length = len(RegExpUtility.get_group(match, Constants.WITHIN_GROUP_NAME)) + end_token = duration.end + (0 if in_prefix else match.start() + match.end()) + + match = regex.match(self.config.unit_regex, text[duration.start:duration.length]) + + if match: + start_out = start_token + end_out = end_token + within_length if in_prefix else end_token + + ret.append(Token(start_out, end_out)) + + return ret + + def match_relative_unit(self, text: str) -> List[Token]: + ret: List[Token] = list() + matches = list(regex.finditer(self.config.rest_of_date_regex, text)) + ret.extend(map(lambda x: Token(x.start(), x.start() + x.end()), matches)) + return ret + + # For cases like "Early in the day Wednesday" + def match_date_with_period_suffix(self, text: str, date_ers: List[ExtractResult]) -> List[Token]: + ret: List[Token] = list() + + for date_er in date_ers: + date_str_end = int(date_er.start + date_er.length) + after_str = text[date_str_end: len(text) - date_str_end] + match_after = RegExpUtility.match_begin(self.config.time_period_left_regex, after_str, True) + if match_after: + ret.append(Token(int(date_er.start), date_str_end + match_after.index + match_after.length)) + + return ret + + def match_number_with_unit(self, text: str) -> List[Token]: + ret: List[Token] = list() + durations: List[Token] = list() + + ers = self.config.cardinal_extractor.extract(text) + + for er in ers: + after_str = text[(er.start + er.length) or 0:] + followed_unit_match = RegExpUtility.match_begin(self.config.followed_unit, after_str, True) + + if followed_unit_match: + durations.append(Token(er.start or 0, (er.start + er.length) or 0 + + len(followed_unit_match.group()))) + + past_regex_match = RegExpUtility.match_begin(self.config.past_regex, after_str, True) + if past_regex_match: + durations.append(Token(er.start or 0, (er.start + er.length) or 0 + len(past_regex_match.group()))) + + for match in RegExpUtility.get_matches(self.config.unit_regex, text): + durations.append(Token(text.index(match), len(match))) + + for duration in durations: + before_str = text[0:duration.start] + if not before_str.strip(): + continue + + past_regex_match = RegExpUtility.match_end(self.config.past_regex, before_str, True) + if past_regex_match: + ret.append(Token(past_regex_match.index, duration.end)) + continue + + future_regex_match = RegExpUtility.match_end(self.config.future_regex, before_str, True) + if future_regex_match: + ret.append(Token(future_regex_match.index, duration.end)) + + time_period_left_regex_match = RegExpUtility.match_end(self.config.time_period_left_regex, before_str, True) + if time_period_left_regex_match: + ret.append(Token(time_period_left_regex_match.index, duration.end)) + + return ret + + +class CJKDateTimePeriodParserConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_extractor(self) -> Extractor: + raise NotImplementedError + + @property + @abstractmethod + def cardinal_parser(self) -> Parser: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def date_time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_period_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def specific_time_of_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_of_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def next_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def last_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def past_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def future_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def weekday_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_period_left_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def rest_of_date_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def am_pm_desc_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + raise NotImplementedError + + @abstractmethod + def get_matched_time_range(self, text: str) -> MatchedTimeRegex: + raise NotImplementedError + + @abstractmethod + def get_matched_time_range_and_swift(self, text: str) -> MatchedTimeRegexAndSwift: + raise NotImplementedError + + +class BaseCJKDateTimePeriodParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_DATETIME + + def __init__(self, config: CJKDateTimePeriodParserConfiguration): + self.config = config + + def parse(self, source: ExtractResult, reference: datetime = None) -> DateTimeParseResult: + reference_time = reference if reference is not None else datetime.now() + value = None + + if source.type == self.parser_type_name: + inner_result = self.merge_date_and_time_period(source.text, reference_time) + + if not inner_result.success: + inner_result = self.merge_two_time_points(source.text, reference_time) + + if not inner_result.success: + inner_result = self.parse_duration(source.text, reference_time) + + if not inner_result.success: + inner_result = self.parse_specific_night(source.text, reference_time) + + if not inner_result.success: + inner_result = self.parse_number_with_unit(source.text, reference_time) + + if not inner_result.success: + inner_result = self.parse_relative_unit(source.text, reference_time) + + if not inner_result.success: + inner_result = self.parse_date_with_period_suffix(source.text, reference_time) + + if not inner_result.success: + inner_result = self.parse_date_with_time_period_suffix(source.text, reference_time) + + if inner_result.success: + if inner_result.mod == Constants.BEFORE_MOD: + # Cases like "last tuesday by 2:00 pm" there is no StartTime + inner_result.future_resolution = { + TimeTypeConstants.END_DATETIME: DateTimeFormatUtil + .format_date_time(datetime(inner_result.future_value)) + } + inner_result.past_resolution = { + TimeTypeConstants.END_DATETIME: DateTimeFormatUtil + .format_date_time(datetime(inner_result.past_value)) + } + else: + inner_result.future_resolution = { + TimeTypeConstants.START_DATETIME: DateTimeFormatUtil. + format_date_time(inner_result.future_value[0]), + TimeTypeConstants.END_DATETIME: DateTimeFormatUtil. + format_date_time(inner_result.future_value[1]) + } + + inner_result.past_resolution = { + TimeTypeConstants.START_DATETIME: DateTimeFormatUtil. + format_date_time(inner_result.past_value[0]), + TimeTypeConstants.END_DATETIME: DateTimeFormatUtil. + format_date_time(inner_result.past_value[1]) + } + + value = inner_result + + ret = DateTimeParseResult() + ret.text = source.text + ret.start = source.start + ret.length = source.length + ret.type = source.type + ret.date = source.data + ret.value = value + ret.timex_str = '' if not value else value.timex + ret.resolution_str = '' + return ret + + def filter_result(self, query: str, candidare_results: List[DateTimeParseResult]) -> List[DateTimeParseResult]: + return candidare_results + + def merge_date_and_time_period(self, text: str, reference_time: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + + er1 = self.config.date_extractor.extract(text, reference_time) + er2 = self.config.time_period_extractor.extract(text, reference_time) + + if len(er1) != 1 or len(er2) != 1: + return ret + + pr1 = self.config.date_parser.parse(er1[0], reference_time) + pr2 = self.config.time_period_parser.parse(er2[0], reference_time) + time_range = tuple(pr2.value.future_value) + begin_time = time_range[0] + end_time = time_range[1] + future_date = pr1.value.future_value + past_date = pr1.value.past_value + + # handle cases with time like 25時 which resolve to the next day + swift_day = 0 + timex_hours = TimexUtil.parse_hours_from_time_period_timex(pr2.timex_str) + ampm_desc_regex_match = regex.match(self.config.am_pm_desc_regex, text) + + if ampm_desc_regex_match and timex_hours[0] < Constants.HALF_DAY_HOUR_COUNT \ + and timex_hours[1] < Constants.HALF_DAY_HOUR_COUNT: + ret.comment = Constants.COMMENT_AMPM + + if timex_hours[0] > Constants.DAY_HOUR_COUNT: + past_date = past_date + timedelta(days=1) + future_date = future_date + timedelta(days=1) + elif timex_hours[1] > Constants.DAY_HOUR_COUNT: + swift_day += 1 + + past_date_alt = past_date + timedelta(days=swift_day) + future_date_alt = future_date + timedelta(days=swift_day) + + ret.future_value = ( + DateUtils.safe_create_from_min_value( + future_date.year, future_date.month, future_date.day, + begin_time.hour, begin_time.minute, begin_time.second), + DateUtils.safe_create_from_min_value( + future_date_alt.year, future_date_alt.month, future_date_alt.day, + end_time.hour, end_time.minute, end_time.second) + ) + + ret.past_value = ( + DateUtils.safe_create_from_min_value( + past_date.year, past_date.month, past_date.day, + begin_time.hour, begin_time.minute, begin_time.second), + DateUtils.safe_create_from_min_value( + past_date_alt.year, past_date_alt.month, past_date_alt.day, + end_time.hour, end_time.minute, end_time.second) + ) + + ret.timex = TimexUtil.generate_split_date_time_period_timex(pr1.timex_str, pr2.timex_str) + ret.success = True if ret.timex else False + + return ret + + # Cases like "last tuesday by 2:00pm" + def parse_date_with_time_period_suffix(self, text: str, reference_time: datetime): + ret = DateTimeResolutionResult() + + date_er = self.config.date_extractor.extract(text, reference_time) + time_er = self.config.time_extractor.extract(text, reference_time) + + if len(date_er) > 0 and len(time_er) > 0: + match = RegExpUtility.match_end(self.config.past_regex, text, True) + + if RegExpUtility.get_group(match, Constants.BEFORE_MOD): + ret.mod = Constants.BEFORE_MOD + + date_pr = self.config.date_parser.parse(date_er[0], reference_time) + time_pr = self.config.time_parser.parse(time_er[0], reference_time) + + if date_pr and time_pr: + time_resolution_result = time_pr.value + date_resolution_result = date_pr.value + future_date_value = date_resolution_result.future_value + past_date_value = date_resolution_result.past_value + future_time_value = time_resolution_result.future_value + past_time_value: datetime = time_resolution_result.past_value + + ret.comment = time_resolution_result.comment + ret.timex = TimexUtil.combine_date_and_time_timex(date_pr.timex_str, time_pr.timex_str) + + ret.future_value = DateUtils.safe_create_from_value(future_date_value.year, + future_date_value.month, + future_date_value.day, + future_date_value.hour, + future_date_value.minute, + future_date_value.second) + ret.past_value = DateUtils.safe_create_from_value(past_date_value.year, + past_date_value.month, + past_date_value.day, + past_date_value.hour, + past_date_value.minute, + past_date_value.second) + + ret.sub_date_time_entities = [date_pr, time_pr] + ret.success = True + + return ret + + def merge_two_time_points(self, text: str, reference_time: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + pr1: DateTimeParseResult = None + pr2: DateTimeParseResult = None + + both_have_dates: bool = False + begin_has_date: bool = False + end_has_date: bool = False + + er1 = self.config.time_extractor.extract(text, reference_time) + er2 = self.config.date_time_extractor.extract(text, reference_time) + + right_time = DateUtils.safe_create_from_value(DateUtils.min_value, + reference_time.year, + reference_time.month, + reference_time.day) + left_time = DateUtils.safe_create_from_value(DateUtils.min_value, + reference_time.year, + reference_time.month, + reference_time.day) + + match = regex.match(self.config.future_regex, text) + + # cases including 'within' are processed in ParseDuration + if RegExpUtility.get_group(match, Constants.WITHIN_GROUP_NAME): + return self.parse_duration(text, reference_time) + + match_weekday = regex.match(self.config.weekday_regex, text) + + if match_weekday: + return ret + + if len(er2) == 2: + pr1 = self.config.date_time_parser.parse(er2[0], reference_time) + pr2 = self.config.date_time_parser.parse(er2[1], reference_time) + both_have_dates = True + + elif len(er2) == 1 and len(er1) == 2: + if not ExtractResultExtension.is_overlap(er2[0], er1[1]): + pr1 = self.config.time_parser.parse(er1[0], reference_time) + pr2 = self.config.date_time_parser.parse(er2[0], reference_time) + end_has_date = True + else: + pr1 = self.config.date_time_parser.parse(er2[0], reference_time) + pr2 = self.config.time_parser.parse(er1[0], reference_time) + begin_has_date = True + + elif len(er2) == 1 and len(er1) == 1: + if er1[0].start < er2[0].start: + pr1 = self.config.time_parser.parse(er1[0], reference_time) + pr2 = self.config.date_time_parser.parse(er2[0], reference_time) + end_has_date = True + else: + pr1 = self.config.date_time_parser.parse(er2[0], reference_time) + pr2 = self.config.time_parser.parse(er1[0], reference_time) + begin_has_date = True + + elif len(er1) == 2: + # if both ends are Time. then this is a TimePeriod, not a DateTimePeriod + return ret + + else: + return ret + + if not pr1.value or not pr2.value: + return ret + + future_begin: datetime = pr1.value.future_value + future_end: datetime = pr2.value.future_value + + past_begin = pr1.value.past_value + + if future_begin > future_end: + future_begin = past_begin + + if both_have_dates: + right_time = DateUtils.safe_create_from_value(DateUtils.min_value, + future_end.year, + future_end.month, + future_end.day) + left_time = DateUtils.safe_create_from_value(DateUtils.min_value, + future_begin.year, + future_begin.month, + future_begin.day) + elif begin_has_date: + left_time = DateUtils.safe_create_from_value(DateUtils.min_value, + future_begin.year, + future_begin.month, + future_begin.day) + elif end_has_date: + right_time = DateUtils.safe_create_from_value(DateUtils.min_value, + future_end.year, + future_end.month, + future_end.day) + left_result: DateTimeResolutionResult = pr1.value + right_result: DateTimeResolutionResult = pr2.value + left_result_time: datetime = left_result.future_value + right_result_time: datetime = right_result.future_value + + # check if the right time is smaller than the left time, if yes, add one day + hour = left_result_time.hour if left_result_time.hour > 0 else 0 + minute = left_result_time.minute if left_result_time.minute > 0 else 0 + second = left_result_time.second if left_result_time.second > 0 else 0 + + left_time = left_time + timedelta(hours=hour, minutes=minute, seconds=second) + + hour = right_result_time.hour if right_result_time.hour > 0 else 0 + minute = right_result_time.minute if right_result_time.minute > 0 else 0 + second = right_result_time.second if right_result_time.second > 0 else 0 + + right_time = right_time + timedelta(hours=hour, minutes=minute, seconds=second) + + # the right side time contains "ampm", while the left side doesn't + if right_result.comment == Constants.COMMENT_AMPM and not left_result.comment and right_time < left_time: + right_time = right_time + timedelta(days=Constants.HALF_DAY_HOUR_COUNT) + + if right_time < left_time: + right_time = right_time + timedelta(days=1) + + ret.future_value = ret.past_value = (left_time, right_time) + + left_timex = pr1.timex_str + right_timex = pr2.timex_str + + if begin_has_date: + right_timex = DateTimeFormatUtil.luis_date_short_time(right_time, pr2.timex_str) + elif end_has_date: + left_timex = DateTimeFormatUtil.luis_date_short_time(left_time, pr1.timex_str) + + ret.timex = TimexUtil.generate_date_time_period_timex(left_timex, right_timex, right_time - left_time) + ret.success = True + return ret + + def parse_duration(self, text: str, reference_time: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + ers = self.config.duration_extractor.extract(text, reference_time) + + if len(ers) == 1: + pr = self.config.duration_parser.parse(ers[0]) + after_str = text[pr.start + pr.legth:].strip() + + if pr.value: + swift_seconds = 0 + mod = '' + duration_result: DateTimeResolutionResult = pr.value + + if type(duration_result.past_value) == float and type(duration_result.future_value) == float: + swift_seconds += int(duration_result.future_value) + + begin_time: datetime = None + end_time = begin_time = reference_time + match = regex.match(self.config.future_regex, after_str) + + if RegExpUtility.get_group(match, Constants.WITHIN_GROUP_NAME): + end_time = begin_time + timedelta(seconds=swift_seconds) + ret.timex = TimexUtil.generate_date_time_period_timex(begin_time, end_time, duration_result.timex) + + ret.future_value = ret.past_value = (begin_time, end_time) + ret.success = True + + if mod: + pr.value.Mod = mod + + ret.sub_date_time_entities = [pr] + return ret + + return ret + + # Parse cases like "this night" + def parse_specific_night(self, text: str, reference_time: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + trimmed_text = text.strip() + begin_hour = end_hour = end_min = 0 + time_str: str = "" + + # Handle 昨晚 (last night),今晨 (this morning) + if RegExpUtility.is_exact_match(self.config.specific_time_of_day_regex, trimmed_text, True): + # handle the ambiguous case "ぎりぎり" [the latest possible time] + latest = regex.match(self.config.specific_time_of_day_regex, text) + + if RegExpUtility.get_group(latest, Constants.LATER_GROUP_NAME): + begin_date: datetime = reference_time + timedelta(minutes=-1) + end_date: datetime = reference_time + + diff = end_date - begin_date + + ret.timex = TimexUtil.generate_date_time_period_timex(begin_date, end_date) + ret.future_value = ret.past_value = (begin_date, end_date) + ret.success = True + return ret + + if not self.config.get_matched_time_range_and_swift(trimmed_text): + return ret + + night_regex_match = regex.match(self.config.next_regex, trimmed_text) + last_regex_match = regex.match(self.config.last_regex, trimmed_text) + swift = 0 + if night_regex_match: + swift = 1 + elif last_regex_match: + swift = -1 + + date = datetime.date(reference_time + timedelta(days=swift)) + day = date.day + month = date.month + year = date.year + + ret.timex = DateTimeFormatUtil.format_date(date) + time_str + ret.future_value = ret.past_value = (DateUtils.safe_create_from_value(year, month, day, begin_hour, 0, 0), + DateUtils.safe_create_from_value(year, month, day, end_hour, end_min, + end_min)) + ret.success = True + return ret + + # Handle cases like morning, afternoon + if not self.config.get_matched_time_range(trimmed_text): + return ret + + if RegExpUtility.is_exact_match(self.config.specific_time_of_day_regex, trimmed_text, True): + swift = 0 + night_regex_match = regex.match(self.config.next_regex, trimmed_text) + last_regex_match = regex.match(self.config.next_regex, trimmed_text) + if night_regex_match: + swift = 1 + elif last_regex_match: + swift = -1 + date = datetime.date(reference_time + timedelta(days=swift)) + day = date.day + month = date.month + year = date.year + + ret.timex = DateTimeFormatUtil.format_date(date) + time_str + ret.future_value = ret.past_value = (DateUtils.safe_create_from_value(year, month, day, begin_hour, 0, 0), + DateUtils.safe_create_from_value(year, month, day, end_hour, end_min, + end_min)) + ret.success = True + return ret + + # handle Date followed by morning, afternoon + match = regex.match(self.config.time_of_day_regex, trimmed_text) + + if match: + before_str = trimmed_text[0:match.start()].strip() + ers = self.config.date_extractor.extract(before_str, reference_time) + + if len(ers) == 0 or ers[0].length != len(before_str): + return ret + + pr = self.config.date_parser.parse(ers[0], reference_time) + future_date = pr.value.future_value + past_date = pr.value.past_value + + ret.timex = pr.timex_str + time_str + + ret.future_value = (DateUtils.safe_create_from_value(future_date.year, + future_date.month, + future_date.day, + begin_hour, 0, 0), + DateUtils.safe_create_from_value(future_date.year, + future_date.month, + future_date.day, + end_hour, end_min, end_min)) + ret.past_value = (DateUtils.safe_create_from_value(past_date.year, + past_date.month, + past_date.day, + past_date, 0, 0), + DateUtils.safe_create_from_value(past_date.year, + past_date.month, + past_date.day, + end_hour, end_min, end_min)) + ret.success = True + return ret + + return ret + + # parse "in 20 minutes" + def parse_number_with_unit(self, text: str, reference_time: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + unit_str: str = None + + # if there are spaces between number and unit + ers = self.config.cardinal_extractor.extract(text) + if len(ers) == 1: + pr = self.config.cardinal_parser.parse(ers[0]) + src_unit = text[ers[0].start + ers[0].length].strip() + + if src_unit.startswith("个"): + src_unit = src_unit[1:] + + before_str = text[0: ers[0].start] + if src_unit in self.config.unit_map: + num_str = pr.resolution_str + unit_str = self.config.unit_map[src_unit] + prefix_match = RegExpUtility.exact_match(self.config.past_regex, before_str, True) + if prefix_match.success: + begin_date: datetime = None + end_date: datetime = None + + if unit_str == "H": + begin_date = reference_time + timedelta(hours=-float(pr.value)) + end_date = reference_time + elif unit_str == "M": + begin_date = reference_time + timedelta(minutes=-float(pr.value)) + end_date = reference_time + elif unit_str == "S": + begin_date = reference_time + timedelta(seconds=-float(pr.value)) + end_date = reference_time + else: + return ret + + ret.timex = f"{DateTimeFormatUtil.luis_date(begin_date)}T" \ + f"{DateTimeFormatUtil.luis_time(begin_date)}," \ + f"{DateTimeFormatUtil.luis_date(end_date)}T" \ + f"{DateTimeFormatUtil.luis_time(end_date)},PT" \ + f"{num_str}{unit_str[0]}" + ret.future_value = ret.past_value = (begin_date, end_date) + ret.success = True + return ret + + if not prefix_match.success: + prefix_match = RegExpUtility.match_end(self.config.time_period_left_regex, before_str, True) + + if prefix_match.success: + begin_date: datetime = None + end_date: datetime = None + + if unit_str == "H": + begin_date = reference_time + end_date = reference_time + timedelta(days=float(pr.value)) + elif unit_str == "M": + begin_date = reference_time + end_date = reference_time + timedelta(minutes=float(pr.value)) + elif unit_str == "S": + begin_date = reference_time + end_date = reference_time + timedelta(seconds=float(pr.value)) + else: + return ret + + ret.timex = f"{DateTimeFormatUtil.luis_date(begin_date)}T" \ + f"{DateTimeFormatUtil.luis_time(begin_date)}," \ + f"{DateTimeFormatUtil.luis_date(end_date)}T" \ + f"{DateTimeFormatUtil.luis_time(end_date)},PT" \ + f"{num_str}{unit_str[0]}" + ret.future_value = ret.past_value = (begin_date, end_date) + ret.success = True + return ret + + # handle "last hour" + match = regex.match(self.config.unit_regex, text) + if match: + src_unit = RegExpUtility.get_group(match, Constants.UNIT_GROUP_NAME) + before_str = text[0:match.start()].strip() + + if src_unit in self.config.unit_map: + unit_str = self.config.unit_regex[src_unit] + + if RegExpUtility.is_exact_match(self.config.past_regex, before_str, True): + begin_date: datetime = None + end_date: datetime = None + + if unit_str == "H": + begin_date = reference_time + timedelta(days=-1) + end_date = reference_time + elif unit_str == "M": + begin_date = reference_time + timedelta(minutes=-1) + end_date = reference_time + elif unit_str == "S": + begin_date = reference_time + timedelta(seconds=-1) + end_date = reference_time + else: + return ret + + ret.timex = f"{DateTimeFormatUtil.luis_date(begin_date)}T" \ + f"{DateTimeFormatUtil.luis_time(begin_date)}," \ + f"{DateTimeFormatUtil.luis_date(end_date)}T" \ + f"{DateTimeFormatUtil.luis_time(end_date)},PT" \ + f"{unit_str[0]}" + ret.future_value = ret.past_value = (begin_date, end_date) + ret.success = True + return ret + + if RegExpUtility.is_exact_match(self.config.future_regex, before_str, True): + begin_date: datetime = None + end_date: datetime = None + + if unit_str == "H": + beginDate = reference_time + endDate = reference_time + timedelta(hours=1) + elif unit_str == "M": + beginDate = reference_time + endDate = reference_time + timedelta(minutes=1) + elif unit_str == "S": + beginDate = reference_time + endDate = reference_time + timedelta(seconds=1) + else: + return ret + + ret.timex = f"{DateTimeFormatUtil.luis_date(begin_date)}T" \ + f"{DateTimeFormatUtil.luis_time(begin_date)}," \ + f"{DateTimeFormatUtil.luis_date(end_date)}T" \ + f"{DateTimeFormatUtil.luis_time(end_date)},PT" \ + f"{unit_str[0]}" + ret.future_value = ret.past_value = (begin_date, end_date) + ret.success = True + return ret + + return ret + + def parse_relative_unit(self, text: str, reference_time: datetime): + ret = DateTimeResolutionResult() + + match = regex.match(self.config.rest_of_date_regex, text) + + if match: + src_unit = RegExpUtility.get_group(match, Constants.UNIT_GROUP_NAME) + unit_str = self.config.unit_map[src_unit] + swift_value = 1 + begin_time: datetime = reference_time + end_time: datetime = reference_time + + if src_unit in self.config.unit_map: + ret.timex = TimexUtil.generate_relative_unit_date_time_period_timex(begin_time, + end_time, + reference_time, + unit_str, + swift_value) + ret.future_value = ret.past_value = (begin_time, end_time) + ret.success = True if ret.timex else False + return ret + + return ret + + # cases like "Early in the day Wednesday" + def parse_date_with_period_suffix(self, text: str, reference_time: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + date_result = self.config.date_extractor.extract(text, reference_time) + + if len(date_result) > 0: + pr = DateTimeParseResult() + after_str = text[date_result[0].start + date_result[0].length: + len(text) - date_result[0].start + date_result[0].length].lstrip() + match = regex.match(self.config.time_period_left_regex, after_str) + if match: + pr = self.config.date_parser.parse(date_result[0], reference_time) + + if match: + if pr.value: + start_time: datetime = pr.value.future_value + start_time = datetime(start_time.year, start_time.month, start_time.day) + end_time: datetime = start_time + + if RegExpUtility.get_group(match, Constants.EARLY_PREFIX_GROUP_NAME): + end_time = end_time + timedelta(hours=Constants.HALF_DAY_HOUR_COUNT) + ret.mod = Constants.EARLY_MOD + + elif RegExpUtility.get_group(match, Constants.MID_PREFIX_GROUP_NAME): + start_time = start_time + timedelta(hours=Constants.HALF_DAY_HOUR_COUNT - + Constants.HALF_MID_DAY_DURATION_HOUR_COUNT) + end_time = end_time + timedelta( + hours=Constants.HALF_DAY_HOUR_COUNT + Constants.HALF_MID_DAY_DURATION_HOUR_COUNT) + ret.mod = Constants.MID_MOD + + elif RegExpUtility.get_group(match, Constants.LATE_PREFIX_GROUP_NAME): + start_time = start_time + timedelta(hours=Constants.HALF_DAY_HOUR_COUNT) + end_time = start_time + timedelta(hours=Constants.HALF_DAY_HOUR_COUNT) + ret.mod = Constants.LATE_MOD + + else: + return ret + + ret.timex = pr.timex_str + ret.past_value = ret.future_value = (start_time, end_time) + ret.success = True + return ret diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_duration.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_duration.py new file mode 100644 index 0000000000..d67f3ea64c --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_duration.py @@ -0,0 +1,421 @@ +from abc import abstractmethod +from typing import Dict, List, Pattern, Optional +from datetime import datetime + +from regex import regex + +from recognizers_number_with_unit.number_with_unit.parsers import UnitValue +from recognizers_date_time.date_time import Constants, TimeTypeConstants +from recognizers_date_time.date_time.utilities import RegExpUtility, DateTimeOptionsConfiguration,\ + ExtractResultExtension, DurationParsingUtil, Token, get_tokens_from_regex, DateTimeOptions, Metadata, TimexUtil, \ + DateTimeResolutionResult +from recognizers_text.extractor import Extractor +from recognizers_text.parser import Parser +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_text.extractor import ExtractResult + + +class CJKDurationExtractorConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def duration_unit_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def duration_connector_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def year_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def all_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def half_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def relative_duration_unit_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def during_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def some_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def more_or_less_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def internal_extractor(self) -> Extractor: + return NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + return NotImplementedError + + @property + @abstractmethod + def unit_value_map(self) -> Dict[str, float]: + return NotImplementedError + + @property + @abstractmethod + def ambiguity_duration_filters_dict(self) -> Dict[Pattern, Pattern]: + return NotImplementedError + + +class BaseCJKDurationExtractor(DateTimeExtractor): + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_DURATION + + def __init__(self, config: CJKDurationExtractorConfiguration, merge: bool = True): + self.config = config + self.merge = merge + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + # Use unit to extract + ret_list = self.config.internal_extractor.extract(source) + result: List[ExtractResult] = list() + + for er_result in ret_list: + # filter + if regex.search(self.config.year_regex, er_result.text): + continue + + result.append(er_result) + + # handle "all day", "more days", "few days" + result.extend(self.implicit_duration(source)) + result = ExtractResultExtension.merge_all_tokens(result) + + if self.merge: + result = self.merge_multiple_duration(source, result) + result = ExtractResultExtension.filter_ambiguity(result, source, + self.config.ambiguity_duration_filters_dict) + + return result + + def merge_multiple_duration(self, text: str, er: List[ExtractResult]) -> List[ExtractResult]: + if len(er) <= 1: + return er + + unit_map = self.config.unit_map + unit_value_map = self.config.unit_value_map + unit_regex = self.config.duration_unit_regex + result: List[ExtractResult] = list() + + first_extraction_index = 0 + time_unit = 0 + total_unit = 0 + + while first_extraction_index < len(er): + cur_unit = None + unit_match = regex.match(unit_regex, er[first_extraction_index].text) + + if unit_match and RegExpUtility.get_group(unit_match, Constants.UNIT_GROUP_NAME) in unit_map: + cur_unit = RegExpUtility.get_group(unit_match, Constants.UNIT_GROUP_NAME) + total_unit += 1 + if DurationParsingUtil.is_time_duration_unit(unit_map[cur_unit]): + time_unit += 1 + + if not cur_unit: + first_extraction_index += 1 + continue + + second_extraction_index = first_extraction_index + 1 + while second_extraction_index < len(er): + valid = False + mid_str_begin = er[second_extraction_index - 1].start + er[second_extraction_index - 1].length + mid_str_end = er[second_extraction_index].start + if mid_str_begin > mid_str_end: + return er + + mid_str = text[mid_str_begin:mid_str_end-mid_str_begin] + match = regex.match(self.config.duration_connector_regex, mid_str) + if match: + # If the second element of a group is a modifier, it should not be merged with subsequent elements. + # For example "4 days or more and 1 week or less" should return 2 separate extractions. + if second_extraction_index > 1 and er[second_extraction_index - 1].meta_data and \ + er[second_extraction_index - 1].meta_data.has_mod: + break + + unit_match = regex.match(unit_regex, er[second_extraction_index].text) + if unit_match and RegExpUtility.get_group(unit_match, Constants.UNIT_GROUP_NAME) in unit_map: + next_unit_str = RegExpUtility.get_group(unit_match, Constants.UNIT_GROUP_NAME) + if unit_value_map[unit_map[next_unit_str]] != unit_value_map[unit_map[cur_unit]]: + valid = True + if unit_value_map[unit_map[next_unit_str]] < unit_value_map[unit_map[cur_unit]]: + cur_unit = next_unit_str + + total_unit += 1 + if DurationParsingUtil.is_time_duration_unit(unit_map[next_unit_str]): + time_unit += 1 + + if not valid: + break + + second_extraction_index += 1 + + if second_extraction_index - 1 > first_extraction_index: + node = ExtractResult() + node.start = er[first_extraction_index].start + node.length = er[second_extraction_index - 1].start + er[second_extraction_index - 1].length - node.start + node.text = text[node.start: node.length] + node.type = er[first_extraction_index].type + + # Add multiple duration type to extract result + type = Constants.MULTIPLE_DURATION_TIME # Default type + if time_unit == total_unit: + type = Constants.MULTIPLE_DURATION_TIME + elif time_unit == 0: + type = Constants.MULTIPLE_DURATION_DATE + node.data = type + + result.append(node) + time_unit = 0 + total_unit = 0 + else: + result.append(er[first_extraction_index]) + + first_extraction_index = second_extraction_index + + return result + + def implicit_duration(self, text: str) -> List[ExtractResult]: + ret: List[Token] = list() + # handle "all day", "all year" + ret.extend(get_tokens_from_regex(self.config.all_regex, text)) + # handle "half day", "half year" + ret.extend(get_tokens_from_regex(self.config.half_regex, text)) + # handle "next day", "last year" + ret.extend(get_tokens_from_regex(self.config.relative_duration_unit_regex, text)) + # handle "more day", "more year" + ret.extend(get_tokens_from_regex(self.config.more_or_less_regex, text)) + # handle "few days", "few months" + ret.extend(get_tokens_from_regex(self.config.some_regex, text)) + # handle "during/for the day/week/month/year" + # if (self.config.options and DateTimeOptions.CALENDAR) != 0: + # ret.extend(get_tokens_from_regex(self.config.during_regex, text)) + + result: List[ExtractResult] = list() + for e in ret: + node = ExtractResult() + node.start = e.start + node.length = e.length + node.text = text[node.start:node.length] + node.type = self.extractor_type_name + node.meta_data = Metadata() + node.meta_data.has_mod = True + result.append(node) + + return result + + +class CJKDurationParserConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + return NotImplementedError + + @property + @abstractmethod + def internal_parser(self) -> Parser: + return NotImplementedError + + @property + @abstractmethod + def year_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def some_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def more_or_less_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def duration_unit_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def an_unit_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def duration_connector_regex(self) -> Pattern: + return NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + return NotImplementedError + + @property + @abstractmethod + def unit_value_map(self) -> Dict[str, float]: + return NotImplementedError + + +class BaseCJKDurationParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_DURATION + + def __init__(self, config: CJKDurationParserConfiguration): + self.config = config + + def parse(self, source: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + datetime_parse_result = self.parse_merged_duration(source.text, reference) + + if not datetime_parse_result.success: + datetime_parse_result = DurationParsingUtil.\ + parse_inexact_number_with_unit(source.text, self.config.some_regex, self.config.unit_map, + self.config.unit_value_map, is_cjk=True) + + if not datetime_parse_result.success: + datetime_parse_result = self.parse_an_unit(source.text) + + if not datetime_parse_result.success: + parse_result = self.config.internal_parser.parse(source) + unit_result = parse_result.value + if not unit_result: + return DateTimeParseResult() + + unit_str = unit_result.unit + if unit_result.number: + num = float(unit_result.number.__str__()) + else: + num = 1 + + datetime_parse_result.timex = TimexUtil.generate_duration_timex(num, unit_str, + DurationParsingUtil.is_less_than_day(unit_str)) + datetime_parse_result.future_value = \ + datetime_parse_result.past_value = num * self.config.unit_value_map[unit_str] + datetime_parse_result.success = True + + if datetime_parse_result.success: + datetime_parse_result.future_resolution = { + TimeTypeConstants.DURATION: datetime_parse_result.future_value + } + datetime_parse_result.past_resolution = { + TimeTypeConstants.DURATION: datetime_parse_result.past_value + } + + more_or_less_match = regex.match(self.config.more_or_less_regex, source.text) + if more_or_less_match: + if RegExpUtility.get_group(more_or_less_match, Constants.LESS_GROUP_NAME): + datetime_parse_result.mod = Constants.LESS_THAN_MOD + elif RegExpUtility.get_group(more_or_less_match, Constants.MORE_GROUP_NAME): + datetime_parse_result.mod = Constants.MORE_THAN_MOD + + ret = DateTimeParseResult() + ret.text = source.text + ret.start = source.start + ret.type = source.type + ret.data = source.type + ret.value = datetime_parse_result + ret.timex_str = datetime_parse_result.timex + ret.resolution_str = None + + return ret + + def filter_results(self, query: str, candidate_results: List[DateTimeParseResult]) -> List[DateTimeParseResult]: + return candidate_results + + def parse_an_unit(self, text: str) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = regex.match(self.config.an_unit_regex, text) + if RegExpUtility.get_group(match, Constants.ANOTHER_GROUP_NAME): + if RegExpUtility.get_group(match, Constants.HALF_GROUP_NAME): + num_val = 0.5 + elif RegExpUtility.get_group(match, Constants.QUARTER_GROUP_NAME): + num_val = 0.25 + elif RegExpUtility.get_group(match, Constants.THREE_QUARTER_GROUP_NAME): + num_val = 0.75 + else: + num_val = 1 + + src_unit = RegExpUtility.get_group(match, Constants.UNIT_GROUP_NAME) + if src_unit in self.config.unit_map: + unit_str = self.config.unit_map[src_unit] + ret.timex = TimexUtil.generate_duration_timex(num_val, unit_str, + DurationParsingUtil.is_less_than_day(unit_str)) + ret.future_value = ret.past_value = num_val * self.config.unit_value_map[unit_str] + ret.success = True + return ret + + def parse_merged_duration(self, text: str, reference: datetime) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + duration_extractor = self.config.duration_extractor + + # DurationExtractor without parameter will not extract merged duration + ers = duration_extractor.extract(text, reference) + + # only handle merged duration cases like "1 month 21 days" + if len(ers) <= 1: + ret.success = False + return ret + + start = ers[0].start + if start != 0: + before_str = text[0:start-1] + if before_str: + return ret + + end = ers[-1].start + ers[-1].length + if end != len(text): + after_str = text[end:] + if after_str: + return ret + + prs: List[DateTimeParseResult] = list() + timex_dict: Dict[str, str] = dict() + + # insert timex into a dictionary + for er in ers: + unit_regex = self.config.duration_unit_regex + unit_match = regex.match(unit_regex, text) + if unit_match: + pr = self.parse(er) + if pr and pr.value: + timex_dict[self.config.unit_map[RegExpUtility.get_group(unit_match, Constants.UNIT_GROUP_NAME)]] \ + = pr.timex_str + prs.append(pr) + # sort the timex using the granularity of the duration, "P1M23D" for "1 month 23 days" and "23 days 1 month" + if len(prs) > 0: + ret.timex = TimexUtil.generate_compound_duration_timex(timex_dict, self.config.unit_value_map) + + value = 0 + for pr in prs: + value += float(pr.value.future_value.__str__()) + ret.future_value = ret.past_value = value + + ret.success = True + return ret diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_holiday.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_holiday.py new file mode 100644 index 0000000000..96adcc8301 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_holiday.py @@ -0,0 +1,406 @@ +from abc import abstractmethod +from calendar import Calendar +from datetime import datetime +from datedelta import datedelta +import regex +from typing import List, Pattern, Callable, Dict, Optional, Match + +from recognizers_text import Metadata +from recognizers_text.extractor import ExtractResult +from recognizers_text.utilities import RegExpUtility +from recognizers_number import Constants as NumberConstants +from recognizers_date_time.date_time.constants import Constants, TimeTypeConstants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParseResult, DateTimeParser +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration, Token, merge_all_tokens, \ + DateTimeFormatUtil, DateTimeResolutionResult, DateUtils, DayOfWeek, HolidayFunctions +from recognizers_number import BaseNumberExtractor, BaseNumberParser + + +class CJKHolidayExtractorConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def holiday_regexes(self) -> List[Pattern]: + raise NotImplementedError + + +class BaseCJKHolidayExtractor(DateTimeExtractor): + + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_DATE # "Date" + + def __init__(self, config: CJKHolidayExtractorConfiguration): + self.config = config + + def extract(self, text: str) -> List[ExtractResult]: + return self.extract(text, datetime.now()) + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + tokens: List[Token] = list() + tokens.extend(self.holiday_match(source)) + ers: List[ExtractResult] = merge_all_tokens(tokens, source, self.extractor_type_name) + + for er in ers: + er.metadata = Metadata() + er.metadata.is_holiday = True + + return ers + + def holiday_match(self, text: str) -> List[Token]: + ret: List[Token] = list() + for pattern in self.config.holiday_regexes: + matches = list(regex.finditer(pattern, text)) + ret.extend(map(lambda x: Token(x.start(), x.end()), matches)) + return ret + + +class CJKHolidayParserConfiguration(DateTimeOptionsConfiguration): + + @property + @abstractmethod + def integer_extractor(self) -> BaseNumberExtractor: + return NotImplementedError + + @property + @abstractmethod + def number_parser(self) -> BaseNumberParser: + raise NotImplementedError + + @property + @abstractmethod + def fixed_holidays_dict(self) -> Dict[str, Callable[[int], datetime]]: + raise NotImplementedError + + @property + @abstractmethod + def holiday_func_dict(self) -> Dict[str, Callable[[int], datetime]]: + raise NotImplementedError + + @property + @abstractmethod + def no_fixed_timex(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def holiday_regex_list(self) -> List[Pattern]: + raise NotImplementedError + + @property + @abstractmethod + def lunar_holiday_regex(self) -> Pattern: + raise NotImplementedError + + @abstractmethod + def get_swift_year(self, source: str) -> str: + raise NotImplementedError + + @abstractmethod + def sanitize_year_token(self, source: str) -> str: + raise NotImplementedError + + @staticmethod + def new_year(year: int) -> datetime: + return datetime(year, 1, 1) + + @staticmethod + def usa_independence_day(year: int) -> datetime: + return datetime(year, 7, 4) + + @staticmethod + def teacher_day(year: int) -> datetime: + return datetime(year, 9, 10) + + @staticmethod + def mao_birthday(year: int) -> datetime: + return datetime(year, 12, 26) + + @staticmethod + def youth_day(year: int) -> datetime: + return datetime(year, 5, 4) + + @staticmethod + def children_day(year: int) -> datetime: + return datetime(year, 6, 1) + + @staticmethod + def female_day(year: int) -> datetime: + return datetime(year, 3, 8) + + @staticmethod + def tree_plant_day(year: int) -> datetime: + return datetime(year, 3, 12) + + @staticmethod + def lover_day(year: int) -> datetime: + return datetime(year, 2, 14) + + @staticmethod + def christmas_day(year: int) -> datetime: + return datetime(year, 12, 25) + + @staticmethod + def christmas_eve(year: int) -> datetime: + return datetime(year, 12, 24) + + @staticmethod + def easter_day(year: int) -> datetime: + return HolidayFunctions.calculate_holiday_by_easter(year) + + @staticmethod + def fool_day(year: int) -> datetime: + return datetime(year, 4, 1) + + @staticmethod + def labor_day(year: int) -> datetime: + return datetime(year, 5, 1) + + @staticmethod + def halloween_day(year: int) -> datetime: + return datetime(year, 10, 31) + + @staticmethod + def mid_autumn_day(year: int) -> datetime: + return datetime(year, 8, 15) + + @staticmethod + def spring_day(year: int) -> datetime: + return datetime(year, 1, 1) + + @staticmethod + def new_year_eve(year: int) -> datetime: + return datetime(year, 12, 31) + + @staticmethod + def lantern_day(year: int) -> datetime: + return datetime(year, 1, 15) + + @staticmethod + def qing_ming_day(year: int) -> datetime: + return datetime(year, 4, 4) + + @staticmethod + def dragon_boat_day(year: int) -> datetime: + return datetime(year, 5, 5) + + @staticmethod + def boys_festival(year: int) -> datetime: + return datetime(year, 5, 5) + + @staticmethod + def jap_national_day(year: int) -> datetime: + return datetime(year, 10, 1) + + @staticmethod + def jap_mil_build_day(year: int) -> datetime: + return datetime(year, 8, 1) + + @staticmethod + def girls_day(year: int) -> datetime: + return datetime(year, 3, 7) + + @staticmethod + def singles_day(year: int) -> datetime: + return datetime(year, 11, 11) + + @staticmethod + def chong_yang_day(year: int) -> datetime: + return datetime(year, 9, 9) + + @staticmethod + def get_day(year: int, month: int, week: int, day_of_week: DayOfWeek) -> int: + calendar = Calendar() + return [d for d in calendar.itermonthdays2(year, month) if d[0] and d[1] == day_of_week - 1][week][0] + + @staticmethod + def get_last_day(year: int, month: int, day_of_week: DayOfWeek) -> int: + return CJKHolidayParserConfiguration.get_day(year, month, -1, day_of_week) + + @staticmethod + def mothers_day(year: int) -> datetime: + return datetime(year, 5, CJKHolidayParserConfiguration.get_day(year, 5, 1, DayOfWeek.SUNDAY)) + + @staticmethod + def fathers_day(year: int) -> datetime: + return datetime(year, 6, CJKHolidayParserConfiguration.get_day(year, 6, 2, DayOfWeek.SUNDAY)) + + @staticmethod + def martin_luther_king_day(year: int) -> datetime: + return datetime(year, 1, CJKHolidayParserConfiguration.get_day(year, 1, 2, DayOfWeek.MONDAY)) + + @staticmethod + def washingtons_birthday(year: int) -> datetime: + return datetime(year, 2, CJKHolidayParserConfiguration.get_day(year, 2, 2, DayOfWeek.MONDAY)) + + @staticmethod + def canberra_day(year: int) -> datetime: + return datetime(year, 3, CJKHolidayParserConfiguration.get_day(year, 3, 0, DayOfWeek.MONDAY)) + + @staticmethod + def memorial_day(year: int) -> datetime: + return datetime(year, 5, CJKHolidayParserConfiguration.get_last_day(year, 5, DayOfWeek.MONDAY)) + + @staticmethod + def labour_day(year: int) -> datetime: + return datetime(year, 9, CJKHolidayParserConfiguration.get_day(year, 9, 0, DayOfWeek.MONDAY)) + + @staticmethod + def international_workers_day(year: int) -> datetime: + return datetime(year, 5, 1) + + @staticmethod + def columbus_day(year: int) -> datetime: + return datetime(year, 10, CJKHolidayParserConfiguration.get_day(year, 10, 1, DayOfWeek.MONDAY)) + + @staticmethod + def thanksgiving_day(year: int) -> datetime: + return datetime(year, 11, CJKHolidayParserConfiguration.get_day(year, 11, 3, DayOfWeek.THURSDAY)) + + +class BaseCJKHolidayParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_DATE + + def __init__(self, config: CJKHolidayParserConfiguration): + self.config = config + + def parse(self, source: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + reference_date = reference if reference is not None else datetime.now() + value = None + + if source.type == self.parser_type_name: + inner_result = self.parse_holiday_regex_match(source.text, reference_date) + + if inner_result.success: + inner_result.future_resolution = { + TimeTypeConstants.DATE: DateTimeFormatUtil.format_date(inner_result.future_value) + } + inner_result.past_resolution = { + TimeTypeConstants.DATE: DateTimeFormatUtil.format_date(inner_result.past_value) + } + inner_result.is_lunar = self.is_lunar_calendar(source.text) + value = inner_result + + result = DateTimeParseResult(source) + result.value = value + result.timex_str = value.timex if value else '' + result.resolution_str = '' + + return result + + def filter_result(self, query: str, candidate_results: List[DateTimeParseResult]): + return candidate_results + + def get_future_value(self, value: datetime, reference_date: datetime, holiday: str) -> datetime: + if value < reference_date: + if holiday in self.config.fixed_holidays_dict: + return value + datedelta(years=1) + if holiday in self.config.holiday_func_dict: + value = self.config.holiday_func_dict[holiday](reference_date.year + 1) + return value + + def get_past_value(self, value: datetime, reference_date: datetime, holiday: str) -> datetime: + if value >= reference_date: + if holiday in self.config.fixed_holidays_dict: + return value + datedelta(years=-1) + if holiday in self.config.holiday_func_dict: + value = self.config.holiday_func_dict[holiday](reference_date.year - 1) + return value + + def parse_holiday_regex_match(self, text: str, reference_date: datetime) -> DateTimeResolutionResult: + for pattern in self.config.holiday_regex_list: + match = pattern.match(text) + if match and match.pos == 0 and match.endpos == len(text): + # Value string will be set in Match2Date method + result = self.match_to_date(match, reference_date) + return result + return DateTimeResolutionResult() + + def match_to_date(self, match: Match, reference_date: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + holiday_str = match.group('holiday') + + year = reference_date.year + has_year = False + year_num = match.group('year') + year_cjk = match.group(Constants.YEAR_CJK_GROUP_NAME) + year_relative = match.group('yearrel') + + if year_num: + has_year = True + year_num = self.config.sanitize_year_token(year_num) + year = int(year_num) + + elif year_cjk: + has_year = True + year_cjk = self.config.sanitize_year_token(year_cjk) + year = self.convert_to_integer(year_cjk) + + elif year_relative: + has_year = True + swift = self.config.get_swift_year(year_relative) + if swift >= -1: + year += swift + + if 100 > year >= 90: + year += Constants.BASE_YEAR_PAST_CENTURY + elif year < 20: + year += Constants.BASE_YEAR_CURRENT_CENTURY + + if holiday_str: + value: datetime = None + timex = '' + if holiday_str in self.config.fixed_holidays_dict: + value = self.config.fixed_holidays_dict[holiday_str](year) + timex = f'-{DateTimeFormatUtil.to_str(value.month, 2)}-{DateTimeFormatUtil.to_str(value.day, 2)}' + else: + if holiday_str in self.config.holiday_func_dict: + value = self.config.holiday_func_dict[holiday_str](year) + timex = self.config.no_fixed_timex[holiday_str] + else: + return result + + if has_year: + result.timex = DateTimeFormatUtil.to_str(year, 4) + timex + result.future_value = DateUtils.safe_create_from_min_value(year, value.month, value.day) + result.past_value = result.future_value + result.success = True + return result + + result.timex = 'XXXX' + timex + result.future_value = self.get_future_value(value, reference_date, holiday_str) + result.past_value = self.get_past_value(value, reference_date, holiday_str) + result.success = True + return result + + return result + + def convert_to_integer(self, year_cjk: str): + year = 0 + num = 0 + + er = self.config.integer_extractor.extract(year_cjk) + if er and er[0].type == NumberConstants.SYS_NUM_INTEGER: + num = self.config.number_parser.parse(er[0]).value + + if num < 10: + num = 0 + for ch in year_cjk: + num *= 10 + er = self.config.integer_extractor.extract(ch) + if er and er[0].type == NumberConstants.SYS_NUM_INTEGER: + num += self.config.number_parser.parse(er[0]).value + + year = num + else: + year = num + return -1 if year == 0 else year + + def is_lunar_calendar(self, text: str): + source = text.strip().lower() + match = RegExpUtility.get_matches(self.config.lunar_holiday_regex, source) + if match: + return True + return False diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_merged.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_merged.py new file mode 100644 index 0000000000..73dc0f350f --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_merged.py @@ -0,0 +1,545 @@ +from abc import abstractmethod +from typing import List, Optional, Pattern, Dict +from datetime import datetime +from collections import namedtuple + +from recognizers_text.extractor import ExtractResult +from recognizers_text.meta_data import MetaData +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.CJK.base_configs import CJKCommonDateTimeParserConfiguration +from recognizers_date_time.date_time.utilities import DateTimeOptions, RegExpUtility, ExtractResultExtension, \ + DateTimeOptionsConfiguration, DateTimeResolutionResult, MergedParserUtil + +MatchedIndex = namedtuple('MatchedIndex', ['matched', 'index']) + + +class CJKMergedExtractorConfiguration(DateTimeOptionsConfiguration): + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def set_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def holiday_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def before_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unspecified_date_period_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def since_suffix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def since_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def around_suffix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def around_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def until_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def equal_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def potential_ambiguous_range_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def ambiguous_range_modifier_prefix(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + raise NotImplementedError + + +class BaseCJKMergedExtractor(DateTimeExtractor): + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_MERGED + + def __init__(self, config: CJKMergedExtractorConfiguration, options: DateTimeOptions): + self.config = config + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + if reference is None: + reference = datetime.now() + + result = self.config.date_extractor.extract(source, reference) + + # The order is important, since there can be conflicts in merging + result = self.add_to( + result, self.config.time_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.duration_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.date_period_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.date_time_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.time_period_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.date_time_period_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.set_extractor.extract(source, reference)) + result = self.add_to( + result, self.config.holiday_extractor.extract(source, reference)) + + result = self.filter_unspecific_date_period(result) + + result = ExtractResultExtension.filter_ambiguity(result, source, self.config.ambiguity_filters_dict) + + result = self.add_mod(result, source) + + result = sorted(result, key=lambda x: x.start) + + return result + + def filter_unspecific_date_period(self, extract_results: List[ExtractResult]) -> List[ExtractResult]: + for extract_result in extract_results: + if self.config.unspecified_date_period_regex.search(extract_result.text) is not None: + extract_results.remove(extract_result) + + return extract_results + + def add_mod(self, extract_results: List[ExtractResult], source: str) -> List[ExtractResult]: + last_end = 0 + for extract_result in extract_results: + before_str = source[last_end:extract_result.start].strip() + after_str = source[extract_result.start + extract_result.length:].strip() + + match = RegExpUtility.match_begin(self.config.before_regex, after_str, True) + if match: + mod_len = match.index + match.length + extract_result.length += mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.after_regex, after_str, True) + if match: + mod_len = match.index + match.length + extract_result.length += mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.until_regex, before_str, True) + if match: + mod_len = len(before_str) - match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.until_regex, after_str, True) + if match: + mod_len = len(after_str) - match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.since_prefix_regex, before_str, True) + if match and self.ambiguous_range_checker(before_str, source, extract_result): + mod_len = len(before_str) + match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.since_prefix_regex, after_str, True) + if match and self.ambiguous_range_checker(after_str, source, extract_result): + mod_len = len(after_str) + match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.around_suffix_regex, before_str, True) + if match: + mod_len = len(before_str) + match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.around_suffix_regex, after_str, True) + if match: + mod_len = len(after_str) + match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + match = RegExpUtility.match_begin(self.config.equal_regex, before_str, True) + if match: + mod_len = len(before_str) + match.index + extract_result.length += mod_len + extract_result.start -= mod_len + extract_result.text = source[extract_result.start:extract_result.start + extract_result.length] + + extract_result.meta_data = self.assign_mod_metadata(extract_result.meta_data) + + return extract_results + + def add_to(self, destinations: List[ExtractResult], source: List[ExtractResult]) -> List[ExtractResult]: + for value in source: + is_found = False + overlap_indexes: List[int] = list() + first_index = -1 + + for index, destination in enumerate(destinations): + if destination.overlap(value): + is_found = True + if destination.cover(value): + if first_index == -1: + first_index = index + overlap_indexes.append(index) + else: + continue + + if not is_found: + destinations.append(value) + elif overlap_indexes: + temp_dst: List[ExtractResult] = list() + + for index, destination in enumerate(destinations): + if index not in overlap_indexes: + temp_dst.append(destination) + + # insert at the first overlap occurence to keep the order + temp_dst.insert(first_index, value) + destinations = temp_dst + return destinations + + # Avoid adding mod for ambiguity cases, such as "从" in "从 ... 到 ..." should not add mod + # TODO: Revise PotentialAmbiguousRangeRegex to support cases like "从2015年起,哪所大学需要的分数在80到90之间" + def ambiguous_range_checker(self, before_str: str, text: str, er: ExtractResult) -> bool: + if RegExpUtility.match_end(self.config.ambiguous_range_modifier_prefix, text, True): + matches = RegExpUtility.get_matches(self.config.potential_ambiguous_range_regex, text) + if any(m.index < er.start + er.length and m.index + m.length > er.start for m in matches): + return False + return True + + def assign_mod_metadata(self, metadata: MetaData) -> MetaData: + if not metadata: + metadata = MetaData() + metadata.has_mod = True + return metadata + + +class CJKMergedParserConfiguration(CJKCommonDateTimeParserConfiguration): + @property + @abstractmethod + def before_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def since_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def since_suffix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def until_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def equal_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def around_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def around_suffix_regex(self) -> Pattern: + raise NotImplementedError + + +class BaseCJKMergedParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_MERGED + + def __init__(self, config: CJKMergedParserConfiguration, options): + self.config = config + self.options = options + + def parse(self, er: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + if not reference: + reference = datetime.now() + + # push, save the MOD string + has_inclusive_modifier = False + has_before = False + has_after = False + has_until = False + has_since = False + has_equal = False + has_around = False + mod_str = "" + mod_str_prefix = "" + mod_str_suffix = "" + + if er.meta_data: + if er.meta_data.has_mod: + before_match = RegExpUtility.match_end(self.config.before_regex, er.text, True) + after_match = RegExpUtility.match_end(self.config.after_regex, er.text, True) + until_match = RegExpUtility.match_begin(self.config.until_regex, er.text, True) + since_match_prefix = RegExpUtility.match_begin(self.config.since_prefix_regex, er.text, True) + since_match_suffix = RegExpUtility.match_end(self.config.since_suffix_regex, er.text, True) + equal_match = RegExpUtility.match_begin(self.config.equal_regex, er.text, True) + around_match_prefix = RegExpUtility.match_begin(self.config.around_prefix_regex, er.text, True) + around_match_suffix = RegExpUtility.match_end(self.config.around_suffix_regex, er.text, True) + + if before_match and not MergedParserUtil.is_duration_with_ago_and_later(er): + has_before = True + er.length -= before_match.length + if er.length > len(er.text): + er.text = er.text[0:er.length] + mod_str = before_match.value if before_match.value != er.text else '' + if before_match.get_group(Constants.INCLUDE_GROUP_NAME): + has_inclusive_modifier = True + + elif after_match and not since_match_suffix and not MergedParserUtil.is_duration_with_ago_and_later(er): + has_after = True + er.length -= after_match.length + if er.length > len(er.text): + er.text = er.text[0:er.length] + mod_str = after_match.value + if after_match.get_group(Constants.INCLUDE_GROUP_NAME): + has_inclusive_modifier = True + + elif until_match: + has_until = True + er.start += until_match.length + er.length -= until_match.length + er.text = er.text[until_match.length] + mod_str = until_match.group() + + elif equal_match: + has_equal = True + er.start += equal_match.length + er.length -= equal_match.length + er.text = er.text[equal_match.length] + mod_str = equal_match.group() + + else: + if since_match_prefix: + has_since = True + er.start += since_match_prefix.length + er.length -= since_match_prefix.length + er.text = er.text[since_match_prefix.length] + mod_str = since_match_prefix.group() + + if since_match_suffix: + has_since = True + er.length -= since_match_suffix.length + er.text = er.text[since_match_suffix.start:] + mod_str = since_match_suffix.group() + + if around_match_prefix: + has_around = True + er.start += around_match_prefix.length + er.length -= around_match_prefix.length + er.text = er.text[around_match_prefix.length] + mod_str = around_match_prefix.group() + + if around_match_suffix: + has_around = True + er.length -= around_match_suffix.length + er.text = er.text[around_match_suffix.start:] + mod_str = around_match_suffix.group() + + # Parse extracted datetime mention + pr = self.parse_result(er, reference) + if not pr: + return None + + # pop, restore the MOD string + if has_before: + pr.length += len(mod_str) + pr.text = pr.text + mod_str + val: DateTimeResolutionResult = pr.value + + if has_inclusive_modifier: + val.mod = MergedParserUtil.combined_mod(val.mod, Constants.BEFORE_MOD) + else: + val.mod = MergedParserUtil.combined_mod(val.mod, Constants.UNTIL_MOD) + pr.value = val + + if has_after: + pr.length += len(mod_str) + pr.text = pr.text + mod_str + val: DateTimeResolutionResult = pr.value + + if has_inclusive_modifier: + val.mod = MergedParserUtil.combined_mod(val.mod, Constants.AFTER_MOD) + else: + val.mod = MergedParserUtil.combined_mod(val.mod, Constants.SINCE_MOD) + pr.value = val + + if has_until: + pr.length += len(mod_str) + pr.start -= len(mod_str) + pr.text = mod_str + pr.text + val: DateTimeResolutionResult = pr.value + val.mod = Constants.BEFORE_MOD + pr.value = val + has_before = True + + if has_since: + pr.length += len(mod_str_prefix) + len(mod_str_suffix) + pr.start -= len(mod_str_prefix) + pr.text = mod_str_prefix + pr.text + mod_str_suffix + val: DateTimeResolutionResult = pr.value + val.mod = Constants.SINCE_MOD + pr.value = val + + if has_equal: + pr.length += len(mod_str) + pr.start -= len(mod_str) + pr.text = mod_str + pr.text + + if has_around: + pr.length += len(mod_str_prefix) + len(mod_str_suffix) + pr.start -= len(mod_str_prefix) + pr.text = mod_str_prefix + pr.text + mod_str_suffix + val: DateTimeResolutionResult = pr.value + val.mod = Constants.APPROX_MOD + pr.value = val + + has_range_changing_mod = False + if has_before or has_after or has_since: + has_range_changing_mod = True + + if not pr.value: + pr.value = DateTimeResolutionResult + pr.value.has_range_changing_mod = has_range_changing_mod + + pr = MergedParserUtil.set_parse_result(pr, has_range_changing_mod, self.config) + + return pr + + def parse_result(self, source: ExtractResult, reference: datetime) -> DateTimeParseResult: + result = None + + if source.type == Constants.SYS_DATETIME_DATE: + if source.meta_data and source.meta_data.is_holiday: + result = self.config.holiday_parser.parse(source, reference) + else: + result = self.config.date_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_TIME: + result = self.config.time_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_DATETIME: + result = self.config.date_time_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_DATEPERIOD: + result = self.config.date_period_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_TIMEPERIOD: + result = self.config.time_period_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_DATETIMEPERIOD: + result = self.config.date_time_period_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_DURATION: + result = self.config.duration_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_SET: + result = self.config.set_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_DATETIMEALT: + result = self.config.date_time_alt_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_TIMEZONE: + if self.config.options != 0 and DateTimeOptions.ENABLE_PREVIEW != 0: + result = self.config.time_zone_parser.parse(source, reference) + else: + return None + + return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_set.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_set.py new file mode 100644 index 0000000000..98780b942c --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_set.py @@ -0,0 +1,359 @@ +from abc import abstractmethod +from datetime import datetime +from typing import Pattern, List, Dict + +import regex + +from recognizers_date_time.date_time.constants import Constants, TimeTypeConstants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.base_datetime import MatchedTimex +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration, Token, RegExpUtility, \ + merge_all_tokens, DateTimeResolutionResult, SetHandler +from recognizers_text.extractor import ExtractResult + + +class CJKSetExtractorConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def last_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_suffix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_date_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_time_period_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + +class BaseCJKSetExtractor(DateTimeExtractor): + + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_SET + + def __init__(self, config: CJKSetExtractorConfiguration): + self.config = config + + def extract(self, text: str, reference: datetime = None) -> List[ExtractResult]: + if reference is None: + reference = datetime.now() + tokens: List[Token] = list() + + tokens.extend(self.match_each_unit(text)) + tokens.extend(self.match_each_duration(text, reference)) + tokens.extend(self.match_each(self.config.date_extractor, text, reference)) + tokens.extend(self.match_each(self.config.date_time_extractor, text, reference)) + tokens.extend(self.match_each(self.config.time_period_extractor, text, reference)) + tokens.extend(self.match_each(self.config.time_extractor, text, reference)) + + result = merge_all_tokens(tokens, text, self.extractor_type_name) + return result + + def match_each_duration(self, text: str, reference_time: datetime): + ret: List[Token] = list() + ers = self.config.duration_extractor.extract(text, reference_time) + + for er in ers: + # "each last summer" doesn't make sense + if regex.search(self.config.last_regex, er.text): + continue + + before_str = text[0:er.start] + before_match = regex.search(self.config.each_prefix_regex, before_str) + if before_match: + ret.append(Token(before_match.start(), er.start + er.length)) + else: + after_str = text[er.start + er.length:] + after_match = regex.search(self.config.each_suffix_regex, after_str) + if after_match: + ret.append(Token(er.start, er.start + er.length + len(after_match.group()))) + return ret + + def match_each_unit(self, text: str) -> List[Token]: + # Handle "each month" + for regexp in regex.finditer(self.config.each_unit_regex, text): + yield Token(regexp.start(), regexp.start() + regexp.end()) + + def match_each(self, extractor: DateTimeExtractor, text: str, reference_time: datetime): + ret: List[Token] = list() + ers = extractor.extract(text, reference_time) + + for er in ers: + before_str = text[0:er.start].strip() + match = regex.search(self.config.each_prefix_regex, before_str) + + if match: + ret.append(Token(match.start(), match.start() + match.end() + er.length)) + elif er.type == Constants.SYS_DATETIME_TIME or er.type == Constants.SYS_DATETIME_DATE: + # Cases like "every day at 2pm" or "every year on April 15th" + each_regex = self.config.each_day_regex if er.type == Constants.SYS_DATETIME_TIME \ + else self.config.each_date_unit_regex + + match = regex.search(each_regex, before_str) + if match: + ret.append(Token(match.start(), match.start() + match.end() + er.length)) + return ret + + +class CJKSetParserConfiguration(DateTimeOptionsConfiguration): + + @property + @abstractmethod + def duration_extractor(self) -> DateTimeExtractor: + return NotImplementedError + + @property + @abstractmethod + def duration_parser(self) -> DateTimeParser: + return NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + return NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + return NotImplementedError + + @property + @abstractmethod + def time_period_extractor(self) -> DateTimeExtractor: + return NotImplementedError + + @property + @abstractmethod + def time_period_parser(self) -> DateTimeParser: + return NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + return NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> DateTimeParser: + return NotImplementedError + + @property + @abstractmethod + def date_time_extractor(self) -> DateTimeExtractor: + return NotImplementedError + + @property + @abstractmethod + def date_time_parser(self) -> DateTimeParser: + return NotImplementedError + + @property + @abstractmethod + def unit_map(self) -> Dict[str, str]: + raise NotImplementedError + + @property + @abstractmethod + def each_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_day_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def each_date_unit_regex(self) -> Pattern: + raise NotImplementedError + + @abstractmethod + def get_matched_unit_timex(self, text: str) -> MatchedTimex: + raise NotImplementedError + + +class BaseCJKSetParser(DateTimeParser): + + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_SET + + def __init__(self, config: CJKSetParserConfiguration): + self.config = config + + def parse(self, extract_result: ExtractResult, reference_date: datetime = None): + if reference_date is None: + reference_date = datetime.now() + + value = None + if extract_result.type == self.parser_type_name: + inner_result = self.parse_each_unit(extract_result.text) + + if not inner_result.success: + inner_result = self.parse_each_duration(extract_result.text, reference_date) + + # NOTE: Please do not change the order of following function + # we must consider datetime before date + if not inner_result.success: + inner_result = self.parse_each(self.config.date_time_extractor, + self.config.date_time_parser, + extract_result.text, + reference_date) + if not inner_result.success: + inner_result = self.parse_each(self.config.date_extractor, + self.config.date_parser, + extract_result.text, reference_date) + if not inner_result.success: + inner_result = self.parse_each(self.config.time_period_extractor, + self.config.time_period_parser, + extract_result.text, reference_date) + if not inner_result.success: + inner_result = self.parse_each(self.config.time_extractor, + self.config.time_parser, + extract_result.text, reference_date) + + if inner_result.success: + inner_result.future_resolution = { + TimeTypeConstants.SET: str(inner_result.future_value) + } + inner_result.past_resolution = { + TimeTypeConstants.SET: str(inner_result.past_value) + } + + value = inner_result + + result = DateTimeParseResult(extract_result) + + result.value = value + result.timex_str = value.timex if value else '' + result.resolution_str = '' + + return result + + def filter_results(self, query: str, candidate_results: List[DateTimeParseResult]) -> List[DateTimeParseResult]: + return candidate_results + + def parse_each_duration(self, text: str, ref_date: datetime): + ret = DateTimeResolutionResult() + ers = self.config.duration_extractor.extract(text, ref_date) + + if len(ers) != 1 or not text[ers[0].start + ers[0].length:].strip(): + return ret + + after_str = text[ers[0].start + ers[0].length:] + matches = regex.match(self.config.each_prefix_regex, after_str) + if matches: + pr = self.config.duration_parser.parse(ers[0], datetime.now()) + ret = SetHandler.resolve_set(ret, pr.timex_str) + return ret + + return ret + + def parse_each_unit(self, text: str) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + # handle "each month" + match = regex.match(self.config.each_unit_regex, text) + if match: + source_unit = RegExpUtility.get_group(match, Constants.UNIT) + if source_unit and source_unit in self.config.unit_map: + get_matched_unit_timex = self.config.get_matched_unit_timex(source_unit) + if get_matched_unit_timex.matched: + ret = SetHandler.resolve_set(ret, get_matched_unit_timex.timex) + + return ret + + def parse_each(self, extractor: DateTimeExtractor, parser: DateTimeParser, text: str, ref_date: datetime): + ret = DateTimeResolutionResult() + ers = extractor.extract(text, ref_date) + success = False + + for er in ers: + before_str = text[0:er.start].strip() + match = regex.search(self.config.each_prefix_regex, before_str) + + if match and (match.end() - match.start() + er.length == len(text)): + success = True + elif er.type == Constants.SYS_DATETIME_TIME or er.type == Constants.SYS_DATETIME_DATE: + # Cases like "every day at 2pm" or "every year on April 15th" + each_regex = self.config.each_day_regex if er.type == Constants.SYS_DATETIME_TIME \ + else self.config.each_date_unit_regex + + match = regex.match(each_regex, before_str) + if match and (match.end() - match.start() + er.length == len(text)): + success = True + + if success: + pr = parser.parse(er, ref_date) + ret = SetHandler.resolve_set(ret, pr.timex_str) + break + + return ret + + + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_time.py new file mode 100644 index 0000000000..4fa2ba8aa2 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_time.py @@ -0,0 +1,164 @@ +from abc import abstractmethod +from typing import List, Optional, Pattern, Dict, Match +from datetime import datetime +import regex + +from recognizers_text.extractor import ExtractResult +from recognizers_date_time.date_time.constants import Constants, TimeTypeConstants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration, RegExpUtility, DateTimeFormatUtil, \ + ExtractResultExtension, DateTimeExtra, TimeFunctions +from recognizers_date_time.resources import BaseDateTime +from recognizers_date_time.date_time.data_structures import TimeType + + +class CJKTimeExtractorConfiguration(DateTimeOptionsConfiguration): + + @property + @abstractmethod + def regexes(self) -> Dict[Pattern, TimeType]: + raise NotImplementedError + + @property + @abstractmethod + def ambiguity_time_filters_dict(self) -> Dict[Pattern, Pattern]: + raise NotImplementedError + + +class BaseCJKTimeExtractor(DateTimeExtractor): + @property + def hour_regex(self) -> Pattern: + return self._hour_regex + + @property + def minute_regex(self) -> Pattern: + return self._minute_regex + + @property + def second_regex(self) -> Pattern: + return self._second_regex + + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_TIME + + def __init__(self, config: CJKTimeExtractorConfiguration): + self.config = config + self._hour_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.HourRegex) + self._minute_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.MinuteRegex) + self._second_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.SecondRegex) + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + + result: List[ExtractResult] = list() + if not source: + return result + + match_source: Dict[Match, any] = dict() + matched: List[bool] = [False] * len(source) + + collections = list(map(lambda x: ( + list(regex.finditer(x[0], source)), x[1]), self.config.regexes.items())) + collections = list(filter(lambda x: len(x[0]) > 0, collections)) + + for collection in collections: + for match in collection[0]: + for j in range(len(match.group())): + matched[match.start() + j] = True + match_source[match] = collection[1] + + last = -1 + for i in range(len(source)): + if matched[i]: + if i + 1 == len(source) or not matched[i + 1]: + start = last + 1 + length = i - last + text = source[start:start + length].strip() + src_match = next((x for x in iter(match_source) if ( + x.start() == start and (x.end() - x.start()) == length)), None) + if src_match: + value = ExtractResult() + value.start = start + value.length = length + value.text = text + value.type = self.extractor_type_name + value.data = self.__get_data(match_source, src_match) + result.append(value) + else: + last = i + + result = ExtractResultExtension.filter_ambiguity(result, source, self.config.ambiguity_time_filters_dict) + + return result + + @staticmethod + def __get_data(source: Dict[Match, any], key: Match) -> any: + if key not in source: + return None + + result = DateTimeExtra() + result.data_type = source[key] + result.named_entity = key.capturesdict() + result.match = key + return result + + +class CJKTimeParserConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_func(self) -> TimeFunctions: + raise NotImplementedError + + @property + @abstractmethod + def function_map(self): + raise NotImplementedError + + +class BaseCJKTimeParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_TIME + + def __init__(self, config: CJKTimeParserConfiguration): + self.config = config + + def parse(self, source: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + if reference is None: + reference = datetime.now() + + extra: DateTimeExtra = source.data + + if not extra: + result = self.config.time_extractor.extract(source.text, reference) + if result: + extra = result[0].data + + if extra: + time_result = self.config.function_map[extra.data_type](extra) + parse_result = self.config.time_func.pack_time_result(extra, time_result, reference) + + if parse_result.success: + parse_result.future_resolution[TimeTypeConstants.TIME] = DateTimeFormatUtil.format_time( + parse_result.future_value) + parse_result.past_resolution[TimeTypeConstants.TIME] = DateTimeFormatUtil.format_time( + parse_result.past_value) + + result = DateTimeParseResult(source) + result.value = parse_result + result.data = time_result + result.timex_str = parse_result.timex if parse_result is not None else '' + result.resolution_str = '' + + return result + + return None + + def filter_results(self, query: str, candidate_results: List[DateTimeParseResult]): + return candidate_results diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_timeperiod.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_timeperiod.py new file mode 100644 index 0000000000..78baf6c8c1 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/CJK/base_timeperiod.py @@ -0,0 +1,197 @@ +from abc import abstractmethod +from typing import List, Optional, Dict, Match, Pattern +from datetime import datetime +from collections import namedtuple +import regex + +from recognizers_text.extractor import ExtractResult +from recognizers_date_time.date_time.constants import Constants, TimeTypeConstants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, DateTimeFormatUtil, \ + DateTimeOptionsConfiguration, ExtractResultExtension, TimeFunctions, DateTimeExtra, TimePeriodFunctions, DateUtils +from recognizers_date_time.date_time.data_structures import PeriodType + + +class CJKTimePeriodExtractorConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def regexes(self) -> Dict[Pattern, PeriodType]: + raise NotImplementedError + + @property + @abstractmethod + def ambiguity_time_period_filters_dict(self) -> Dict[Pattern, Pattern]: + raise NotImplementedError + + +class BaseCJKTimePeriodExtractor(DateTimeExtractor): + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_TIMEPERIOD + + def __init__(self, config: CJKTimePeriodExtractorConfiguration): + self.config = config + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + result: List[ExtractResult] = list() + if not source: + return result + + match_source: Dict[Match, any] = dict() + matched: List[bool] = [False] * len(source) + + collections = list(map(lambda x: ( + list(regex.finditer(x[0], source)), x[1]), self.config.regexes.items())) + collections = list(filter(lambda x: len(x[0]) > 0, collections)) + + for collection in collections: + for match in collection[0]: + for j in range(len(match.group())): + matched[match.start() + j] = True + match_source[match] = collection[1] + + last = -1 + for i in range(len(source)): + if matched[i]: + if i + 1 == len(source) or not matched[i + 1]: + start = last + 1 + length = i - last + text = source[start:start + length].strip() + src_match = next((x for x in iter(match_source) if ( + x.start() == start and (x.end() - x.start()) == length)), None) + if src_match: + value = ExtractResult() + value.start = start + value.length = length + value.text = text + value.type = self.extractor_type_name + value.data = self.__get_data(match_source, src_match) + result.append(value) + else: + last = i + + result = ExtractResultExtension.filter_ambiguity(result, source, self.config.ambiguity_time_period_filters_dict) + + return result + + @staticmethod + def __get_data(source: Dict[Match, any], key: Match) -> any: + if key not in source: + return None + + result = DateTimeExtra() + result.data_type = source[key] + result.named_entity = key.capturesdict() + result.match = key + return result + + +MatchedTimeRegex = namedtuple( + 'MatchedTimeRegex', ['matched', 'timex', 'begin_hour', 'end_hour', 'end_min']) + + +class CJKTimePeriodParserConfiguration(DateTimeOptionsConfiguration): + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_func(self) -> TimeFunctions: + raise NotImplementedError + + @abstractmethod + def get_matched_timex_range(self, text: str) -> dict: + raise NotImplementedError + + +class BaseCJKTimePeriodParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_TIMEPERIOD + + def __init__(self, config: CJKTimePeriodParserConfiguration): + self.config = config + + def parse(self, source: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + if reference is None: + reference = datetime.now() + + result = DateTimeParseResult(source) + extra: DateTimeExtra = source.data + + if not extra: + result = self.config.time_extractor.extract(source.text, reference) + extra = result.data + + if extra: + parse_result = self.parse_time_of_day(source.text, reference) + + if not parse_result.success: + parse_result = TimePeriodFunctions.handle(self.config.time_parser, extra, + reference, self.config.time_func) + + if parse_result.success: + parse_result.future_resolution[TimeTypeConstants.START_TIME] = DateTimeFormatUtil.format_time( + parse_result.future_value[0]) + parse_result.future_resolution[TimeTypeConstants.END_TIME] = DateTimeFormatUtil.format_time( + parse_result.future_value[1]) + parse_result.past_resolution[TimeTypeConstants.START_TIME] = DateTimeFormatUtil.format_time( + parse_result.past_value[0]) + parse_result.past_resolution[TimeTypeConstants.END_TIME] = DateTimeFormatUtil.format_time( + parse_result.past_value[1]) + + + result.value = parse_result + result.timex_str = parse_result.timex if parse_result is not None else '' + result.resolution_str = '' + + return result + + return None + + def filter_results(self, query: str, candidate_results: List[DateTimeParseResult]): + return candidate_results + + def parse_time_of_day(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + day = reference.day + month = reference.month + year = reference.year + + parameters = self.config.get_matched_timex_range(source) + if parameters['matched'] is False: + return DateTimeResolutionResult() + + end_hour = parameters['end_hour'] + begin_hour = parameters['begin_hour'] + + # Add "early"/"late" Mod + if (end_hour == begin_hour + Constants.HALF_MID_DAY_DURATION_HOUR_COUNT) and \ + (begin_hour == Constants.MORNING_BEGIN_HOUR or begin_hour == Constants.AFTERNOON_BEGIN_HOUR): + result.comment = Constants.COMMENT_EARLY + result.mod = TimeTypeConstants.EARLY_MOD + + if (begin_hour == end_hour - Constants.HALF_MID_DAY_DURATION_HOUR_COUNT) and \ + (end_hour == Constants.MORNING_END_HOUR or end_hour == Constants.AFTERNOON_END_HOUR): + result.comment = Constants.COMMENT_LATE + result.mod = TimeTypeConstants.LATE_MOD + + result.timex = parameters['timex'] + result.future_value = result.past_value = [ + DateUtils.safe_create_from_min_value( + year, month, day, parameters['begin_hour'], 0, 0), + DateUtils.safe_create_from_min_value( + year, month, day, parameters['end_hour'], parameters['end_min'], parameters['end_min']) + ] + + result.success = True + return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/__init__.py index cf208f8751..5a6283b47d 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/__init__.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/__init__.py @@ -1,9 +1,10 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from .date_time_recognizer import * from .constants import * +from .date_time_recognizer import * from .models import * +from .data_structures import * from .extractors import * from .parsers import * from .utilities import * @@ -19,8 +20,15 @@ from .base_holiday import * from .base_merged import * from .base_timezone import * +from .base_minimal_merged import * +from .base_minimal_configs import * +from .CJK import * from .english import * from .spanish import * from .chinese import * from .french import * from .portuguese import * +from .dutch import * +from .japanese import * +from .arabic import * +from .catalan import * diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/abstract_year_extractor.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/abstract_year_extractor.py index 002e7fca7c..b9dc798200 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/abstract_year_extractor.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/abstract_year_extractor.py @@ -92,4 +92,4 @@ def get_year_from_text(self, match: Match) -> int: elif 0 <= year < Constants.MAX_TWO_DIGIT_YEAR_FUTURE_NUM: year += 2000 - return year + return int(year) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/base_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/base_configs.py new file mode 100644 index 0000000000..2bb0ee0481 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/base_configs.py @@ -0,0 +1,78 @@ +from typing import Pattern +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.base_date import DateTimeUtilityConfiguration + + +class ArabicDateTimeUtilityConfiguration(DateTimeUtilityConfiguration): + @property + def ago_regex(self) -> Pattern: + return self._ago_regex + + @property + def later_regex(self) -> Pattern: + return self._later_regex + + @property + def in_connector_regex(self) -> Pattern: + return self._in_connector_regex + + @property + def since_year_suffix_regex(self) -> Pattern: + return self._since_year_suffix_regex + + @property + def within_next_prefix_regex(self) -> Pattern: + return self._within_next_prefix_regex + + @property + def am_desc_regex(self) -> Pattern: + return self._am_desc_regex + + @property + def pm_desc__regex(self) -> Pattern: + return self._pm_desc__regex + + @property + def am_pm_desc_regex(self) -> Pattern: + return self._am_pm_desc_regex + + @property + def range_unit_regex(self) -> Pattern: + return self._range_unit_regex + + @property + def time_unit_regex(self) -> Pattern: + return self._time_unit_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def common_date_prefix_regex(self) -> Pattern: + return self._common_date_prefix_regex + + @property + def range_prefix_regex(self) -> Pattern: + return self._range_prefix_regex + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + def __init__(self): + self._later_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.LaterRegex) + self._ago_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AgoRegex) + self._in_connector_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.InConnectorRegex) + self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.SinceYearSuffixRegex) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WithinNextPrefixRegex) + self._am_desc_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AmDescRegex) + self._pm_desc__regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PmDescRegex) + self._am_pm_desc_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AmPmDescRegex) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RangeUnitRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeUnitRegex) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.DateUnitRegex) + self._common_date_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.CommonDatePrefixRegex) + self._range_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RangePrefixRegex) + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/common_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/common_configs.py new file mode 100644 index 0000000000..60c9b39cc0 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/common_configs.py @@ -0,0 +1,208 @@ +from typing import Dict, Pattern + +from recognizers_number import BaseNumberExtractor, ArabicCardinalExtractor, ArabicIntegerExtractor, \ + ArabicOrdinalExtractor, BaseNumberParser, ArabicNumberParserConfiguration + +from recognizers_date_time.resources import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from recognizers_date_time.date_time.base_date import BaseDateExtractor, BaseDateParser +from recognizers_date_time.date_time.base_time import BaseTimeExtractor +from recognizers_date_time.date_time.base_dateperiod import BaseDatePeriodExtractor, BaseDatePeriodParser +from recognizers_date_time.date_time.base_timeperiod import BaseTimePeriodExtractor, BaseTimePeriodParser +from recognizers_date_time.date_time.base_timezone import BaseTimeZoneParser +from recognizers_date_time.date_time.arabic.base_configs import ArabicDateTimeUtilityConfiguration +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.dateperiod_extractor_config import ArabicDatePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.timeperiod_extractor_config import ArabicTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.date_parser_config import ArabicDateParserConfiguration +from recognizers_date_time.date_time.arabic.time_parser_config import ArabicTimeParserConfiguration +from recognizers_date_time.date_time.arabic.dateperiod_parser_config import ArabicDatePeriodParserConfiguration +from recognizers_date_time.date_time.arabic.timeperiod_parser_config import ArabicTimePeriodParserConfiguration +from recognizers_date_time.date_time.arabic.parsers import ArabicTimeParser + +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor, BaseDurationParser +from recognizers_date_time.date_time.base_datetime import BaseDateTimeExtractor, BaseDateTimeParser +from recognizers_date_time.date_time.base_datetimeperiod import BaseDateTimePeriodExtractor, BaseDateTimePeriodParser +from recognizers_date_time.date_time.arabic.datetime_extractor_config import ArabicDateTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetime_parser_config import ArabicDateTimeParserConfiguration +from recognizers_date_time.date_time.arabic.datetimeperiod_extractor_config import ArabicDateTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetimeperiod_parser_config import ArabicDateTimePeriodParserConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration +from recognizers_date_time.date_time.arabic.duration_parser_config import ArabicDurationParserConfiguration + + +class ArabicCommonDateTimeParserConfiguration(BaseDateParserConfiguration): + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def date_period_parser(self) -> DateTimeParser: + return self._date_period_parser + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def date_time_period_parser(self) -> DateTimeParser: + return self._date_time_period_parser + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def unit_value_map(self) -> Dict[str, int]: + return self._unit_value_map + + @property + def season_map(self) -> Dict[str, str]: + return self._season_map + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def double_numbers(self) -> Dict[str, int]: + return self._double_numbers + + @property + def special_year_prefixes(self) -> Dict[str, str]: + return self._special_year_prefixes_map + + @property + def written_decades(self) -> Dict[str, int]: + return self._written_decades + + @property + def special_decade_cases(self) -> Dict[str, int]: + return self._special_decade_cases + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self): + super().__init__() + self._utility_configuration = ArabicDateTimeUtilityConfiguration() + + self._unit_value_map = ArabicDateTime.UnitValueMap + self._season_map = ArabicDateTime.SeasonMap + self._special_year_prefixes_map = ArabicDateTime.SpecialYearPrefixesMap + self._cardinal_map = ArabicDateTime.CardinalMap + self._day_of_week = ArabicDateTime.DayOfWeek + self._month_of_year = ArabicDateTime.MonthOfYear + self._numbers = ArabicDateTime.Numbers + self._double_numbers = ArabicDateTime.DoubleNumbers + self._written_decades = ArabicDateTime.WrittenDecades + self._special_decade_cases = ArabicDateTime.SpecialDecadeCases + + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + self._unit_map = ArabicDateTime.UnitMap + self._time_zone_parser = BaseTimeZoneParser() + self._utility_configuration = ArabicDateTimeUtilityConfiguration() + + self._cardinal_extractor = ArabicCardinalExtractor() + self._integer_extractor = ArabicIntegerExtractor() + self._ordinal_extractor = ArabicOrdinalExtractor() + + self._number_parser = BaseNumberParser(ArabicNumberParserConfiguration()) + + # Do not change order. The order of initialization can lead to side-effects + self._date_extractor = BaseDateExtractor(ArabicDateExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor(ArabicTimeExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor(ArabicDurationExtractorConfiguration()) + self._date_period_extractor = BaseDatePeriodExtractor(ArabicDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor(ArabicTimePeriodExtractorConfiguration()) + self._date_time_extractor = BaseDateTimeExtractor(ArabicDateTimeExtractorConfiguration()) + self._date_time_period_extractor = BaseDateTimePeriodExtractor(ArabicDateTimePeriodExtractorConfiguration()) + + self._duration_parser = BaseDurationParser(ArabicDurationParserConfiguration(self)) + self._date_parser = BaseDateParser(ArabicDateParserConfiguration(self)) + self._time_parser = ArabicTimeParser(ArabicTimeParserConfiguration(self)) + self._date_period_parser = BaseDatePeriodParser(ArabicDatePeriodParserConfiguration(self)) + self._time_period_parser = BaseTimePeriodParser(ArabicTimePeriodParserConfiguration(self)) + self._date_time_parser = BaseDateTimeParser(ArabicDateTimeParserConfiguration(self)) + self._date_time_period_parser = BaseDateTimePeriodParser(ArabicDateTimePeriodParserConfiguration(self)) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/date_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/date_extractor_config.py new file mode 100644 index 0000000000..b548567d14 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/date_extractor_config.py @@ -0,0 +1,234 @@ +from typing import Pattern, List, Dict +from recognizers_number import (BaseNumberExtractor, BaseNumberParser, + ArabicOrdinalExtractor, ArabicIntegerExtractor, ArabicNumberParserConfiguration) +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources import ArabicDateTime, BaseDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_date import DateExtractorConfiguration +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.utilities import DateTimeUtilityConfiguration +from recognizers_date_time.date_time.arabic.base_configs import ArabicDateTimeUtilityConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration +from recognizers_date_time.date_time.constants import Constants + + +class ArabicDateExtractorConfiguration(DateExtractorConfiguration): + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def month_num_regex(self) -> Pattern: + return self._month_num_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def for_the_regex(self) -> Pattern: + return self._for_the_regex + + @property + def week_day_and_day_of_month_regex(self) -> Pattern: + return self._week_day_and_day_of_month_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def strict_relative_regex(self) -> Pattern: + return self._strict_relative_regex + + @property + def prefix_article_regex(self) -> Pattern: + return self._prefix_article_regex + + @property + def of_month(self) -> Pattern: + return self._of_month + + @property + def month_end(self) -> Pattern: + return self._month_end + + @property + def week_day_end(self) -> Pattern: + return self._week_day_end + + @property + def week_day_start(self) -> Pattern: + return self._week_day_start + + @property + def year_suffix(self) -> Pattern: + return self._year_suffix + + @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 in_connector_regex(self) -> Pattern: + return self._in_connector_regex + + @property + def range_unit_regex(self) -> Pattern: + return self._range_unit_regex + + @property + def range_connector_symbol_regex(self) -> Pattern: + return self._range_connector_symbol_regex + + @property + def before_after_regex(self) -> Pattern: + return self._before_after_regex + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def since_year_suffix_regex(self) -> Pattern: + return self._since_year_suffix_regex + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def date_regex_list(self) -> List[Pattern]: + return self._date_regex_list + + @property + def implicit_date_list(self) -> List[Pattern]: + return self._implicit_date_list + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_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 utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self): + self._year_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearRegex) + self._before_after_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.BeforeAfterRegex) + self._month_num_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthNumRegex) + self._month_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthRegex) + + self._ordinal_extractor = ArabicOrdinalExtractor() + self._integer_extractor = ArabicIntegerExtractor() + + self._number_parser = BaseNumberParser( + ArabicNumberParserConfiguration()) + self._duration_extractor = self._duration_extractor = BaseDurationExtractor( + ArabicDurationExtractorConfiguration()) + self._utility_configuration = ArabicDateTimeUtilityConfiguration() + + self._implicit_date_list = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.OnRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.RelaxedOnRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SpecialDayRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.ThisRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.LastDateRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.NextDateRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SingleWeekDayRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayOfMonthRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SpecialDate), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SpecialDayWithNumRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.RelativeWeekDayRegex), + ] + + if ArabicDateTime.DefaultLanguageFallback == Constants.DEFAULT_LANGUAGE_FALLBACK_DMY: + date_extractor_4 = ArabicDateTime.DateExtractor5 + date_extractor_5 = ArabicDateTime.DateExtractor8 + date_extractor_6 = ArabicDateTime.DateExtractor7L + date_extractor_7 = ArabicDateTime.DateExtractor9S + date_extractor_8 = ArabicDateTime.DateExtractor4 + date_extractor_9 = ArabicDateTime.DateExtractor6 + date_extractor_10 = ArabicDateTime.DateExtractor9L + date_extractor_11 = ArabicDateTime.DateExtractor7S + else: + date_extractor_4 = ArabicDateTime.DateExtractor4 + date_extractor_5 = ArabicDateTime.DateExtractor6 + date_extractor_6 = ArabicDateTime.DateExtractor7L + date_extractor_7 = ArabicDateTime.DateExtractor7S + date_extractor_8 = ArabicDateTime.DateExtractor5 + date_extractor_9 = ArabicDateTime.DateExtractor8 + date_extractor_10 = ArabicDateTime.DateExtractor9L + date_extractor_11 = ArabicDateTime.DateExtractor9S + + self._date_regex_list = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.DateExtractor1), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.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(date_extractor_10), + RegExpUtility.get_safe_reg_exp(date_extractor_11), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.DateExtractorA), + ] + + self._day_of_week = ArabicDateTime.DayOfWeek + self._month_of_year = ArabicDateTime.MonthOfYear + + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + self._of_month = RegExpUtility.get_safe_reg_exp(ArabicDateTime.OfMonth) + self._month_end = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthEnd) + self._week_day_end = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayEnd) + self._week_day_start = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayStart) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.DateUnitRegex) + self._for_the_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.ForTheRegex) + self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayAndDayOfMonthRegex) + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayAndDayRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RelativeMonthRegex) + self._strict_relative_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.StrictRelativeRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayRegex) + self._prefix_article_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PrefixArticleRegex) + self._year_suffix = RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearSuffix) + self._less_than_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.LessThanRegex) + self._more_than_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MoreThanRegex) + self._in_connector_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.InConnectorRegex) + self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.SinceYearSuffixRegex) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RangeUnitRegex) + self._range_connector_symbol_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.RangeConnectorSymbolRegex) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/date_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/date_parser_config.py new file mode 100644 index 0000000000..6cd0da5380 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/date_parser_config.py @@ -0,0 +1,314 @@ +from typing import Pattern, List, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from ..extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.utilities import DateTimeUtilityConfiguration +from recognizers_date_time.date_time.base_date import DateParserConfiguration +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration + + +class ArabicDateParserConfiguration(DateParserConfiguration): + @property + def date_token_prefix(self) -> str: + return self._date_token_prefix + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def date_regex(self) -> List[Pattern]: + return self._date_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def on_regex(self) -> Pattern: + return self._on_regex + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def special_day_with_num_regex(self) -> Pattern: + return self._special_day_with_num_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def week_day_of_month_regex(self) -> Pattern: + return self._week_day_of_month_regex + + @property + def for_the_regex(self) -> Pattern: + return self._for_the_regex + + @property + def week_day_and_day_of_month_regex(self) -> Pattern: + return self._week_day_and_day_of_month_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def strict_relative_regex(self) -> Pattern: + return self._strict_relative_regex + + @property + def year_suffix(self) -> Pattern: + return self._year_suffix + + @property + def relative_week_day_regex(self) -> Pattern: + return self._relative_week_day_regex + + @property + def relative_day_regex(self) -> Pattern: + return self._relative_day_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._previous_prefix_regex + + @property + def upcoming_prefix_regex(self) -> Pattern: + return self._upcoming_prefix_regex + + @property + def past_prefix_regex(self) -> Pattern: + return self._past_prefix_regex + + @property + def before_after_regex(self) -> Pattern: + return self._before_after_regex + + @property + def tasks_mode_duration_to_date_patterns(self) -> Pattern: + return self._tasks_mode_duration_to_date_patterns + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def same_day_terms(self) -> List[str]: + return self._same_day_terms + + @property + def plus_one_day_terms(self) -> List[str]: + return self._plus_one_day_terms + + @property + def minus_one_day_terms(self) -> List[str]: + return self._minus_one_day_terms + + @property + def plus_two_day_terms(self) -> List[str]: + return self._plus_two_day_terms + + @property + def minus_two_day_terms(self) -> List[str]: + return self._minus_two_day_terms + + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self, config: BaseDateParserConfiguration): + self._date_token_prefix = ArabicDateTime.DateTokenPrefix + + self._integer_extractor = config.integer_extractor + self._ordinal_extractor = config.ordinal_extractor + self._cardinal_extractor = config.cardinal_extractor + self._number_parser = config.number_parser + self._date_extractor = config.date_extractor + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + + self._date_regex = ArabicDateExtractorConfiguration().date_regex_list + + self._month_of_year = config.month_of_year + self._day_of_month = config.day_of_month + self._day_of_week = config.day_of_week + self._unit_map = config.unit_map + self._cardinal_map = config.cardinal_map + + self._on_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.OnRegex) + self._special_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecialDayRegex) + self._special_day_with_num_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecialDayWithNumRegex) + self._next_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextDateRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LastDateRegex) + self._this_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ThisRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DateUnitRegex) + self._month_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekDayRegex) + self._week_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekDayOfMonthRegex) + self._for_the_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ForTheRegex) + self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekDayAndDayOfMonthRegex) + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekDayAndDayRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeMonthRegex) + self._strict_relative_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.StrictRelativeRegex) + self._year_suffix = RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearSuffix) + self._relative_week_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeWeekDayRegex) + self._before_after_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.BeforeAfterRegex) + + self._utility_configuration = config.utility_configuration + self._date_token_prefix = ArabicDateTime.DateTokenPrefix + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + self._tasks_mode_duration_to_date_patterns = None + + self._past_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PastPrefixRegex) + self._upcoming_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.UpcomingPrefixRegex) + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PreviousPrefixRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.NextPrefixRegex) + self._relative_day_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RelativeDayRegex) + + self._minus_two_day_terms = ArabicDateTime.MinusTwoDayTerms + self._plus_two_day_terms = ArabicDateTime.PlusTwoDayTerms + self._minus_one_day_terms = ArabicDateTime.MinusOneDayTerms + self._plus_one_day_terms = ArabicDateTime.PlusOneDayTerms + self._same_day_terms = ArabicDateTime.SameDayTerms + + def get_swift_month_or_year(self, source: str) -> int: + trimmed_text = source.strip().lower() + swift = 0 + + if regex.search(self._next_prefix_regex, trimmed_text): + swift = 1 + elif regex.search(self._previous_prefix_regex, trimmed_text): + swift = -1 + + return swift + + def is_cardinal_last(self, source: str) -> bool: + trimmed_text = source.strip().lower() + return trimmed_text == "last" + + def normalise(self, text: str) -> str: + return text + + def get_swift_day(self, source: str) -> int: + trimmed_text = source.strip().lower() + swift = 0 + matches = regex.search(self.relative_day_regex, source) + if trimmed_text == 'اليوم' or trimmed_text == 'اليوم الحاضر' or trimmed_text == 'اليوم العصر': + swift = 0 + elif trimmed_text == 'غداً' or trimmed_text == 'الغد': + swift = 1 + elif trimmed_text == 'أمس' or trimmed_text == 'البارحة' or trimmed_text == 'الأمس': + swift = -1 + elif matches: + swift = self.get_swift(source) + + return swift + + def get_swift_month(self, source: str) -> int: + return self.get_swift(source) + + def get_swift(self, source: str) -> int: + trimmed_text = source.strip().lower() + swift = 0 + next_prefix_matches = regex.search( + self.next_prefix_regex, trimmed_text) + past_prefix_matches = regex.search( + self.past_prefix_regex, trimmed_text) + if next_prefix_matches: + swift = 1 + elif past_prefix_matches: + swift = -1 + + return swift diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/dateperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/dateperiod_extractor_config.py new file mode 100644 index 0000000000..600b294bf3 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/dateperiod_extractor_config.py @@ -0,0 +1,360 @@ +from typing import List, Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number import BaseNumberParser +from recognizers_number.number.arabic.extractors import ArabicIntegerExtractor +from recognizers_number.number.arabic.parsers import ArabicNumberParserConfiguration +from recognizers_date_time.resources.base_date_time import BaseDateTime +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.base_date import BaseDateExtractor +from recognizers_date_time.date_time.base_dateperiod import DatePeriodExtractorConfiguration, MatchedIndex +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration +from recognizers_text.extractor import Extractor +from recognizers_number import ArabicOrdinalExtractor, BaseNumberExtractor, ArabicCardinalExtractor + + +class ArabicDatePeriodExtractorConfiguration(DatePeriodExtractorConfiguration): + + @property + def till_regex(self) -> Pattern: + return self._till_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 month_num_regex(self) -> Pattern: + return self._month_num_regex + + @property + def illegal_year_regex(self) -> Pattern: + return self._illegal_year_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 written_month_regex(self) -> Pattern: + return self._written_month_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def time_unit_regex(self) -> Pattern: + return self._time_unit_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._previous_prefix_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def future_suffix_regex(self) -> Pattern: + return self._future_suffix_regex + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def simple_cases_regexes(self) -> List[Pattern]: + return self._simple_cases_regexes + + @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 week_of_regex(self) -> Pattern: + return self._week_of_regex + + @property + def month_of_regex(self) -> Pattern: + return self._month_of_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 within_next_prefix_regex(self) -> Pattern: + return self._within_next_prefix_regex + + @property + def rest_of_date_regex(self) -> Pattern: + return self._rest_of_date_regex + + @property + def later_early_year_regex(self) -> Pattern: + return self._later_early_year_regex + + @property + def week_with_week_day_range_regex(self) -> Pattern: + return self._week_with_week_day_range_regex + + @property + def year_period_regex(self) -> Pattern: + return self._year_period_regex + + @property + def complex_date_period_regex(self) -> Pattern: + return self._complex_date_period_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 century_suffix_regex(self) -> Pattern: + return self._century_suffix_regex + + @property + def first_last_regex(self) -> Pattern: + return self._first_last_regex + + @property + def of_year_regex(self) -> Pattern: + return self._of_year_regex + + @property + def from_regex(self) -> Pattern: + return self._from_regex + + @property + def between_token_regex(self) -> Pattern: + return self._between_token_regex + + @property + def date_point_extractor(self) -> DateTimeExtractor: + return self._date_point_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def cardinal_extractor(self) -> Extractor: + return self._cardinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def duration_date_restrictions(self) -> [str]: + return self._duration_date_restrictions + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + def __init__(self): + self._of_year_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.OfYearRegex) + self._week_with_week_day_range_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekWithWeekDayRangeRegex) + self._later_early_year_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.LaterEarlyPeriodRegex) + self._all_half_year_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AllHalfYearRegex) + self._complex_date_period_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.ComplexDatePeriodRegex) + self._rest_of_date_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RestOfDateRegex) + self._which_week_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WhichWeekRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.NextPrefixRegex) + self._month_suffix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthSuffixRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RelativeMonthRegex) + self._written_month_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WrittenMonthRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekDayRegex) + self._day_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.DayRegex) + self._range_connector_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RangeConnectorRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeUnitRegex) + self._first_last_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.FirstLastRegex) + self._between_token_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.BetweenTokenRegex) + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PastSuffixRegex) + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + self._week_of_month_regex = ArabicDateTime.WeekOfMonthRegex + + self._simple_cases_regexes = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SimpleCasesRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.BetweenRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.OneWordPeriodRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthWithYear), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthNumWithYear), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekOfMonthRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekOfYearRegex), + RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthFrontBetweenRegex), + RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthFrontSimpleCasesRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.QuarterRegex), + RegExpUtility.get_safe_reg_exp( + ArabicDateTime.QuarterRegexYearFront), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.AllHalfYearRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SeasonRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.WhichWeekRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.RestOfDateRegex), + RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LaterEarlyPeriodRegex), + RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekWithWeekDayRangeRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearPlusNumberRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.DecadeWithCenturyRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.RelativeDecadeRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.ReferenceDatePeriodRegex) + ] + + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + self._illegal_year_regex = RegExpUtility.get_safe_reg_exp( + BaseDateTime.IllegalYearRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TillRegex) + self._followed_unit = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FollowedDateUnit) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NumberCombinedWithDateUnit) + self._past_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PreviousPrefixRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextPrefixRegex) + self._week_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekOfRegex) + self._month_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthOfRegex) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DateUnitRegex) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WithinNextPrefixRegex) + self._in_connector_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.InConnectorRegex) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RangeUnitRegex) + + self._from_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FromRegex) + self.before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.BeforeRegex) + + self._date_point_extractor = BaseDateExtractor( + ArabicDateExtractorConfiguration()) + self._number_parser = BaseNumberParser( + ArabicNumberParserConfiguration()) + self._duration_extractor = BaseDurationExtractor(ArabicDurationExtractorConfiguration()) + self._integer_extractor = ArabicIntegerExtractor() + self._now_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NowRegex) + self._future_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FutureSuffixRegex + ) + self._ago_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AgoRegex + ) + self._later_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LaterRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LessThanRegex + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MoreThanRegex + ) + self._duration_date_restrictions = ArabicDateTime.DurationDateRestrictions + self._year_period_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearPeriodRegex + ) + self._month_num_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthNumRegex + ) + self._century_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.CenturySuffixRegex + ) + self._decade_with_century_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DecadeWithCenturyRegex + ) + self._ordinal_extractor = ArabicOrdinalExtractor() + self._cardinal_extractor = ArabicCardinalExtractor() + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PreviousPrefixRegex + ) + self._cardinal_extractor = ArabicCardinalExtractor() + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeUnitRegex) + + 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.between_token_regex.search(source) + if match: + return MatchedIndex(True, match.start()) + + return MatchedIndex(False, -1) + + def has_connector_token(self, source: str) -> bool: + return RegExpUtility.is_exact_match(self.has_connector_token, source) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/dateperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/dateperiod_parser_config.py new file mode 100644 index 0000000000..b4a752cccd --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/dateperiod_parser_config.py @@ -0,0 +1,429 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration +from recognizers_date_time.date_time.base_dateperiod import DatePeriodParserConfiguration + + +class ArabicDatePeriodParserConfiguration(DatePeriodParserConfiguration): + + @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 check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def reference_date_period_regex(self) -> Pattern: + return self._reference_date_period_regex + + @property + def decade_with_century_regex(self) -> Pattern: + return self._decade_with_century_regex + + @property + def relative_regex(self) -> Pattern: + return self._relative_regex + + @property + def ago_regex(self) -> Pattern: + return self._ago_regex + + @property + def later_regex(self) -> Pattern: + return self._later_regex + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def month_front_between_regex(self) -> Pattern: + return self._month_front_between_regex + + @property + def between_regex(self) -> Pattern: + return self._between_regex + + @property + def month_front_simple_cases_regex(self) -> Pattern: + return self._month_front_simple_cases_regex + + @property + def simple_cases_regex(self) -> Pattern: + return self._simple_cases_regex + + @property + def one_word_period_regex(self) -> Pattern: + return self._one_word_period_regex + + @property + def month_with_year(self) -> Pattern: + return self._month_with_year + + @property + def month_num_with_year(self) -> Pattern: + return self._month_num_with_year + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def in_connector_regex(self) -> Pattern: + return self._in_connector_regex + + @property + def week_of_month_regex(self) -> Pattern: + return self._week_of_month_regex + + @property + def week_of_year_regex(self) -> Pattern: + return self._week_of_year_regex + + @property + def quarter_regex(self) -> Pattern: + return self._quarter_regex + + @property + def quarter_regex_year_front(self) -> Pattern: + return self._quarter_regex_year_front + + @property + def all_half_year_regex(self) -> Pattern: + return self._all_half_year_regex + + @property + def season_regex(self) -> Pattern: + return self._season_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 which_week_regex(self) -> Pattern: + return self._which_week_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._past_prefix_regex + + @property + def this_prefix_regex(self) -> Pattern: + return self._this_prefix_regex + + @property + def rest_of_date_regex(self) -> Pattern: + return self._rest_of_date_regex + + @property + def later_early_period_regex(self) -> Pattern: + return self._later_early_period_regex + + @property + def week_with_week_day_range_regex(self) -> Pattern: + return self._week_with_week_day_range_regex + + @property + def unspecific_end_of_range_regex(self) -> Pattern: + return self._unspecific_end_of_range_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def season_map(self) -> Dict[str, str]: + return self._season_map + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def complex_dateperiod_regex(self) -> Pattern: + return self._complex_dateperiod_regex + + @property + def relative_decade_regex(self) -> Pattern: + return self._relative_decade_regex + + @property + def dynasty_year_regex(self) -> Pattern: + return None + + @property + def dynasty_year_map(self) -> Dict[str, int]: + return None + + @property + def year_plus_number_regex(self) -> Pattern: + return self._year_plus_number_regex + + @property + def year_period_regex(self) -> Pattern: + return self._year_period_regex + + @property + def within_next_prefix_regex(self) -> Pattern: + return self._within_next_prefix_regex + + @property + def century_suffix_regex(self) -> Pattern: + return self._century_suffix_regex + + @property + def first_last_regex(self) -> Pattern: + return self._first_last_regex + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def after_next_suffix_regex(self) -> Pattern: + return self._after_next_suffix_regex + + def __init__(self, config: BaseDateParserConfiguration): + self._relative_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeRegex) + self._later_regex = ArabicDateTime.LaterRegex + self._ago_regex = ArabicDateTime.AgoRegex + self._token_before_date = ArabicDateTime.TokenBeforeDate + self.cardinal_extractor = config.cardinal_extractor + self.number_parser = config.number_parser + self._duration_extractor = config.duration_extractor + self._date_extractor = config.date_extractor + self._duration_parser = config.duration_parser + self._date_parser = config.date_parser + + self._after_next_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AfterNextSuffixRegex) + self._year_plus_number_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearPlusNumberRegex) + self._year_period_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearPeriodRegex) + self._month_front_between_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthFrontBetweenRegex) + self._between_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.BetweenRegex) + self._month_front_simple_cases_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthFrontSimpleCasesRegex) + self._simple_cases_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SimpleCasesRegex) + self._one_word_period_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.OneWordPeriodRegex) + self._month_with_year = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthWithYear) + self._month_num_with_year = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthNumWithYear) + self._year_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearRegex) + self._past_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PastSuffixRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextPrefixRegex) + self.number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NumberCombinedWithDurationUnit) + self._week_of_month_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekOfMonthRegex) + self._week_of_year_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekOfYearRegex) + self._quarter_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.QuarterRegex) + self._quarter_regex_year_front = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.QuarterRegexYearFront) + self._all_half_year_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AllHalfYearRegex) + self._season_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SeasonRegex) + self._which_week_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WhichWeekRegex) + self._week_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekOfRegex) + self._month_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MonthOfRegex) + self._rest_of_date_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RestOfDateRegex) + self._later_early_period_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LaterEarlyPeriodRegex) + self._week_with_week_day_range_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekWithWeekDayRangeRegex) + self._unspecific_end_of_range_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.UnspecificEndOfRangeRegex) + + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextPrefixRegex) + self._past_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PreviousPrefixRegex) + self._this_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ThisPrefixRegex) + self._next_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FutureSuffixRegex) + self._past_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PastSuffixRegex) + + self._in_connector_regex = config.utility_configuration.in_connector_regex + self._unit_map = config.unit_map + self._cardinal_map = config.cardinal_map + self._day_of_month = config.day_of_month + self._month_of_year = config.month_of_year + self._season_map = config.season_map + self._now_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NowRegex) + self._decade_with_century_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DecadeWithCenturyRegex) + self._complex_dateperiod_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ComplexDatePeriodRegex + ) + self._relative_decade_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeDecadeRegex + ) + self._reference_date_period_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ReferenceDatePeriodRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LessThanRegex + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MoreThanRegex + ) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WithinNextPrefixRegex + ) + self._century_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.CenturySuffixRegex + ) + self._first_last_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FirstLastRegex + ) + self._special_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecialDayRegex + ) + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + def get_swift_day_or_month(self, source: str) -> int: + trimmed_source = source.strip().lower() + swift = 0 + if self.after_next_suffix_regex.search(trimmed_source): + swift = 2 + elif self.next_prefix_regex.search(trimmed_source): + swift = 1 + elif self.previous_prefix_regex.search(trimmed_source): + swift = -1 + + return swift + + def get_swift_year(self, source: str) -> int: + trimmed_source = source.strip().lower() + swift = -10 + + if self.after_next_suffix_regex.search(trimmed_source): + swift = 2 + elif self.next_prefix_regex.search(trimmed_source): + swift = 1 + elif self.previous_prefix_regex.search(trimmed_source): + swift = -1 + elif self.this_prefix_regex.search(trimmed_source): + swift = 0 + + return swift + + def is_future(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.startswith(o) for o in ArabicDateTime.FutureTerms) + + def is_last_cardinal(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in ArabicDateTime.LastCardinalTerms) + + def is_month_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in ArabicDateTime.MonthTerms) or \ + (trimmed_source in ArabicDateTime.MonthTerms and + RegExpUtility.get_matches(self.after_next_suffix_regex, trimmed_source)) + + def is_month_to_date(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in ArabicDateTime.MonthToDateTerms) + + def is_weekend(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in ArabicDateTime.WeekendTerms) or \ + (trimmed_source in ArabicDateTime.WeekendTerms and + RegExpUtility.get_matches(self.after_next_suffix_regex, trimmed_source)) + + def is_week_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in ArabicDateTime.WeekTerms) or \ + (trimmed_source in ArabicDateTime.WeekTerms and + RegExpUtility.get_matches(self.after_next_suffix_regex, trimmed_source)) + + def is_fortnight(self, source: str) -> bool: + return False + + def is_year_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in ArabicDateTime.YearTerms) or \ + (trimmed_source in ArabicDateTime.YearTerms and + RegExpUtility.get_matches(self.after_next_suffix_regex, trimmed_source)) or \ + (any(trimmed_source.endswith(o) for o in ArabicDateTime.GenericYearTerms) and + trimmed_source in ArabicDateTime.GenericYearTerms) + + def is_year_to_date(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in ArabicDateTime.YearToDateTerms) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetime_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetime_extractor_config.py new file mode 100644 index 0000000000..84450b02f0 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetime_extractor_config.py @@ -0,0 +1,160 @@ +from typing import Pattern +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_date import BaseDateExtractor +from recognizers_date_time.date_time.base_time import BaseTimeExtractor +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.base_datetime import DateTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.base_configs import ArabicDateTimeUtilityConfiguration +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration + + +class ArabicDateTimeExtractorConfiguration(DateTimeExtractorConfiguration): + @property + def date_point_extractor(self) -> DateTimeExtractor: + return self._date_point_extractor + + @property + def time_point_extractor(self) -> DateTimeExtractor: + return self._time_point_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def suffix_regex(self) -> Pattern: + return self._suffix_regex + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def time_of_today_after_regex(self) -> Pattern: + return self._time_of_today_after_regex + + @property + def simple_time_of_today_after_regex(self) -> Pattern: + return self._simple_time_of_today_after_regex + + @property + def night_regex(self) -> Pattern: + return self._night_regex + + @property + def time_of_today_before_regex(self) -> Pattern: + return self._time_of_today_before_regex + + @property + def simple_time_of_today_before_regex(self) -> Pattern: + return self._simple_time_of_today_before_regex + + @property + def specific_end_of_regex(self) -> Pattern: + return self._specific_end_of_regex + + @property + def unspecific_end_of_regex(self) -> Pattern: + return self._unspecific_end_of_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def utility_configuration(self) -> ArabicDateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def number_as_time_regex(self) -> Pattern: + return self._number_as_time_regex + + @property + def date_number_connector_regex(self) -> Pattern: + return self._date_number_connector_regex + + @property + def suffix_after_regex(self) -> Pattern: + return self._suffix_after_regex + + @property + def year_suffix(self) -> Pattern: + return self._year_suffix + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def dmy_date_format(self) -> bool: + return self._dmy_date_format + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def prefix_day_regex(self) -> Pattern: + return self._prefix_day_regex + + def __init__(self, dmyDateFormat=True): + super().__init__() + self._date_point_extractor = BaseDateExtractor( + ArabicDateExtractorConfiguration()) + self._time_point_extractor = BaseTimeExtractor( + ArabicTimeExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor( + ArabicDurationExtractorConfiguration()) + self._utility_configuration = ArabicDateTimeUtilityConfiguration() + self.preposition_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PrepositionRegex) + self._now_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NowRegex) + self._suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixRegex) + self._time_of_today_after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeOfTodayAfterRegex) + self._simple_time_of_today_after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SimpleTimeOfTodayAfterRegex) + self._night_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeOfDayRegex) + self._time_of_today_before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeOfTodayBeforeRegex) + self._simple_time_of_today_before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SimpleTimeOfTodayBeforeRegex) + self._specific_end_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificEndOfRegex) + self._unspecific_end_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.UnspecificEndOfRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeUnitRegex) + self.connector_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ConnectorRegex) + self._number_as_time_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NumberAsTimeRegex) + self._date_number_connector_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DateNumberConnectorRegex + ) + self._suffix_after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixAfterRegex + ) + self._year_suffix = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearSuffix + ) + self._year_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearRegex + ) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificTimeOfDayRegex + ) + self._prefix_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PrefixDayRegex) + + def is_connector_token(self, source: str) -> bool: + return source.strip() == '' or regex.search(self.connector_regex, source) is not None or regex.search(self.preposition_regex, source) is not None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetime_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetime_parser_config.py new file mode 100644 index 0000000000..e70dc84f9e --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetime_parser_config.py @@ -0,0 +1,200 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.parsers import BaseNumberParser +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.utilities import DateTimeUtilityConfiguration +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration +from recognizers_date_time.date_time.base_datetime import DateTimeParserConfiguration, MatchedTimex +from recognizers_date_time.date_time.constants import Constants + + +class ArabicDateTimeParserConfiguration(DateTimeParserConfiguration): + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def token_before_time(self) -> str: + return self._token_before_time + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def am_time_regex(self) -> Pattern: + return self._am_time_regex + + @property + def pm_time_regex(self) -> Pattern: + return self._pm_time_regex + + @property + def simple_time_of_today_after_regex(self) -> Pattern: + return self._simple_time_of_today_after_regex + + @property + def simple_time_of_today_before_regex(self) -> Pattern: + return self._simple_time_of_today_before_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def specific_end_of_regex(self) -> Pattern: + return self._specific_end_of_regex + + @property + def unspecific_end_of_regex(self) -> Pattern: + return self._unspecific_end_of_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def night_time_regex(self) -> Pattern: + return self._night_time_regex + + @property + def now_time_regex(self) -> Pattern: + return self._now_time_regex + + @property + def recently_time_regex(self) -> Pattern: + return self._recently_time_regex + + @property + def asap_time_regex(self) -> Pattern: + return self._asap_time_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._previous_prefix_regex + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self, config: BaseDateParserConfiguration): + self._token_before_date = ArabicDateTime.TokenBeforeDate + self._token_before_time = ArabicDateTime.TokenBeforeTime + self._date_extractor = config.date_extractor + self._time_extractor = config.time_extractor + self._date_parser = config.date_parser + self._time_parser = config.time_parser + self._now_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NowRegex) + self._am_time_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AMTimeRegex) + self._pm_time_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PMTimeRegex) + self._simple_time_of_today_after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SimpleTimeOfTodayAfterRegex) + self._simple_time_of_today_before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SimpleTimeOfTodayBeforeRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificTimeOfDayRegex) + self._specific_end_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificEndOfRegex) + self._unspecific_end_of_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.UnspecificEndOfRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeUnitRegex) + self._numbers = config.numbers + self._cardinal_extractor = config.cardinal_extractor + self._number_parser = config.number_parser + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + self._unit_map = config.unit_map + self._utility_configuration = config.utility_configuration + self._night_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.NightTimeRegex) + self._now_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.NowTimeRegex) + self._recently_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RecentlyTimeRegex) + self._asap_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AsapTimeRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.NextPrefixRegex) + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PreviousPrefixRegex) + + def get_hour(self, source: str, hour: int) -> int: + source = source.strip().lower() + + if RegExpUtility.match_end(self.am_time_regex, source, False) and hour >= Constants.HALF_DAY_HOUR_COUNT: + return hour - 12 + elif not RegExpUtility.match_end(self.am_time_regex, source, False) and hour < Constants.HALF_DAY_HOUR_COUNT and \ + not (RegExpUtility.match_end(self.pm_time_regex, source, False) and hour < Constants.QUARTER_DAY_HOUR_COUNT): + return hour + 12 + + return hour + + def get_matched_now_timex(self, source: str) -> MatchedTimex: + + if RegExpUtility.match_end(self.now_time_regex, source, True): + return MatchedTimex(True, 'PRESENT_REF') + elif RegExpUtility.match_end(self.recently_time_regex, source, True): + return MatchedTimex(True, 'PAST_REF') + elif RegExpUtility.match_end(self.asap_time_regex, source, True): + return MatchedTimex(True, 'FUTURE_REF') + + return MatchedTimex(False, None) + + def get_swift_day(self, source: str) -> int: + + if RegExpUtility.match_begin(self.next_prefix_regex, source, True): + return 1 + elif RegExpUtility.match_begin(self.previous_prefix_regex, source, True): + return -1 + + return 0 + + def have_ambiguous_token(self, source: str, matched_text: str) -> bool: + return False + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetimeperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetimeperiod_extractor_config.py new file mode 100644 index 0000000000..b727e7a363 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetimeperiod_extractor_config.py @@ -0,0 +1,259 @@ +from typing import List, Pattern +import regex + +from recognizers_number import BaseNumberExtractor, ArabicCardinalExtractor +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_datetimeperiod import DateTimePeriodExtractorConfiguration, MatchedIndex +from recognizers_date_time.date_time.base_date import BaseDateExtractor +from recognizers_date_time.date_time.base_time import BaseTimeExtractor +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.base_timeperiod import BaseTimePeriodExtractor +from recognizers_date_time.date_time.base_datetime import BaseDateTimeExtractor +from recognizers_date_time.date_time.base_timezone import BaseTimeZoneExtractor +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration +from recognizers_date_time.date_time.arabic.timeperiod_extractor_config import ArabicTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetime_extractor_config import ArabicDateTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.timezone_extractor_config import ArabicTimeZoneExtractorConfiguration +from recognizers_date_time.date_time.utilities import DateTimeOptions + + +class ArabicDateTimePeriodExtractorConfiguration(DateTimePeriodExtractorConfiguration): + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def single_date_extractor(self) -> DateTimeExtractor: + return self._single_date_extractor + + @property + def single_time_extractor(self) -> DateTimeExtractor: + return self._single_time_extractor + + @property + def single_date_time_extractor(self) -> DateTimeExtractor: + return self._single_date_time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def time_zone_extractor(self) -> DateTimeExtractor: + return self._time_zone_extractor + + @property + def simple_cases_regexes(self) -> List[Pattern]: + return self._simple_cases_regexes + + @property + def preposition_regex(self) -> Pattern: + return self._preposition_regex + + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def period_time_of_day_with_date_regex(self) -> Pattern: + return self._period_time_of_day_with_date_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 time_unit_regex(self) -> Pattern: + return self._time_unit_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._past_prefix_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def relative_time_unit_regex(self) -> Pattern: + return self._relative_time_unit_regex + + @property + def rest_of_date_time_regex(self) -> Pattern: + return self._rest_of_date_time_regex + + @property + def general_ending_regex(self) -> Pattern: + return self._general_ending_regex + + @property + def middle_pause_regex(self) -> Pattern: + return self._middle_pause_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def within_next_prefix_regex(self) -> Pattern: + return self._within_next_prefix_regex + + @property + def future_suffix_regex(self) -> Pattern: + return self._future_suffix_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def am_desc_regex(self) -> Pattern: + return self._am_desc_regex + + @property + def pm_desc_regex(self) -> Pattern: + return self._pm_desc_regex + + @property + def prefix_day_regex(self) -> Pattern: + return self._prefix_day_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def suffix_regex(self) -> Pattern: + return self._suffix_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + def __init__(self, dmyDateFormat=True): + super().__init__() + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WeekDayRegex + ) + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + self._cardinal_extractor = ArabicCardinalExtractor() + self._single_date_extractor = BaseDateExtractor( + ArabicDateExtractorConfiguration()) + self._single_time_extractor = BaseTimeExtractor( + ArabicTimeExtractorConfiguration()) + self._single_date_time_extractor = BaseDateTimeExtractor( + ArabicDateTimeExtractorConfiguration(dmyDateFormat)) + self._duration_extractor = BaseDurationExtractor( + ArabicDurationExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + ArabicTimePeriodExtractorConfiguration()) + self._time_zone_extractor = BaseTimeZoneExtractor( + ArabicTimeZoneExtractorConfiguration()) + self._simple_cases_regexes = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.PureNumFromTo), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.PureNumBetweenAnd) + ] + self._preposition_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PrepositionRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TillRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodSpecificTimeOfDayRegex) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodTimeOfDayRegex) + self._period_time_of_day_with_date_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodTimeOfDayWithDateRegex) + self._followed_unit = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeFollowedUnit) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeNumberCombinedWithUnit) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeUnitRegex) + self._past_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PreviousPrefixRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextPrefixRegex) + self._relative_time_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeTimeUnitRegex) + self._rest_of_date_time_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RestOfDateTimeRegex) + self._general_ending_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.GeneralEndingRegex) + self._middle_pause_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MiddlePauseRegex) + self.range_connector_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RangeConnectorRegex) + self._token_before_date = ArabicDateTime.TokenBeforeDate + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.WithinNextPrefixRegex + ) + self._future_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FutureSuffixRegex + ) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DateUnitRegex + ) + self._am_desc_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AmDescRegex + ) + self._pm_desc_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PmDescRegex + ) + self._prefix_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PrefixDayRegex + ) + self._before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.BeforeRegex + ) + self._after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AfterRegex + ) + self._suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixRegex + ) + self._options = DateTimeOptions.NONE + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + def get_from_token_index(self, source: str) -> MatchedIndex: + if source.endswith('from'): + return MatchedIndex(matched=True, index=source.rfind('from')) + + return MatchedIndex(matched=False, index=-1) + + def get_between_token_index(self, source: str) -> MatchedIndex: + if source.endswith('between'): + return MatchedIndex(matched=True, index=source.rfind('between')) + + return MatchedIndex(matched=False, index=-1) + + def has_connector_token(self, source: str) -> bool: + return RegExpUtility.is_exact_match(self.range_connector_regex, source, True) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetimeperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetimeperiod_parser_config.py new file mode 100644 index 0000000000..36b691710b --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/datetimeperiod_parser_config.py @@ -0,0 +1,240 @@ +from typing import Pattern, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.base_datetimeperiod import DateTimePeriodParserConfiguration, MatchedTimeRange +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration + + +class ArabicDateTimePeriodParserConfiguration(DateTimePeriodParserConfiguration): + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def future_suffix_regex(self): + return self._future_suffix_regex + + @property + def within_next_prefix_regex(self): + return self._within_next_prefix_regex + + def __init__(self, config: BaseDateParserConfiguration): + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeOfDayRegex) + self._future_suffix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.FutureSuffixRegex) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WithinNextPrefixRegex) + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PreviousPrefixRegex) + self._cardinal_extractor = config.cardinal_extractor + self._am_desc_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AmDescRegex) + self._pm_desc_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PmDescRegex) + self._token_before_date = ArabicDateTime.TokenBeforeDate + self._token_before_time = ArabicDateTime.TokenBeforeTime + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + self._pure_number_from_to_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PureNumFromTo) + self._pure_number_between_and_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PureNumBetweenAnd) + self._period_time_of_day_with_date_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodTimeOfDayWithDateRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodSpecificTimeOfDayRegex) + self._past_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PreviousPrefixRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextPrefixRegex) + self._relative_time_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeTimeUnitRegex) + self._rest_of_date_time_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RestOfDateTimeRegex) + self._numbers = config.numbers + self._unit_map = config.unit_map + self._date_extractor = config.date_extractor + self._time_extractor = config.time_extractor + self._date_time_extractor = config.date_time_extractor + self._time_period_extractor = config.time_period_extractor + self._duration_extractor = config.duration_extractor + self._date_parser = config.date_parser + self._time_parser = config.time_parser + self._date_time_parser = config.date_time_parser + self._time_period_parser = config.time_period_parser + self._duration_parser = config.duration_parser + self._time_zone_parser = config.time_zone_parser + self.morning_start_end_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MorningStartEndRegex) + self.afternoon_start_end_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AfternoonStartEndRegex) + self.evening_start_end_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EveningStartEndRegex) + self.night_start_end_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NightStartEndRegex) + self._prefix_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PrefixDayRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AfterRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.BeforeRegex) + + @property + def previous_prefix_regex(self): + return self._previous_prefix_regex + + @property + def cardinal_extractor(self): + return self._cardinal_extractor + + @property + def am_desc_regex(self): + return self._am_desc_regex + + @property + def pm_desc_regex(self): + return self._pm_desc_regex + + @property + def before_regex(self): + return self._before_regex + + @property + def after_regex(self): + return self._after_regex + + @property + def prefix_day_regex(self): + return self._prefix_day_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def token_before_time(self): + return self._token_before_time + + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def pure_number_from_to_regex(self) -> Pattern: + return self._pure_number_from_to_regex + + @property + def pure_number_between_and_regex(self) -> Pattern: + return self._pure_number_between_and_regex + + @property + def period_time_of_day_with_date_regex(self) -> Pattern: + return self._period_time_of_day_with_date_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def relative_time_unit_regex(self) -> Pattern: + return self._relative_time_unit_regex + + @property + def rest_of_date_time_regex(self) -> Pattern: + return self._rest_of_date_time_regex + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def get_matched_time_range(self, source: str): + begin_hour = 0 + end_hour = 0 + end_min = 0 + if regex.search(self.morning_start_end_regex, source): + time_str = 'TMO' + begin_hour = 8 + end_hour = Constants.HALF_DAY_HOUR_COUNT + elif regex.search(self.afternoon_start_end_regex, source): + time_str = 'TAF' + begin_hour = Constants.HALF_DAY_HOUR_COUNT + end_hour = 16 + elif regex.search(self.evening_start_end_regex, source): + time_str = 'TEV' + begin_hour = 16 + end_hour = 20 + elif regex.search(self.night_start_end_regex, source): + time_str = 'TNI' + begin_hour = 20 + end_hour = 23 + end_min = 59 + else: + time_str = '' + return MatchedTimeRange(time_str, begin_hour, end_hour, end_min, False) + + return MatchedTimeRange(time_str, begin_hour, end_hour, end_min, True) + + def get_swift_prefix(self, source: str) -> int: + if source.startswith('next'): + return 1 + + if source.startswith('last'): + return -1 + + return 0 diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/duration_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/duration_extractor_config.py new file mode 100644 index 0000000000..acba626aa9 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/duration_extractor_config.py @@ -0,0 +1,139 @@ +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.arabic.extractors import ArabicCardinalExtractor +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.base_duration import DurationExtractorConfiguration + + +class ArabicDurationExtractorConfiguration(DurationExtractorConfiguration): + + @property + def special_number_unit_regex(self): + return self._special_number_unit_regex + + @property + def check_both_before_after(self): + return self._check_both_before_after + + @property + def all_regex(self) -> Pattern: + return self._all_regex + + @property + def half_regex(self) -> Pattern: + return self._half_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 an_unit_regex(self) -> Pattern: + return self._an_unit_regex + + @property + def inexact_number_unit_regex(self) -> Pattern: + return self._inexact_number_unit_regex + + @property + def suffix_and_regex(self) -> Pattern: + return self._suffix_and_regex + + @property + def relative_duration_unit_regex(self) -> Pattern: + return self._relative_duration_unit_regex + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def during_regex(self) -> Pattern: + return self._during_regex + + @property + def unit_map(self) -> Pattern: + return self._unit_map + + @property + def unit_value_map(self) -> {}: + return self._unit_value_map + + @property + def duration_unit_regex(self) -> {}: + return self._duration_unit_regex + + @property + def duration_connector_regex(self) -> Pattern: + return self._duration_connector_regex + + @property + def more_than_regex(self) -> Pattern: + return self._more_than_regex + + @property + def less_than_regex(self) -> Pattern: + return self._less_than_regex + + @property + def conjunction_regex(self) -> Pattern: + return self._conjunction_regex + + @property + def inexact_number_regex(self) -> Pattern: + return self._inexact_number_regex + + def __init__(self): + super().__init__() + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + self._all_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AllRegex) + self._half_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.HalfRegex) + self._followed_unit: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DurationFollowedUnit) + self._number_combined_with_unit: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NumberCombinedWithDurationUnit) + self._an_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AnUnitRegex) + self._inexact_number_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.InexactNumberUnitRegex) + self._suffix_and_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixAndRegex) + self._relative_duration_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.RelativeDurationUnitRegex + ) + self._during_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DuringRegex + ) + self._cardinal_extractor: BaseNumberExtractor = ArabicCardinalExtractor() + self._unit_map = ArabicDateTime.UnitMap + self._unit_value_map = ArabicDateTime.UnitValueMap + self._duration_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DurationUnitRegex + ) + self._duration_connector_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DurationConnectorRegex + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.MoreThanRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.LessThanRegex + ) + self._conjunction_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ConjunctionRegex + ) + self._inexact_number_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.InexactNumberRegex + ) + self._special_number_with_unit_regex = None + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + self._special_number_unit_regex = None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/duration_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/duration_parser_config.py new file mode 100644 index 0000000000..6bf5051d6f --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/duration_parser_config.py @@ -0,0 +1,93 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.parsers import BaseNumberParser +from recognizers_number.number.arabic.extractors import ArabicCardinalExtractor +from recognizers_number.number.arabic.parsers import ArabicNumberParserConfiguration +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_duration import DurationParserConfiguration, BaseDurationExtractor +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration + + +class ArabicDurationParserConfiguration(DurationParserConfiguration): + @property + def options(self): + return self._cardinal_extractor + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def followed_unit(self) -> Pattern: + return self._followed_unit + + @property + def suffix_and_regex(self) -> Pattern: + return self._suffix_and_regex + + @property + def number_combined_with_unit(self) -> Pattern: + return self._number_combined_with_unit + + @property + def an_unit_regex(self) -> Pattern: + return self._an_unit_regex + + @property + def all_date_unit_regex(self) -> Pattern: + return self._all_date_unit_regex + + @property + def half_date_unit_regex(self) -> Pattern: + return self._half_date_unit_regex + + @property + def inexact_number_unit_regex(self) -> Pattern: + return self._inexact_number_unit_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def unit_value_map(self) -> Dict[str, int]: + return self._unit_value_map + + @property + def double_numbers(self) -> Dict[str, float]: + return self._double_numbers + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + def __init__(self, config): + self._duration_extractor = BaseDurationExtractor( + ArabicDurationExtractorConfiguration(), False) + self._cardinal_extractor: BaseNumberExtractor = ArabicCardinalExtractor() + self._number_parser: BaseNumberParser = BaseNumberParser( + ArabicNumberParserConfiguration()) + self._followed_unit: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DurationFollowedUnit) + self._suffix_and_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixAndRegex) + self._number_combined_with_unit: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NumberCombinedWithDurationUnit) + self._an_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AnUnitRegex) + self._all_date_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AllRegex) + self._half_date_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.HalfRegex) + self._inexact_number_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.InexactNumberUnitRegex) + self._unit_map: Dict[str, str] = ArabicDateTime.UnitMap + self._unit_value_map: Dict[str, int] = ArabicDateTime.UnitValueMap + self._double_numbers: Dict[str, float] = ArabicDateTime.DoubleNumbers diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/holiday_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/holiday_extractor_config.py new file mode 100644 index 0000000000..18bbac1450 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/holiday_extractor_config.py @@ -0,0 +1,22 @@ +from typing import List, Pattern +from recognizers_text.utilities import RegExpUtility + +from recognizers_date_time.date_time.base_holiday import HolidayExtractorConfiguration +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime + + +class ArabicHolidayExtractorConfiguration(HolidayExtractorConfiguration): + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def holiday_regexes(self) -> List[Pattern]: + return self._holiday_regexes + + def __init__(self): + self._year_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearRegex) + self._holiday_regexes = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.HolidayRegex) + ] diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/holiday_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/holiday_parser_config.py new file mode 100644 index 0000000000..f68eeb09d7 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/holiday_parser_config.py @@ -0,0 +1,223 @@ +from typing import List, Dict, Callable +import re +from datetime import datetime + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.date_time.utilities import DateUtils +from recognizers_date_time.date_time.base_holiday import BaseHolidayParserConfiguration +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime + + +class ArabicHolidayParserConfiguration(BaseHolidayParserConfiguration): + @property + def holiday_names(self) -> Dict[str, List[str]]: + return self._holiday_names + + @property + def holiday_regex_list(self) -> List[str]: + return self._holiday_regexes + + @property + def holiday_func_dictionary(self) -> Dict[str, Callable[[int], datetime]]: + return self._holiday_func_dictionary + + def get_swift_year(self, text: str) -> int: + trimmed_text = text.strip().lower() + swift = -10 + + if self.next_prefix_regex.search(trimmed_text): + swift = 1 + + if self.previous_prefix_regex.search(trimmed_text): + swift = -1 + + if self.this_prefix_regex.search(trimmed_text): + swift = 0 + + return swift + + def sanitize_holiday_token(self, holiday: str) -> str: + return holiday.replace(' ', '').replace('\'', '') + + def __init__(self, config): + super().__init__() + self._holiday_regexes = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.HolidayRegex) + ] + self._holiday_names = ArabicDateTime.HolidayNames + + self.next_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NextPrefixRegex) + self.previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PreviousPrefixRegex) + self.this_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ThisPrefixRegex) + + def _init_holiday_funcs(self) -> Dict[str, Callable[[int], datetime]]: + local = dict([ + ('maosbirthday', ArabicHolidayParserConfiguration.mao_birthday), + ('yuandan', ArabicHolidayParserConfiguration.new_year), + ('teachersday', ArabicHolidayParserConfiguration.teacher_day), + ('singleday', ArabicHolidayParserConfiguration.singles_day), + ('allsaintsday', ArabicHolidayParserConfiguration.halloween_day), + ('youthday', ArabicHolidayParserConfiguration.youth_day), + ('childrenday', ArabicHolidayParserConfiguration.children_day), + ('femaleday', ArabicHolidayParserConfiguration.female_day), + ('treeplantingday', ArabicHolidayParserConfiguration.tree_plant_day), + ('arborday', ArabicHolidayParserConfiguration.tree_plant_day), + ('girlsday', ArabicHolidayParserConfiguration.girls_day), + ('whiteloverday', ArabicHolidayParserConfiguration.white_lover_day), + ('loverday', ArabicHolidayParserConfiguration.valentines_day), + ('christmas', ArabicHolidayParserConfiguration.christmas_day), + ('xmas', ArabicHolidayParserConfiguration.christmas_day), + ('newyear', ArabicHolidayParserConfiguration.new_year), + ('newyearday', ArabicHolidayParserConfiguration.new_year), + ('newyearsday', ArabicHolidayParserConfiguration.new_year), + ('inaugurationday', ArabicHolidayParserConfiguration.inauguration_day), + ('groundhougday', ArabicHolidayParserConfiguration.groundhog_day), + ('valentinesday', ArabicHolidayParserConfiguration.valentines_day), + ('stpatrickday', ArabicHolidayParserConfiguration.st_patrick_day), + ('aprilfools', ArabicHolidayParserConfiguration.fool_day), + ('stgeorgeday', ArabicHolidayParserConfiguration.st_george_day), + ('mayday', ArabicHolidayParserConfiguration.may_day), + ('cincodemayoday', ArabicHolidayParserConfiguration.cinco_de_mayo_day), + ('baptisteday', ArabicHolidayParserConfiguration.baptiste_day), + ('usindependenceday', ArabicHolidayParserConfiguration.usa_independence_day), + ('independenceday', ArabicHolidayParserConfiguration.usa_independence_day), + ('bastilleday', ArabicHolidayParserConfiguration.bastille_day), + ('halloweenday', ArabicHolidayParserConfiguration.halloween_day), + ('allhallowday', ArabicHolidayParserConfiguration.all_hallow_day), + ('allsoulsday', ArabicHolidayParserConfiguration.all_souls_day), + ('guyfawkesday', ArabicHolidayParserConfiguration.guy_fawkes_day), + ('veteransday', ArabicHolidayParserConfiguration.veterans_day), + ('christmaseve', ArabicHolidayParserConfiguration.christmas_eve), + ('newyeareve', ArabicHolidayParserConfiguration.new_year_eve), + ('easterday', ArabicHolidayParserConfiguration.easter_day), + ('juneteenth', ArabicHolidayParserConfiguration.juneteenth), + ]) + + return {**super()._init_holiday_funcs(), **local} + + @staticmethod + def mao_birthday(year: int) -> datetime: + return datetime(year, 12, 26) + + @staticmethod + def new_year(year: int) -> datetime: + return datetime(year, 1, 1) + + @staticmethod + def teacher_day(year: int) -> datetime: + return datetime(year, 9, 10) + + @staticmethod + def singles_day(year: int) -> datetime: + return datetime(year, 11, 11) + + @staticmethod + def halloween_day(year: int) -> datetime: + return datetime(year, 10, 31) + + @staticmethod + def youth_day(year: int) -> datetime: + return datetime(year, 5, 4) + + @staticmethod + def children_day(year: int) -> datetime: + return datetime(year, 6, 1) + + @staticmethod + def female_day(year: int) -> datetime: + return datetime(year, 3, 8) + + @staticmethod + def tree_plant_day(year: int) -> datetime: + return datetime(year, 3, 12) + + @staticmethod + def girls_day(year: int) -> datetime: + return datetime(year, 3, 7) + + @staticmethod + def white_lover_day(year: int) -> datetime: + return datetime(year, 3, 14) + + @staticmethod + def valentines_day(year: int) -> datetime: + return datetime(year, 2, 14) + + @staticmethod + def christmas_day(year: int) -> datetime: + return datetime(year, 12, 25) + + @staticmethod + def inauguration_day(year: int) -> datetime: + return datetime(year, 1, 20) + + @staticmethod + def groundhog_day(year: int) -> datetime: + return datetime(year, 2, 2) + + @staticmethod + def st_patrick_day(year: int) -> datetime: + return datetime(year, 3, 17) + + @staticmethod + def fool_day(year: int) -> datetime: + return datetime(year, 4, 1) + + @staticmethod + def st_george_day(year: int) -> datetime: + return datetime(year, 4, 23) + + @staticmethod + def may_day(year: int) -> datetime: + return datetime(year, 5, 1) + + @staticmethod + def cinco_de_mayo_day(year: int) -> datetime: + return datetime(year, 5, 5) + + @staticmethod + def baptiste_day(year: int) -> datetime: + return datetime(year, 6, 24) + + @staticmethod + def usa_independence_day(year: int) -> datetime: + return datetime(year, 7, 4) + + @staticmethod + def bastille_day(year: int) -> datetime: + return datetime(year, 7, 14) + + @staticmethod + def all_hallow_day(year: int) -> datetime: + return datetime(year, 11, 1) + + @staticmethod + def all_souls_day(year: int) -> datetime: + return datetime(year, 11, 2) + + @staticmethod + def guy_fawkes_day(year: int) -> datetime: + return datetime(year, 11, 5) + + @staticmethod + def veterans_day(year: int) -> datetime: + return datetime(year, 11, 11) + + @staticmethod + def christmas_eve(year: int) -> datetime: + return datetime(year, 12, 24) + + @staticmethod + def new_year_eve(year: int) -> datetime: + return datetime(year, 12, 31) + + @staticmethod + def easter_day(year: int) -> datetime: + return DateUtils.min_value + + @staticmethod + def juneteenth(year: int) -> datetime: + return datetime(year, 6, 19) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/merged_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/merged_extractor_config.py new file mode 100644 index 0000000000..25e05219ba --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/merged_extractor_config.py @@ -0,0 +1,220 @@ +from typing import List, Pattern + +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_number import ArabicIntegerExtractor +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_merged import MergedExtractorConfiguration +from recognizers_date_time.date_time.base_date import BaseDateExtractor +from recognizers_date_time.date_time.base_time import BaseTimeExtractor +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.base_dateperiod import BaseDatePeriodExtractor +from recognizers_date_time.date_time.base_timeperiod import BaseTimePeriodExtractor +from recognizers_date_time.date_time.base_datetime import BaseDateTimeExtractor +from recognizers_date_time.date_time.base_datetimeperiod import BaseDateTimePeriodExtractor +from recognizers_date_time.date_time.base_set import BaseSetExtractor +from recognizers_date_time.date_time.base_holiday import BaseHolidayExtractor +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration +from recognizers_date_time.date_time.arabic.dateperiod_extractor_config import ArabicDatePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.timeperiod_extractor_config import ArabicTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetime_extractor_config import ArabicDateTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetimeperiod_extractor_config import ArabicDateTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.set_extractor_config import ArabicSetExtractorConfiguration +from recognizers_date_time.date_time.arabic.holiday_extractor_config import ArabicHolidayExtractorConfiguration +from recognizers_date_time.resources.base_date_time import BaseDateTime + + +class ArabicMergedExtractorConfiguration(MergedExtractorConfiguration): + @property + def check_both_before_after(self): + return self._check_both_before_after + + @property + def time_zone_extractor(self): + return self._time_zone_extractor + + @property + def datetime_alt_extractor(self): + return self._datetime_alt_extractor + + @property + def term_filter_regexes(self) -> List[Pattern]: + return self._term_filter_regexes + + @property + def fail_fast_regex(self) -> Pattern: + return self._fail_fast_regex + + @property + def superfluous_word_matcher(self) -> Pattern: + return self._superfluous_word_matcher + + @property + def unspecified_date_period_regex(self) -> Pattern: + return self._unspecified_date_period_regex + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def holiday_extractor(self) -> DateTimeExtractor: + return self._holiday_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def set_extractor(self) -> DateTimeExtractor: + return self._set_extractor + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def since_regex(self) -> Pattern: + return self._since_regex + + @property + def around_regex(self) -> Pattern: + return self._around_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def suffix_after_regex(self) -> Pattern: + return self._suffix_after_regex + + @property + def from_to_regex(self) -> Pattern: + return self._from_to_regex + + @property + def single_ambiguous_month_regex(self) -> Pattern: + return self._single_ambiguous_month_regex + + @property + def preposition_suffix_regex(self) -> Pattern: + return self._preposition_suffix_regex + + @property + def number_ending_pattern(self) -> Pattern: + return self._number_ending_pattern + + @property + def filter_word_regex_list(self) -> List[Pattern]: + return self._filter_word_regex_list + + @property + def ambiguous_range_modifier_prefix(self) -> Pattern: + return None + + @property + def ambiguity_filters_dict(self) -> Pattern: + return self._ambiguity_filters_dict + + @property + def potential_ambiguous_range_regex(self) -> Pattern: + return self._potential_ambiguous_range_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + def __init__(self): + self._before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AfterRegex) + self._since_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SinceRegex) + self._from_to_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FromToRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.YearRegex) + self._single_ambiguous_month_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SingleAmbiguousMonthRegex) + self._preposition_suffix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PrepositionSuffixRegex) + self._ambiguous_range_modifier_prefix = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AmbiguousRangeModifierPrefix) + self._number_ending_pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NumberEndingPattern) + + self._date_extractor = BaseDateExtractor( + ArabicDateExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor( + ArabicTimeExtractorConfiguration()) + self._date_time_extractor = BaseDateTimeExtractor( + ArabicDateTimeExtractorConfiguration()) + self._date_period_extractor = BaseDatePeriodExtractor( + ArabicDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + ArabicTimePeriodExtractorConfiguration()) + self._date_time_period_extractor = BaseDateTimePeriodExtractor( + ArabicDateTimePeriodExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor( + ArabicDurationExtractorConfiguration()) + self._set_extractor = BaseSetExtractor( + ArabicSetExtractorConfiguration()) + self._holiday_extractor = BaseHolidayExtractor( + ArabicHolidayExtractorConfiguration()) + self._integer_extractor = ArabicIntegerExtractor() + self._filter_word_regex_list = [] + self._unspecified_date_period_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.UnspecificDatePeriodRegex + ) + self._around_regex = ArabicDateTime.AroundRegex + self._equal_regex = BaseDateTime.EqualRegex + self._suffix_after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixAfterRegex + ) + self._potential_ambiguous_range_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.FromToRegex + ) + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + self._term_filter_regexes = [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.OneOnOneRegex), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.SingleAmbiguousTermsRegex), + ] + # TODO When the implementation for these properties is added, change the None values to their respective Regexps + self._superfluous_word_matcher = None + self._fail_fast_regex = None + self._datetime_alt_extractor = None + self._time_zone_extractor = None + self._ambiguity_filters_dict = DefinitionLoader.load_ambiguity_filters(ArabicDateTime.AmbiguityFiltersDict) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/merged_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/merged_parser_config.py new file mode 100644 index 0000000000..7cb92e8ef6 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/merged_parser_config.py @@ -0,0 +1,107 @@ +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility + +from recognizers_date_time.date_time.arabic.holiday_parser_config import ArabicHolidayParserConfiguration +from recognizers_date_time.date_time.arabic.set_parser_config import ArabicSetParserConfiguration +from recognizers_date_time.date_time.arabic.dateperiod_parser_config import ArabicDatePeriodParserConfiguration +from recognizers_date_time.date_time.arabic.timeperiod_parser_config import ArabicTimePeriodParserConfiguration +from recognizers_date_time.date_time.arabic.common_configs import ArabicCommonDateTimeParserConfiguration +from recognizers_date_time.date_time.base_date import BaseDateParser +from recognizers_date_time.date_time.base_time import BaseTimeParser +from recognizers_date_time.date_time.base_datetime import BaseDateTimeParser +from recognizers_date_time.date_time.base_holiday import BaseHolidayParser +from recognizers_date_time.date_time.base_dateperiod import BaseDatePeriodParser +from recognizers_date_time.date_time.base_timeperiod import BaseTimePeriodParser +from recognizers_date_time.date_time.base_datetimeperiod import BaseDateTimePeriodParser +from recognizers_date_time.date_time.base_duration import BaseDurationParser +from recognizers_date_time.date_time.base_set import BaseSetParser +from recognizers_date_time.date_time.base_merged import MergedParserConfiguration +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime, BaseDateTime + + +class ArabicMergedParserConfiguration(ArabicCommonDateTimeParserConfiguration, MergedParserConfiguration): + @property + def around_regex(self) -> Pattern: + return self._around_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def suffix_after(self) -> Pattern: + return self._suffix_after + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def since_regex(self) -> Pattern: + return self._since_regex + + @property + def date_parser(self) -> BaseDateParser: + return self._date_parser + + @property + def holiday_parser(self) -> BaseHolidayParser: + return self._holiday_parser + + @property + def time_parser(self) -> BaseTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> BaseDateTimeParser: + return self._date_time_parser + + @property + def date_period_parser(self) -> BaseDatePeriodParser: + return self._date_period_parser + + @property + def time_period_parser(self) -> BaseTimePeriodParser: + return self._time_period_parser + + @property + def date_time_period_parser(self) -> BaseDateTimePeriodParser: + return self._date_time_period_parser + + @property + def duration_parser(self) -> BaseDurationParser: + return self._duration_parser + + @property + def set_parser(self) -> BaseSetParser: + return self._set_parser + + def __init__(self, config): + ArabicCommonDateTimeParserConfiguration.__init__(self) + self._suffix_after = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SuffixAfterRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearRegex) + self._equal_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.EqualRegex) + self._around_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AroundRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AfterRegex) + self._since_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SinceRegex) + + self._date_period_parser = BaseDatePeriodParser( + ArabicDatePeriodParserConfiguration(self)) + self._time_period_parser = BaseTimePeriodParser( + ArabicTimePeriodParserConfiguration(self)) + self._set_parser = BaseSetParser(ArabicSetParserConfiguration(self)) + self._holiday_parser = BaseHolidayParser(ArabicHolidayParserConfiguration(self)) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/parsers.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/parsers.py new file mode 100644 index 0000000000..2640006879 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/parsers.py @@ -0,0 +1,34 @@ +from datetime import datetime + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.base_time import BaseTimeParser +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, DateTimeFormatUtil, DateUtils + + +class ArabicTimeParser(BaseTimeParser): + def internal_parser(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = super().internal_parser(source, reference) + if not result.success: + result = self.parse_ish(source, reference) + + return result + + def parse_ish(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + trimmed_source = source.strip().lower() + + match = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.IshRegex).match(source) + if match and match.end() == len(trimmed_source): + hour_str = RegExpUtility.get_group(match, 'hour') + hour = 12 + if hour_str: + hour = int(hour_str) + + result.timex = 'T' + DateTimeFormatUtil.to_str(hour, 2) + result.future_value = result.past_value = DateUtils.safe_create_from_min_value( + reference.year, reference.month, reference.day, hour, 0, 0) + result.success = True + + return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/set_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/set_extractor_config.py new file mode 100644 index 0000000000..65f3e539b2 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/set_extractor_config.py @@ -0,0 +1,120 @@ +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_set import SetExtractorConfiguration +from recognizers_date_time.date_time.base_date import BaseDateExtractor +from recognizers_date_time.date_time.base_time import BaseTimeExtractor +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.base_dateperiod import BaseDatePeriodExtractor +from recognizers_date_time.date_time.base_timeperiod import BaseTimePeriodExtractor +from recognizers_date_time.date_time.base_datetime import BaseDateTimeExtractor +from recognizers_date_time.date_time.base_datetimeperiod import BaseDateTimePeriodExtractor +from recognizers_date_time.date_time.arabic.date_extractor_config import ArabicDateExtractorConfiguration +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration +from recognizers_date_time.date_time.arabic.dateperiod_extractor_config import ArabicDatePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.timeperiod_extractor_config import ArabicTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetime_extractor_config import ArabicDateTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.datetimeperiod_extractor_config import ArabicDateTimePeriodExtractorConfiguration + + +class ArabicSetExtractorConfiguration(SetExtractorConfiguration): + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def each_prefix_regex(self) -> Pattern: + return self._each_prefix_regex + + @property + def periodic_regex(self) -> Pattern: + return self._periodic_regex + + @property + def each_unit_regex(self) -> Pattern: + return self._each_unit_regex + + @property + def each_day_regex(self) -> Pattern: + return self._each_day_regex + + @property + def before_each_day_regex(self) -> Pattern: + return self._before_each_day_regex + + @property + def set_week_day_regex(self) -> Pattern: + return self._set_week_day_regex + + @property + def set_each_regex(self) -> Pattern: + return self._set_each_regex + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def duration_unit_regex(self) -> Pattern: + return self._duration_unit_regex + + def __init__(self, dmyDateFormat=True): + self._duration_extractor = BaseDurationExtractor( + ArabicDurationExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor( + ArabicTimeExtractorConfiguration()) + self._date_extractor = BaseDateExtractor( + ArabicDateExtractorConfiguration()) + self._date_time_extractor = BaseDateTimeExtractor( + ArabicDateTimeExtractorConfiguration(dmyDateFormat)) + self._date_period_extractor = BaseDatePeriodExtractor( + ArabicDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + ArabicTimePeriodExtractorConfiguration()) + self._date_time_period_extractor = BaseDateTimePeriodExtractor( + ArabicDateTimePeriodExtractorConfiguration(dmyDateFormat)) + self._last_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SetLastRegex) + self._each_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EachPrefixRegex) + self._periodic_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodicRegex) + self._each_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EachUnitRegex) + self._each_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EachDayRegex) + self._set_week_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SetWeekDayRegex) + self._set_each_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SetEachRegex) + self._duration_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.DurationUnitRegex + ) + self._before_each_day_regex = None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/set_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/set_parser_config.py new file mode 100644 index 0000000000..36f6c6a9fc --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/set_parser_config.py @@ -0,0 +1,153 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_set import SetParserConfiguration, MatchedTimex +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration + + +class ArabicSetParserConfiguration(SetParserConfiguration): + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def date_period_parser(self) -> DateTimeParser: + return self._date_period_parser + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def date_time_period_parser(self) -> DateTimeParser: + return self._date_time_period_parser + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def each_prefix_regex(self) -> Pattern: + return self._each_prefix_regex + + @property + def periodic_regex(self) -> Pattern: + return self._periodic_regex + + @property + def each_unit_regex(self) -> Pattern: + return self._each_unit_regex + + @property + def each_day_regex(self) -> Pattern: + return self._each_day_regex + + @property + def set_week_day_regex(self) -> Pattern: + return self._set_week_day_regex + + @property + def set_each_regex(self) -> Pattern: + return self._set_each_regex + + def __init__(self, config: BaseDateParserConfiguration): + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + self._time_extractor = config.time_extractor + self._time_parser = config.time_parser + self._date_extractor = config.date_extractor + self._date_parser = config.date_parser + self._date_time_extractor = config.date_time_extractor + self._date_time_parser = config.date_time_parser + self._date_period_extractor = config.date_period_extractor + self._date_period_parser = config.date_period_parser + self._time_period_extractor = config.time_period_extractor + self._time_period_parser = config.time_period_parser + self._date_time_period_extractor = config.date_time_period_extractor + self._date_time_period_parser = config.date_time_period_parser + self._unit_map = ArabicDateTime.UnitMap + self._each_prefix_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EachPrefixRegex) + self._periodic_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PeriodicRegex) + self._each_unit_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EachUnitRegex) + self._each_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.EachDayRegex) + self._set_week_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SetWeekDayRegex) + self._set_each_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SetEachRegex) + + self._day_type_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.DayTypeRegex) + self._week_type_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekTypeRegex) + self._month_type_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MonthTypeRegex) + self._quarter_type_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.QuarterTypeRegex) + self._year_type_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.YearTypeRegex) + self._weekend_type_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WeekendTypeRegex) + + def get_matched_daily_timex(self, text: str) -> MatchedTimex: + trimmed_source = text.strip().lower() + + if self._day_type_regex.search(trimmed_source): + timex = 'P1D' + elif self._week_type_regex.search(trimmed_source): + timex = 'P1W' + elif self._month_type_regex.search(trimmed_source): + timex = 'P1M' + elif self._year_type_regex.search(trimmed_source): + timex = 'P1Y' + elif self._quarter_type_regex.search(trimmed_source): + timex = 'P3M' + elif self._weekend_type_regex.search(trimmed_source): + timex = 'XXXX-WXX-WE' + else: + return MatchedTimex(False, None) + + return MatchedTimex(True, timex) + + def get_matched_unit_timex(self, text: str) -> MatchedTimex: + return self.get_matched_daily_timex(text) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/time_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/time_extractor_config.py new file mode 100644 index 0000000000..a36395684a --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/time_extractor_config.py @@ -0,0 +1,161 @@ +from typing import List, Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.base_time import TimeExtractorConfiguration +from recognizers_date_time.date_time.utilities import DateTimeOptions +from recognizers_date_time.date_time.base_timezone import BaseTimeZoneExtractor +from recognizers_date_time.date_time.arabic.timezone_extractor_config import ArabicTimeZoneExtractorConfiguration +from recognizers_date_time.date_time.base_duration import BaseDurationExtractor +from recognizers_date_time.date_time.arabic.duration_extractor_config import ArabicDurationExtractorConfiguration + + +class ArabicTimeExtractorConfiguration(TimeExtractorConfiguration): + + @property + def desc_regex(self) -> Pattern: + return self._desc_regex + + @property + def hour_num_regex(self) -> Pattern: + return self._hour_num_regex + + @property + def minute_num_regex(self) -> Pattern: + return self._minute_num_regex + + @property + def oclock_regex(self) -> Pattern: + return self._oclock_regex + + @property + def pm_regex(self) -> Pattern: + return self._pm_regex + + @property + def am_regex(self) -> Pattern: + return self._am_regex + + @property + def less_than_one_hour_regex(self) -> Pattern: + return self._less_than_one_hour + + @property + def written_time_regex(self) -> Pattern: + return self._written_time_regex + + @property + def time_prefix_regex(self) -> Pattern: + return self._time_prefix_regex + + @property + def time_suffix_regex(self) -> Pattern: + return self._time_suffix_regex + + @property + def basic_time_regex(self) -> Pattern: + return self._basic_time_regex + + @property + def midnight_regex(self) -> Pattern: + return self._midnight_regex + + @property + def midmorning_regex(self) -> Pattern: + return self._midmorning_regex + + @property + def midafternoon_regex(self) -> Pattern: + return self._midafternoon_regex + + @property + def midday_regex(self) -> Pattern: + return self._midday_regex + + @property + def midtime_regex(self) -> Pattern: + return self._midtime_regex + + @property + def at_regex(self) -> Pattern: + return self._at_regex + + @property + def ish_regex(self) -> Pattern: + return self._ish_regex + + @property + def time_unit_regex(self) -> Pattern: + return self._time_unit_regex + + @property + def connect_num_regex(self): + return self._connect_num_regex + + @property + def time_before_after_regex(self) -> Pattern: + return self._time_before_after_regex + + @property + def time_regex_list(self) -> List[Pattern]: + return self._time_regex_list + + @property + def duration_extractor(self): + return self._duration_extractor + + @property + def time_zone_extractor(self): + return self._time_zone_extractor + + def __init__(self): + super().__init__() + + self._time_regex_list: List[Pattern] = ArabicTimeExtractorConfiguration.get_time_regex_list( + ) + self._at_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.AtRegex) + self._ish_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.IshRegex) + self._time_before_after_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeBeforeAfterRegex) + + self._options = DateTimeOptions.NONE + self._time_zone_extractor = BaseTimeZoneExtractor(ArabicTimeZoneExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor(ArabicDurationExtractorConfiguration()) + + self._desc_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.DescRegex) + self._hour_num_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.HourNumRegex) + self._minute_num_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MinuteNumRegex) + self._oclock_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.OclockRegex) + self._pm_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PmRegex) + self._am_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AmRegex) + self._less_than_one_hour = RegExpUtility.get_safe_reg_exp(ArabicDateTime.LessThanOneHour) + self._written_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.WrittenTimeRegex) + self._time_prefix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimePrefix) + self._time_suffix_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeSuffix) + self._basic_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.BasicTime) + + self._midnight_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MidnightRegex) + self._midmorning_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MidmorningRegex) + self._midafternoon_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MidafternoonRegex) + self._midday_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MiddayRegex) + self._midtime_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MidTimeRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeUnitRegex) + self._connect_num_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.ConnectNumRegex) + + @staticmethod + def get_time_regex_list() -> List[Pattern]: + return [ + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex1), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex2), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex3), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex4), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex5), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex6), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex7), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex9), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex10), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeRegex11), + RegExpUtility.get_safe_reg_exp(ArabicDateTime.ConnectNumRegex) + ] diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/time_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/time_parser_config.py new file mode 100644 index 0000000000..ba644c0080 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/time_parser_config.py @@ -0,0 +1,183 @@ +from typing import List, Pattern, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.base_time import TimeParserConfiguration, AdjustParams +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.constants import Constants + + +class ArabicTimeParserConfiguration(TimeParserConfiguration): + + @property + def time_suffix_full(self) -> Pattern: + return self._time_suffix_full + + @property + def lunch_regex(self) -> Pattern: + return self._lunch_regex + + @property + def night_regex(self) -> Pattern: + return self._night_regex + + @property + def half_token_regex(self) -> Pattern: + return self._half_token_regex + + @property + def quarter_token_regex(self) -> Pattern: + return self._quarter_token_regex + + @property + def three_quarter_token_regex(self) -> Pattern: + return self._three_quarter_token_regex + + @property + def to_token_regex(self) -> Pattern: + return self._to_token_regex + + @property + def to_half_token_regex(self) -> Pattern: + return self._to_half_token_regex + + @property + def for_half_token_regex(self) -> Pattern: + return self._for_half_token_regex + + @property + def time_token_prefix(self) -> str: + return self._time_token_prefix + + @property + def at_regex(self) -> Pattern: + return self._at_regex + + @property + def meal_time_regex(self) -> Pattern: + return self._meal_time_regex + + @property + def time_regexes(self) -> List[Pattern]: + return self._time_regexes + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def __init__(self, config: BaseDateParserConfiguration): + + self._time_token_prefix = ArabicDateTime.TimeTokenPrefix + self._at_regex: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AtRegex) + self._time_regexes = ArabicTimeExtractorConfiguration.get_time_regex_list() + self.less_than_one_hour = RegExpUtility.get_safe_reg_exp(ArabicDateTime.LessThanOneHour) + self.time_suffix = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeSuffix) + self.time_suffix_full_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeSuffixFull) + + self._half_token_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.HalfTokenRegex) + self._quarter_token_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.QuarterTokenRegex) + self._three_quarter_token_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.ThreeQuarterTokenRegex) + + self._night_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.NightRegex) + self._lunch_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.LunchRegex) + self._to_token_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.ToTokenRegex) + self._to_half_token_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.ToHalfTokenRegex) + self._for_half_token_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.ForHalfTokenRegex) + self._meal_time_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.MealTimeRegex) + self._time_suffix_full = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeSuffixFull) + + self._utility_configuration = config.utility_configuration + self._numbers: Dict[str, int] = config.numbers + self._time_zone_parser = config.time_zone_parser + + def adjust_by_prefix(self, prefix: str, adjust: AdjustParams): + delta_min = 0 + trimmed_prefix = prefix.strip().lower() + + if regex.search(self.half_token_regex, trimmed_prefix): + delta_min = 30 + elif regex.search(self.quarter_token_regex, trimmed_prefix): + delta_min = 15 + elif regex.search(self.three_quarter_token_regex, trimmed_prefix): + delta_min = 45 + else: + match = regex.search(self.less_than_one_hour, trimmed_prefix) + if match: + min_str = RegExpUtility.get_group(match, 'deltamin') + if min_str: + delta_min = int(min_str) + else: + min_str = RegExpUtility.get_group( + match, 'deltaminnum').lower() + delta_min = self.numbers.get(min_str) + + if regex.search(self.to_half_token_regex, trimmed_prefix): + delta_min = delta_min - 30 + elif regex.search(self.for_half_token_regex, trimmed_prefix): + delta_min = -delta_min - 30 + elif regex.search(self.to_token_regex, trimmed_prefix): + delta_min = delta_min * -1 + + adjust.minute += delta_min + + if adjust.minute < 0: + adjust.minute += 60 + adjust.hour -= 1 + + adjust.has_minute = True + + def adjust_by_suffix(self, suffix: str, adjust: AdjustParams): + suffix = suffix.strip().lower() + delta_hour = 0 + match = regex.search(self.time_suffix_full_regex, suffix) + if match is not None and match.start() == 0 and match.group() == suffix: + oclock_str = RegExpUtility.get_group(match, 'oclock') + if not oclock_str: + am_str = RegExpUtility.get_group(match, Constants.AM_GROUP_NAME) + if am_str: + if adjust.hour >= Constants.HALF_DAY_HOUR_COUNT: + delta_hour -= Constants.HALF_DAY_HOUR_COUNT + else: + adjust.has_am = True + pm_str = RegExpUtility.get_group(match, Constants.PM_GROUP_NAME) + + if pm_str: + if adjust.hour < Constants.HALF_DAY_HOUR_COUNT: + delta_hour = Constants.HALF_DAY_HOUR_COUNT + if regex.search(self.lunch_regex, pm_str): + if adjust.hour >= 10 and adjust.hour <= Constants.HALF_DAY_HOUR_COUNT: + delta_hour = 0 + if (adjust.hour == Constants.HALF_DAY_HOUR_COUNT): + adjust.has_pm = True + else: + adjust.has_am = True + else: + adjust.has_pm = True + + elif regex.search(self.night_regex, pm_str): + if adjust.hour <= 3 or adjust.hour == Constants.HALF_DAY_HOUR_COUNT: + if adjust.hour == Constants.HALF_DAY_HOUR_COUNT: + adjust.hour = 0 + delta_hour = 0 + adjust.has_am = True + else: + adjust.has_pm = True + else: + adjust.has_pm = True + + adjust.hour = (adjust.hour + delta_hour) % 24 diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timeperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timeperiod_extractor_config.py new file mode 100644 index 0000000000..7be5b2f223 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timeperiod_extractor_config.py @@ -0,0 +1,187 @@ +from typing import List, Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_text.extractor import Extractor +from recognizers_number.number.arabic.extractors import ArabicIntegerExtractor +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.base_timeperiod import TimePeriodExtractorConfiguration, MatchedIndex +from recognizers_date_time.date_time.base_time import BaseTimeExtractor +from recognizers_date_time.date_time.arabic.time_extractor_config import ArabicTimeExtractorConfiguration +from recognizers_date_time.date_time.arabic.base_configs import ArabicDateTimeUtilityConfiguration + + +class ArabicTimePeriodExtractorConfiguration(TimePeriodExtractorConfiguration): + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def hour_regex(self) -> Pattern: + return self._hour_regex + + @property + def period_hour_num_regex(self) -> Pattern: + return self._period_hour_num_regex + + @property + def period_desc_regex(self) -> Pattern: + return self._period_desc_regex + + @property + def pm_regex(self) -> Pattern: + return self._pm_regex + + @property + def am_regex(self) -> Pattern: + return self._am_regex + + @property + def pure_num_from_to(self) -> Pattern: + return self._pure_num_from_to + + @property + def pure_num_between_and(self): + return self._pure_num_between_and + + @property + def specific_time_from_to(self): + return self._specific_time_from_to_regex + + @property + def specific_time_between_and(self): + return self._specific_time_between_and_regex + + @property + def preposition_regex(self): + return self._preposition_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def specific_time_of_day_regex(self): + return self._specific_time_of_day_regex + + @property + def time_unit_regex(self): + return self._time_unit_regex + + @property + def time_follow_unit(self) -> Pattern: + return self._time_followed_unit + + @property + def time_number_combined_with_unit(self) -> Pattern: + return self._time_number_combined_with_unit + + @property + def general_ending_regex(self) -> Pattern: + return self._general_ending_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def utility_configuration(self): + return self._utility_configuration + + @property + def single_time_extractor(self) -> DateTimeExtractor: + return self._single_time_extractor + + @property + def time_zone_extractor(self) -> DateTimeExtractor: + return self._time_zone_extractor + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def simple_cases_regex(self) -> List[Pattern]: + return self._simple_cases_regex + + @property + def pure_number_regex(self) -> List[Pattern]: + return self._pure_number_regex + + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def from_regex(self) -> Pattern: + return self._from_regex + + @property + def between_token_regex(self) -> Pattern: + return self._between_token_regex + + @property + def range_connector_regex(self) -> Pattern: + return self._range_connector_regex + + def __init__(self): + super().__init__() + + self._token_before_date = ArabicDateTime.TokenBeforeDate + self._single_time_extractor = BaseTimeExtractor(ArabicTimeExtractorConfiguration()) + self._utility_configuration = ArabicDateTimeUtilityConfiguration() + + self._integer_extractor = ArabicIntegerExtractor() + self._check_both_before_after = ArabicDateTime.CheckBothBeforeAfter + + self._till_regex: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TillRegex) + self._time_of_day_regex: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeOfDayRegex) + self._general_ending_regex: Pattern = RegExpUtility.get_safe_reg_exp( ArabicDateTime.GeneralEndingRegex) + self._hour_regex: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.HourRegex) + self._period_desc_regex: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.DescRegex) + self._period_hour_num_regex: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PeriodHourNumRegex) + self._specific_time_of_day_regex: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificTimeOfDayRegex) + self._time_followed_unit: Pattern = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeFollowedUnit) + self._time_number_combined_with_unit: Pattern = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeNumberCombinedWithUnit) + + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.TimeUnitRegex) + self._specific_time_from_to_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.SpecificTimeFromTo) + self._specific_time_between_and_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.SpecificTimeBetweenAnd) + self._preposition_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PrepositionRegex) + + self._time_zone_extractor = None + self._pure_num_between_and = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PureNumBetweenAnd) + self._pure_num_from_to = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PureNumFromTo) + self._am_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.AmRegex) + self._pm_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.PmRegex) + + self._simple_cases_regex: List[Pattern] = [ + self.pure_num_from_to, + self.pure_num_between_and, + self.specific_time_from_to, + self.specific_time_between_and + ] + self._pure_number_regex = [self.pure_num_from_to, self.pure_num_between_and] + + self._from_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.FromRegex) + self._between_token_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.BetweenTokenRegex) + self._range_connector_regex = RegExpUtility.get_safe_reg_exp(ArabicDateTime.RangeConnectorRegex) + + 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.between_token_regex.search(source) + if match: + return MatchedIndex(True, match.start()) + + return MatchedIndex(False, -1) + + def is_connector_token(self, source: str): + return self.range_connector_regex.match(source) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timeperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timeperiod_parser_config.py new file mode 100644 index 0000000000..f7a76196cd --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timeperiod_parser_config.py @@ -0,0 +1,135 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_text.extractor import Extractor +from recognizers_date_time.resources.arabic_date_time import ArabicDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from recognizers_date_time.date_time.base_timeperiod import TimePeriodParserConfiguration, MatchedTimeRegex +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.utilities import TimexUtil + + +class ArabicTimePeriodParserConfiguration(TimePeriodParserConfiguration): + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + @property + def specific_time_from_to_regex(self) -> Pattern: + return self._specific_time_from_to_regex + + @property + def specific_time_between_and_regex(self) -> Pattern: + return self._specific_time_between_and_regex + + @property + def pure_number_from_to_regex(self) -> Pattern: + return self._pure_number_from_to_regex + + @property + def pure_number_between_and_regex(self) -> Pattern: + return self._pure_number_between_and_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def general_ending_regex(self): + return self._general_ending_regex + + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self, config: BaseDateParserConfiguration): + self._general_ending_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.GeneralEndingRegex) + self._time_extractor = config.time_extractor + self._time_parser = config.time_parser + self._integer_extractor = config.integer_extractor + self._numbers = config.numbers + self._utility_configuration = config.utility_configuration + self._pure_number_from_to_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PureNumFromTo) + self._pure_number_between_and_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.PureNumBetweenAnd) + self._specific_time_from_to_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificTimeFromTo) + self._specific_time_between_and_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.SpecificTimeBetweenAnd) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TimeOfDayRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp( + ArabicDateTime.TillRegex) + self._time_zone_parser = config.time_zone_parser + + def get_matched_timex_range(self, source: str) -> MatchedTimeRegex: + trimmed_text = source.strip().lower() + if trimmed_text.endswith('s'): + trimmed_text = trimmed_text[:-1] + + if any(trimmed_text.endswith(o) for o in ArabicDateTime.MorningTermList): + time_of_day = Constants.MORNING + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.AfternoonTermList): + time_of_day = Constants.AFTERNOON + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.EveningTermList): + time_of_day = Constants.EVENING + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.DaytimeTermList): + time_of_day = Constants.DAYTIME + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.NightTermList): + time_of_day = Constants.NIGHT + elif all(trimmed_text.endswith(o) for o in ArabicDateTime.BusinessHourSplitStrings): + time_of_day = Constants.BUSINESS_HOUR + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.MealtimeBreakfastTermList): + time_of_day = Constants.MEALTIME_BREAKFAST + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.MealtimeBrunchTermList): + time_of_day = Constants.MEALTIME_BRUNCH + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.MealtimeLunchTermList): + time_of_day = Constants.MEALTIME_LUNCH + elif any(trimmed_text.endswith(o) for o in ArabicDateTime.MealtimeDinnerTermList): + time_of_day = Constants.MEALTIME_DINNER + else: + return MatchedTimeRegex( + matched=False, + timex='', + begin_hour=0, + end_hour=0, + end_min=0 + ) + + parse_result = TimexUtil.parse_time_of_day(time_of_day) + timex = parse_result.timex + begin_hour = parse_result.begin_hour + end_hour = parse_result.end_hour + end_min = parse_result.end_min + + return MatchedTimeRegex( + matched=True, + timex=timex, + begin_hour=begin_hour, + end_hour=end_hour, + end_min=end_min + ) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timezone_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timezone_extractor_config.py new file mode 100644 index 0000000000..4e1a8e925b --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/arabic/timezone_extractor_config.py @@ -0,0 +1,25 @@ +from typing import List, Pattern +from recognizers_text.matcher.string_matcher import StringMatcher +from ..base_timezone import TimeZoneExtractorConfiguration + + +class ArabicTimeZoneExtractorConfiguration(TimeZoneExtractorConfiguration): + @property + def timezone_matcher(self): + return self._timezone_matcher + + @property + def direct_utc_regex(self) -> Pattern: + return self._direct_utc_regex + + @property + def location_time_suffix_regex(self) -> Pattern: + return self._location_time_suffix_regex + + @property + def location_matcher(self) -> StringMatcher: + return self._location_matcher + + @property + def ambiguous_timezone_list(self) -> List[str]: + return self._ambiguous_timezone_list diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_date.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_date.py index 443854c2d1..0ff6180230 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_date.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_date.py @@ -5,6 +5,7 @@ from typing import List, Optional, Pattern, Dict, Match from datetime import datetime, timedelta +from dateutil.relativedelta import relativedelta from recognizers_date_time.date_time.abstract_year_extractor import AbstractYearExtractor from datedelta import datedelta from recognizers_text.extractor import ExtractResult @@ -234,6 +235,8 @@ def extract(self, source: str, reference: datetime = None) -> List[ExtractResult tokens.extend(self.basic_regex_match(source)) tokens.extend(self.implicit_date(source)) tokens.extend(self.number_with_month(source, reference)) + + # TODO: Disable for Catalan tokens.extend(self.relative_duration_date(source, reference)) result = merge_all_tokens(tokens, source, self.extractor_type_name) @@ -506,9 +509,9 @@ def number_with_month(self, source: str, reference: datetime) -> []: end_index = (start_index + result_length) + len(match.group()) start_index, end_index = self.extend_with_week_day_and_year(start_index, end_index, - self.config.month_of_year[RegExpUtility.get_group( - match, Constants.MONTH_GROUP_NAME).lower() or str( - reference.month)], num, source, reference) + self.config.month_of_year[RegExpUtility.get_group( + match, Constants.MONTH_GROUP_NAME).lower() or str( + reference.month)], num, source, reference) ret.append(Token(start_index, end_index)) return ret @@ -517,7 +520,7 @@ def get_year_index(self, affix, year, in_prefix): index = 0 match_year = self.config.year_suffix.match(affix) - success = not (match_year and match_year.start()) if not in_prefix else match_year and match_year.start() \ + success = not (match_year and match_year.start()) if not in_prefix else match_year and match_year.start() \ + match_year.end() == len(affix.strip()) if success: @@ -608,7 +611,9 @@ def extract_relative_duration_date_with_in_prefix(self, source: str, duration_er def relative_duration_date(self, source: str, reference: datetime) -> []: from .utilities import AgoLaterUtil tokens = [] - duration_extracted_results = self.config.duration_extractor.extract(source, reference) + duration_extracted_results = [] + if self.config.duration_extractor: + duration_extracted_results = self.config.duration_extractor.extract(source, reference) for extracted_result in duration_extracted_results: @@ -1243,10 +1248,9 @@ def parse_implicit_date(self, source: str, reference: datetime) -> DateTimeParse pivot_date = DateUtils.safe_create_from_min_value(year, month, day) else: # Add 1 month is enough, since 1, 3, 5, 7, 8, 10, 12 months has 31 days - pivot_date = datetime(year, month, day) + datedelta(months=1) - pivot_date = DateUtils.safe_create_from_min_value(pivot_date.year, pivot_date.month, pivot_date.day) + pivot_date = DateUtils.safe_create_from_min_value(year, month + 1, day) - num_week_day_int = pivot_date.isoweekday() + num_week_day_int = pivot_date.isoweekday() % 7 extracted_week_day_str = match.group(Constants.WEEKDAY_GROUP_NAME) week_day = self.config.day_of_week.get(extracted_week_day_str) @@ -1260,10 +1264,10 @@ def parse_implicit_date(self, source: str, reference: datetime) -> DateTimeParse future_date = pivot_date past_date = pivot_date - while future_date.isoweekday() != week_day or future_date.day != day or future_date < reference: + while future_date.isoweekday() % 7 != week_day or future_date.day != day or future_date < reference: # Increase the futureDate month by month to find the expected date (the "day" is the weekday) and # make sure the futureDate not less than the referenceDate. - future_date += datedelta(months=1) + future_date += relativedelta(months=1) tmp_days_in_month = calendar.monthrange(future_date.year, future_date.month)[1] if tmp_days_in_month >= day: # For months like January 31, after add 1 month, February 31 won't be returned, so the day should be revised ASAP. @@ -1271,11 +1275,11 @@ def parse_implicit_date(self, source: str, reference: datetime) -> DateTimeParse result.future_value = future_date - while past_date.isoweekday() != week_day or past_date.day != day or past_date > reference: + while past_date.isoweekday() % 7 != week_day or past_date.day != day or past_date > reference: # Decrease the pastDate month by month to find the expected date (the "day" is the weekday) and # make sure the pastDate not larger than the referenceDate. - past_date += datedelta(months=-1) - tmp_days_in_month = calendar.monthrange(past_date.year, future_date.month)[1] + past_date -= relativedelta(months=1) + tmp_days_in_month = calendar.monthrange(past_date.year, past_date.month)[1] if tmp_days_in_month >= day: # For months like March 31, after minus 1 month, February 31 won't be returned, so the day should be revised ASAP. past_date = DateUtils.safe_create_from_value(DateUtils.min_value, past_date.year, past_date.month, day) @@ -1382,7 +1386,7 @@ def _get_year_in_affix(self, affix, in_prefix): match_year = self.config.date_extractor.config.year_suffix.match(affix) success = not (match_year and match_year.start()) if not in_prefix else match_year and match_year.start() \ - + match_year.end() == len(affix.strip()) + + match_year.end() == len(affix.strip()) if success: year = self.config.date_extractor.get_year_from_text(match_year) @@ -1417,8 +1421,13 @@ def parse_number_with_month(self, source: str, reference: datetime) -> DateTimeP if match: month = self.config.month_of_year.get(match.group()) day = num - suffix = trimmed_source[match.end():] - prefix = trimmed_source[0: match.start()] + + prefix_end = min(ers[0].start, match.start()) + prefix = trimmed_source[0:prefix_end] + + suffix_start = max(ers[0].start + ers[0].length, match.end()) + suffix = trimmed_source[suffix_start:] + year = self._get_year_in_affix(suffix, False) if year == Constants.INVALID_YEAR and self.config.check_both_before_after: @@ -1433,7 +1442,10 @@ def parse_number_with_month(self, source: str, reference: datetime) -> DateTimeP match = regex.search( self.config.relative_month_regex, trimmed_source) if match: - month_str = match.group(Constants.ORDER) + if match.group(Constants.ORDER): + month_str = match.group(Constants.ORDER) + else: + month_str = match swift = self.config.get_swift_month(month_str) date = reference.replace(month=reference.month+swift) month = date.month @@ -1472,7 +1484,7 @@ def parse_number_with_month(self, source: str, reference: datetime) -> DateTimeP future_date = future_date.replace(year=future_date.year+1) if past_date >= reference: - past_date = past_date.replace(year=past_date.year+1) + past_date = past_date.replace(year=past_date.year-1) else: result.timex = DateTimeFormatUtil.luis_date(year, month, day) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_dateperiod.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_dateperiod.py index d28abb4f25..5b02a12848 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_dateperiod.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_dateperiod.py @@ -609,7 +609,7 @@ def match_duration(self, source: str, reference: datetime) -> List[Token]: durations = [] duration_extractions = self.config.duration_extractor.extract(source, reference) - for duration_extraction in self.config.duration_extractor.extract(source, reference): + for duration_extraction in duration_extractions: match = self.config.date_unit_regex.search(duration_extraction.text) if match: durations.append( @@ -2361,8 +2361,8 @@ def __parse_week_of_date(self, source: str, reference: datetime) -> DateTimeReso date_resolution = self.config.date_parser.parse(ers[0], reference).value result.timex = date_resolution.timex result.comment = BaseDatePeriodParser.week_of_comment - result.future_value = self.__get_week_range_from_date(date_resolution.future_value) - result.past_value = self.__get_week_range_from_date(date_resolution.past_value) + result.future_value = self.get_week_range_from_date(date_resolution.future_value) + result.past_value = self.get_week_range_from_date(date_resolution.past_value) result.success = True return result @@ -2377,18 +2377,18 @@ def __parse_month_of_date(self, source: str, reference: datetime) -> DateTimeRes date_resolution = self.config.date_parser.parse(ers[0], reference).value result.timex = date_resolution.timex result.comment = BaseDatePeriodParser.week_of_comment - result.future_value = self.__get_month_range_from_date(date_resolution.future_value) - result.past_value = self.__get_month_range_from_date(date_resolution.past_value) + result.future_value = self.get_month_range_from_date(date_resolution.future_value) + result.past_value = self.get_month_range_from_date(date_resolution.past_value) result.success = True return result - def __get_week_range_from_date(self, seed_date: datetime) -> List[datetime]: + def get_week_range_from_date(self, seed_date: datetime) -> List[datetime]: begin_date = DateUtils.this(seed_date, DayOfWeek.MONDAY) end_date = begin_date + timedelta(days=6 if self._inclusive_end_period else 7) return [begin_date, end_date] @staticmethod - def __get_month_range_from_date(seed_date: datetime) -> List[datetime]: + def get_month_range_from_date(seed_date: datetime) -> List[datetime]: begin_date = DateUtils.safe_create_from_value(DateUtils.min_value, seed_date.year, seed_date.month, 1) end_date = DateUtils.safe_create_from_value(DateUtils.min_value, seed_date.year, seed_date.month + 1, 1) return [begin_date, end_date] diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_datetimeperiod.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_datetimeperiod.py index e708f55377..51be22c715 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_datetimeperiod.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_datetimeperiod.py @@ -18,7 +18,7 @@ from .extractors import DateTimeExtractor from .parsers import DateTimeParser, DateTimeParseResult from .utilities import Token, merge_all_tokens, RegExpUtility, DateTimeFormatUtil, DateTimeResolutionResult, \ - DateUtils, RegExpUtility, DateTimeOptionsConfiguration, DateTimeOptions, TimexUtil + DateUtils, DateTimeOptionsConfiguration, DateTimeOptions, TimexUtil class MatchedTimeRange: @@ -457,7 +457,8 @@ def match_simple_cases(self, source: str, reference: datetime) -> List[Token]: begin = er.start end = er.start + er.length middle_str = before_str[end:].strip() - if not middle_str or RegExpUtility.is_exact_match(self.config.preposition_regex, middle_str, True): + if not middle_str or RegExpUtility.is_exact_match(self.config.preposition_regex, middle_str, + True): tokens.append(Token(begin, match.end())) has_before_date = True @@ -786,7 +787,7 @@ def match_prefix_regex_in_segment(string: str, match: Match, in_prefix: bool): substring = '' if match: substring = string[match.start(): match.end()] if in_prefix else string[0: match.start()] - return match and substring.strip() is not '' + return match and substring.strip() != '' def match_relative_unit(self, source: str) -> List[Token]: tokens: List[Token] = list() @@ -1062,7 +1063,8 @@ def merge_date_and_time_periods(self, source: str, reference: datetime) -> DateT # if it is a range type timex if TimexUtil.is_range_timex(time_period_timex): - date_result = self.config.date_extractor.extract(trimmed_source.replace(extracted_results[0].text, ''), reference) + date_result = self.config.date_extractor.extract(trimmed_source.replace(extracted_results[0].text, ''), + reference) # Check if token_before_date and token_before_time are null date_text = trimmed_source.replace(extracted_results[0].text, '').strip() @@ -1090,11 +1092,15 @@ def merge_date_and_time_periods(self, source: str, reference: datetime) -> DateT range_timex_components = TimexUtil.get_range_timex_components(time_period_timex) if range_timex_components.is_valid: - begin_timex = TimexUtil.combine_date_and_time_timex(date_timex, range_timex_components.begin_timex) - end_timex = TimexUtil.combine_date_and_time_timex(date_timex, range_timex_components.end_timex) - result.timex = TimexUtil.generate_date_time_period_timex(begin_timex, end_timex, range_timex_components.duration_timex) - - time_period_future_value = (time_period_resolution_result.future_value.start, time_period_resolution_result.future_value.end) + begin_timex = TimexUtil.combine_date_and_time_timex(date_timex, range_timex_components. + begin_timex) + end_timex = TimexUtil.combine_date_and_time_timex(date_timex, range_timex_components. + end_timex) + result.timex = TimexUtil.generate_date_time_period_timex(begin_timex, end_timex, + range_timex_components.duration_timex) + + time_period_future_value = (time_period_resolution_result.future_value.start, + time_period_resolution_result.future_value.end) begin_time = time_period_future_value[0] end_time = time_period_future_value[1] @@ -1116,13 +1122,15 @@ def merge_date_and_time_periods(self, source: str, reference: datetime) -> DateT end_time.second) ] - if time_period_resolution_result.comment and time_period_resolution_result.comment == Constants.COMMENT_AMPM: + if time_period_resolution_result.comment and time_period_resolution_result.comment == \ + Constants.COMMENT_AMPM: # ampm comment is used for later set_parser_result to judge whether this parse result should # have two parsing results. # Cases like "from 10:30 to 11 on 1/1/2015" should have ampm comment, as it can be parsed # to "10:30am to 11am" and also be parsed to "10:30pm to 11pm". # Cases like "from 10:30 to 3 on 1/1/2015" should not have ampm comment. - if begin_time.hour < Constants.HALF_DAY_HOUR_COUNT and end_time.hour < Constants.HALF_DAY_HOUR_COUNT: + if begin_time.hour < Constants.HALF_DAY_HOUR_COUNT and end_time.hour < \ + Constants.HALF_DAY_HOUR_COUNT: result.comment = Constants.COMMENT_AMPM result.success = True @@ -1292,7 +1300,8 @@ def merge_two_time_points(self, source: str, reference: datetime) -> DateTimeRes result.timex = f'({parse_result1.timex_str},{date_str + parse_result2.timex_str},{duration_str})' elif end_has_date: future_begin = DateUtils.safe_create_from_min_value(future_end.year, future_end.month, future_end.day, - future_begin.hour, future_begin.minute, future_begin.second) + future_begin.hour, future_begin.minute, + future_begin.second) past_begin = DateUtils.safe_create_from_min_value(past_end.year, past_end.month, past_end.day, past_begin.hour, past_begin.minute, past_begin.second) @@ -1375,7 +1384,9 @@ def parse_specific_time_of_day(self, source: str, reference: datetime) -> DateTi result.future_value = result.past_value = (DateUtils.safe_create_from_min_value(year, month, day, values.begin_hour, 0, 0), DateUtils.safe_create_from_min_value(year, month, day, - values.end_hour, values.end_min, values.end_min)) + values.end_hour, + values.end_min, + values.end_min)) result.success = True return result @@ -1384,7 +1395,7 @@ def parse_specific_time_of_day(self, source: str, reference: datetime) -> DateTi match = self.config.period_time_of_day_with_date_regex.search(trimmed_source) if not match: - match = self.config.am_desc_regex.sarch(trimmed_source) + match = self.config.am_desc_regex.search(trimmed_source) if not match: match = self.config.pm_desc_regex.search(trimmed_source) else: @@ -1415,7 +1426,10 @@ def parse_specific_time_of_day(self, source: str, reference: datetime) -> DateTi _before_str = trimmed_after_str trimmed_after_str = trimmed_after_str.strip() - extracted_results = self.config.date_extractor.extract((trimmed_before_str if trimmed_before_str is not '' else before_str) + ' ' + (trimmed_after_str if trimmed_after_str is not '' else after_str), reference) + extracted_results = self.config.date_extractor.extract((trimmed_before_str if trimmed_before_str != '' + else before_str) + ' ' + + (trimmed_after_str if trimmed_after_str != '' else + after_str), reference) if len(extracted_results) == 0 or extracted_results[0].length < len(trimmed_before_str): valid = False if len(extracted_results) > 0 and extracted_results[0].start == 0: diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_merged.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_merged.py index fb8e551d04..f86a89737d 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_merged.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_merged.py @@ -326,7 +326,7 @@ def _filter_ambiguity(self, extract_results: List[ExtractResult], text: str, ) - matches = reg_len new_ers = list(filter(lambda x: list( filter(lambda m: m.start() < x.start + x.length and m.start() + - len(m.group()) > x.start, matches)), extract_results)) + len(m.group()) > x.start, matches)), extract_results)) if len(new_ers) > 0: for item in extract_results: for i in new_ers: diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_minimal_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_minimal_configs.py new file mode 100644 index 0000000000..dafe150aae --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_minimal_configs.py @@ -0,0 +1,82 @@ +from typing import Dict, Pattern +from abc import abstractmethod, ABC + +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from ..resources.base_date_time import BaseDateTime +from .extractors import DateTimeExtractor +from .parsers import DateTimeParser +from .utilities import DateTimeUtilityConfiguration + + +class MinimalBaseDateParserConfiguration(ABC): + @property + @abstractmethod + def cardinal_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def integer_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def ordinal_extractor(self) -> BaseNumberExtractor: + raise NotImplementedError + + @property + @abstractmethod + def number_parser(self) -> BaseNumberParser: + raise NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> DateTimeParser: + raise NotImplementedError + + @property + @abstractmethod + def utility_configuration(self) -> DateTimeUtilityConfiguration: + raise NotImplementedError + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + @abstractmethod + def day_of_week(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def month_of_year(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def numbers(self) -> Dict[str, int]: + raise NotImplementedError + + @property + @abstractmethod + def check_both_before_after(self) -> Pattern: + raise NotImplementedError + + def __init__(self): + self._day_of_month = BaseDateTime.DayOfMonthDictionary \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_minimal_merged.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_minimal_merged.py new file mode 100644 index 0000000000..83972514d1 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_minimal_merged.py @@ -0,0 +1,573 @@ +from abc import abstractmethod, ABC +from typing import List, Optional, Pattern, Dict +from datetime import datetime +from collections import namedtuple +import regex + +from recognizers_text.extractor import Extractor, ExtractResult +from .constants import Constants, TimeTypeConstants +from .extractors import DateTimeExtractor +from .parsers import DateTimeParser, DateTimeParseResult +from .base_date import BaseDateParser +from .base_time import BaseTimeParser +from .utilities import Token, merge_all_tokens, DateTimeOptions, DateTimeFormatUtil, DateUtils, RegExpUtility, TimexUtil + +MatchedIndex = namedtuple('MatchedIndex', ['matched', 'index']) + + +class MinimalMergedExtractorConfiguration: + + @property + @abstractmethod + def ambiguous_range_modifier_prefix(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def number_ending_pattern(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def date_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def time_extractor(self) -> DateTimeExtractor: + raise NotImplementedError + + @property + @abstractmethod + def integer_extractor(self) -> Extractor: + raise NotImplementedError + + @property + @abstractmethod + def equal_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def check_both_before_after(self): + raise NotImplementedError + + +class MinimalMergedExtractor(DateTimeExtractor): + @property + def extractor_type_name(self) -> str: + return Constants.SYS_DATETIME_MERGED + + def __init__(self, config: MinimalMergedExtractorConfiguration, options: DateTimeOptions): + self.config = config + self.options = options + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + if reference is None: + reference = datetime.now() + + result: List[ExtractResult] = list() + + # The order is important, since there can be conflicts in merging + result = self.add_to( + result, self.config.date_extractor.extract(source, reference), source) + result = self.add_to( + result, self.config.time_extractor.extract(source, reference), source) + + # this should be at the end since if need the extractor to determine the previous text contains time or not + result = self.add_to( + result, self.number_ending_regex_match(source, result), source) + + result = sorted(result, key=lambda x: x.start) + + return result + + def add_to(self, destinations: List[ExtractResult], source: List[ExtractResult], text: str) -> List[ExtractResult]: + for value in source: + is_found = False + overlap_indexes: List[int] = list() + first_index = -1 + + for index, destination in enumerate(destinations): + if destination.overlap(value): + is_found = True + if destination.cover(value): + if first_index == -1: + first_index = index + overlap_indexes.append(index) + else: + continue + + if not is_found: + destinations.append(value) + elif overlap_indexes: + temp_dst: List[ExtractResult] = list() + + for index, destination in enumerate(destinations): + if index not in overlap_indexes: + temp_dst.append(destination) + + # insert at the first overlap occurence to keep the order + temp_dst.insert(first_index, value) + destinations = temp_dst + return destinations + + def number_ending_regex_match(self, source: str, extract_results: List[ExtractResult]) -> List[ExtractResult]: + tokens: List[Token] = list() + + for extract_result in extract_results: + if extract_result.type in [Constants.SYS_DATETIME_TIME, Constants.SYS_DATETIME_DATETIME]: + after_str = source[extract_result.start + + extract_result.length:] + match = regex.search( + self.config.number_ending_pattern, after_str) + if match: + new_time = RegExpUtility.get_group(match, Constants.NEW_TIME) + num_res = self.config.integer_extractor.extract(new_time) + if not num_res: + continue + + start_position = extract_result.start + \ + extract_result.length + match.group().index(new_time) + tokens.append( + Token(start_position, start_position + len(new_time))) + + return merge_all_tokens(tokens, source, Constants.SYS_DATETIME_TIME) + + +class MinimalMergedParserConfiguration(ABC): + @property + @abstractmethod + def before_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def after_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def since_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def around_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def equal_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def year_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def suffix_after(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def date_parser(self) -> BaseDateParser: + raise NotImplementedError + + @property + @abstractmethod + def time_parser(self) -> BaseTimeParser: + raise NotImplementedError + + +class MinimalMergedParser(DateTimeParser): + @property + def parser_type_name(self) -> str: + return Constants.SYS_DATETIME_MERGED + + def __init__(self, config: MinimalMergedParserConfiguration, options: DateTimeOptions): + self.__date_min_value = DateTimeFormatUtil.format_date( + DateUtils.min_value) + self.__date_time_min_value = DateTimeFormatUtil.format_date_time( + DateUtils.min_value) + self.config = config + self.options = options + + def parse(self, source: ExtractResult, reference: datetime = None) -> Optional[DateTimeParseResult]: + if not reference: + reference = datetime.now() + + # Push, save the MOD string + has_before = False + has_after = False + has_since = False + has_around = False + has_equal = False + has_date_after = False + match_is_after = False + + # "inclusive_mod" means MOD should include the start/end time + # For example, cases like "on or later than", "earlier than or in" have inclusive modifier + has_inclusive_mod = False + mod_str = '' + + result = self.parse_result(source, reference) + if not result: + return None + + # Pop, restore the MOD string + if has_before and result.value: + result.length += len(mod_str) + result.start -= 0 if match_is_after else len(mod_str) + result.text = result.text + mod_str if match_is_after else mod_str + result.text + val = result.value + + val.mod = self.combine_mod(val.mod, TimeTypeConstants.BEFORE_MOD if not has_inclusive_mod else + TimeTypeConstants.UNTIL_MOD) + if has_around: + val.mod = self.combine_mod(TimeTypeConstants.APPROX_MOD, val.mod) + has_around = False + result.value = val + + if has_after and result.value: + result.length += len(mod_str) + result.start -= len(mod_str) + result.text = mod_str + result.text + val = result.value + + val.mod = self.combine_mod(val.mod, TimeTypeConstants.AFTER_MOD if not has_inclusive_mod else + TimeTypeConstants.SINCE_MOD) + if has_around: + val.mod = self.combine_mod(TimeTypeConstants.APPROX_MOD, val.mod) + has_around = False + result.value = val + + if has_since and result.value: + result.length += len(mod_str) + result.start -= len(mod_str) + result.text = mod_str + result.text + val = result.value + val.mod = TimeTypeConstants.SINCE_MOD + if has_around: + val.mod = self.combine_mod(TimeTypeConstants.APPROX_MOD, val.mod) + has_around = False + result.value = val + + if has_around and result.value: + result.length += len(mod_str) + result.start -= len(mod_str) + result.text = mod_str + result.text + val = result.value + val.mod = TimeTypeConstants.APPROX_MOD + result.value = val + + if has_equal and result.value: + result.length += len(mod_str) + result.start -= len(mod_str) + result.text = mod_str + result.text + + if has_date_after and result.value: + result.length += len(mod_str) + result.text = result.text + mod_str + val = result.value + val.mod = self.combine_mod(val.mod, TimeTypeConstants.SINCE_MOD) + result.value = val + has_since = True + + # For cases like "3 pm or later on monday" + match = self.config.suffix_after.match(result.text) + if result.value and (match.start() != 0 if match else match) and \ + result.type == Constants.SYS_DATETIME_DATETIME: + val = result.value + val.mod = self.combine_mod(val.mod, TimeTypeConstants.SINCE_MOD) + result.value = val + has_since = True + + if self.options & DateTimeOptions.SPLIT_DATE_AND_TIME and result.value and result.value.sub_date_time_entities: + result.value = self._date_time_resolution_for_split(result) + else: + result = self.set_parse_result( + result, has_before, has_after, has_since) + + return result + + def parse_result(self, source: ExtractResult, reference: datetime): + if source.type == Constants.SYS_DATETIME_DATE: + result = self.config.date_parser.parse(source, reference) + elif source.type == Constants.SYS_DATETIME_TIME: + result = self.config.time_parser.parse(source, reference) + else: + return None + + return result + + @staticmethod + def combine_mod(original_mod: str, new_mod: str): + combined_mod = new_mod + + if original_mod: + combined_mod = f"{new_mod}-{original_mod}" + + return combined_mod + + def set_parse_result(self, slot: DateTimeParseResult, has_before: bool, has_after: bool, has_since: bool)\ + -> DateTimeParseResult: + slot.value = self._date_time_resolution( + slot, has_before, has_after, has_since) + slot.type = f'{self.parser_type_name}.' \ + f'{self._determine_date_time_types(slot.type, has_before, has_after, has_since)}' + return slot + + def _get_parse_result(self, extractor_result: Extractor, reference: datetime) -> DateTimeParseResult: + extractor_type = extractor_result.type + if extractor_type == Constants.SYS_DATETIME_DATE: + result = self.config.date_parser.parse(extractor_result, reference) + return result + elif extractor_type == Constants.SYS_DATETIME_TIME: + return self.config.time_parser.parse(extractor_result, reference) + else: + return None + + def _determine_date_time_types(self, dtype: str, has_before: bool, has_after: bool, has_since: bool) -> str: + if self.options & DateTimeOptions.SPLIT_DATE_AND_TIME: + if dtype == Constants.SYS_DATETIME_DATETIME: + return Constants.SYS_DATETIME_TIME + else: + if has_before or has_after or has_since: + if dtype == Constants.SYS_DATETIME_DATE: + return Constants.SYS_DATETIME_DATEPERIOD + + if dtype == Constants.SYS_DATETIME_TIME: + return Constants.SYS_DATETIME_TIMEPERIOD + + if dtype == Constants.SYS_DATETIME_DATETIME: + return Constants.SYS_DATETIME_DATETIMEPERIOD + return dtype + + def _determine_source_entity_type(self, source_type: str, new_type: str, has_mod: bool) -> Optional[str]: + if not has_mod: + return None + + if new_type != source_type: + return Constants.SYS_DATETIME_DATETIMEPOINT + + if new_type == Constants.SYS_DATETIME_DATEPERIOD: + return Constants.SYS_DATETIME_DATETIMEPERIOD + + def _date_time_resolution_for_split(self, slot: DateTimeParseResult) -> List[DateTimeParseResult]: + results = [] + if slot.value.sub_date_time_entities: + sub_entities = slot.value.sub_date_time_entities + + for sub_entity in sub_entities: + result = sub_entity + result.start += slot.start + results += self._date_time_resolution_for_split(result) + else: + slot.value = self._date_time_resolution(slot, False, False, False) + slot.type = f'{self.parser_type_name}.{self._determine_date_time_types(slot.type, False, False, False)}' + results.append(slot) + + return results + + def _date_time_resolution(self, slot: DateTimeParseResult, has_before, has_after, has_since) ->\ + List[Dict[str, str]]: + if not slot: + return None + + result = dict() + resolutions = [] + + dtype = slot.type + output_type = self._determine_date_time_types(dtype, has_before, has_after, has_since) + source_entity = self._determine_source_entity_type(dtype, output_type, has_before or has_after or has_since) + + timex = slot.timex_str + + value = slot.value + if not value: + return None + + is_lunar = value.is_lunar + mod = value.mod + comment = value.comment + + self._add_resolution_fields_any(result, Constants.TIMEX_KEY, timex) + self._add_resolution_fields_any(result, Constants.COMMENT_KEY, comment) + self._add_resolution_fields_any(result, Constants.MOD_KEY, mod) + self._add_resolution_fields_any(result, Constants.TYPE_KEY, output_type) + self._add_resolution_fields_any( + result, Constants.IS_LUNAR_KEY, str(is_lunar).lower() if is_lunar else '') + + future_resolution = value.future_resolution + past_resolution = value.past_resolution + + future = self._generate_from_resolution(dtype, future_resolution, mod) + past = self._generate_from_resolution(dtype, past_resolution, mod) + + future_values = sorted(future.values()) + past_values = sorted(past.values()) + intersect_values = [i for i, j in zip( + future_values, past_values) if i == j] + + if len(intersect_values) == len(past_values) and len(intersect_values) == len(future_values): + if past_values: + self._add_resolution_fields_any( + result, Constants.RESOLVE_KEY, past) + else: + if past_values: + self._add_resolution_fields_any( + result, Constants.RESOLVE_TO_PAST_KEY, past) + if future_values: + self._add_resolution_fields_any( + result, Constants.RESOLVE_TO_FUTURE_KEY, future) + + if comment == Constants.AM_PM_GROUP_NAME: + if Constants.RESOLVE_KEY in result: + self._resolve_ampm(result, Constants.RESOLVE_KEY) + else: + self._resolve_ampm(result, Constants.RESOLVE_TO_PAST_KEY) + self._resolve_ampm(result, Constants.RESOLVE_TO_FUTURE_KEY) + + if TimexUtil._has_double_timex(comment): + TimexUtil._process_double_timex(result, Constants.RESOLVE_TO_FUTURE_KEY, Constants.RESOLVE_TO_PAST_KEY, timex) + + for value in result.values(): + if isinstance(value, dict): + new_values = {} + self._add_resolution_fields( + new_values, Constants.TIMEX_KEY, timex) + self._add_resolution_fields(new_values, Constants.MOD_KEY, mod) + + self._add_resolution_fields(new_values, Constants.TYPE_KEY, output_type) + self._add_resolution_fields(new_values, Constants.IS_LUNAR_KEY, + str(is_lunar).lower() if is_lunar else '') + self._add_resolution_fields(new_values, Constants.SOURCE_TYPE, source_entity) + + for inner_key in value: + new_values[inner_key] = value[inner_key] + + resolutions.append(new_values) + + if not past and not future: + o = {} + o['timex'] = timex + o['type'] = output_type + o['value'] = 'not resolved' + resolutions.append(o) + + return {'values': resolutions} + + def _add_resolution_fields_any(self, dic: Dict[str, str], key: str, value: object): + if isinstance(value, str): + if value: + dic[key] = value + else: + dic[key] = value + + def _add_resolution_fields(self, dic: [str, str], key: str, value: str): + if value: + dic[key] = value + + def _generate_from_resolution(self, dtype: str, resolution: Dict[str, str], mod: str) -> Dict[str, str]: + result = {} + + if dtype == Constants.SYS_DATETIME_TIME: + self.__add_single_date_time_to_resolution( + resolution, TimeTypeConstants.TIME, mod, result) + elif dtype == Constants.SYS_DATETIME_DATE: + self.__add_single_date_time_to_resolution( + resolution, TimeTypeConstants.DATE, mod, result) + + return result + + def __add_single_date_time_to_resolution(self, resolutions: Dict[str, str], dtype: str, + mod: str, result: Dict[str, str]): + key = TimeTypeConstants.VALUE + value = resolutions[dtype] + if not value or value.startswith(self.__date_min_value): + return + + if mod: + if mod.startswith(TimeTypeConstants.BEFORE_MOD): + key = TimeTypeConstants.END + elif mod.startswith(TimeTypeConstants.AFTER_MOD): + key = TimeTypeConstants.START + elif mod.startswith(TimeTypeConstants.SINCE_MOD): + key = TimeTypeConstants.START + elif mod.startswith(TimeTypeConstants.UNTIL_MOD): + key = TimeTypeConstants.END + + result[key] = value + + def __add_period_to_resolution(self, resolutions: Dict[str, str], start_type: str, + end_type: str, mod: str, result: Dict[str, str]): + start = resolutions.get(start_type, None) + end = resolutions.get(end_type, None) + if mod: + if mod.startswith(TimeTypeConstants.BEFORE_MOD): + if mod.endswith(TimeTypeConstants.LATE_MOD): + result[TimeTypeConstants.END] = end + else: + result[TimeTypeConstants.END] = start + return + if mod.startswith(TimeTypeConstants.AFTER_MOD): + if mod.endswith(TimeTypeConstants.EARLY_MOD): + result[TimeTypeConstants.START] = start + else: + result[TimeTypeConstants.START] = end + return + if mod == TimeTypeConstants.SINCE_MOD: + result[TimeTypeConstants.START] = start + return + + if not (start and end): + return + + if start.startswith(Constants.INVALID_DATE_STRING) or end.startswith(Constants.INVALID_DATE_STRING): + return + + result[TimeTypeConstants.START] = start + result[TimeTypeConstants.END] = end + + def _resolve_ampm(self, values_map: Dict[str, str], key_name: str): + if key_name not in values_map: + return + resolution = values_map[key_name] + if Constants.TIMEX_KEY not in values_map: + return + timex = values_map[Constants.TIMEX_KEY] + values_map.pop(key_name, None) + values_map[key_name + Constants.AM_GROUP_NAME] = resolution + + resolution_pm = {} + if values_map[Constants.TYPE_KEY] == Constants.SYS_DATETIME_TIME: + resolution_pm[TimeTypeConstants.VALUE] = DateTimeFormatUtil.to_pm( + resolution[TimeTypeConstants.VALUE]) + resolution_pm[Constants.TIMEX_KEY] = DateTimeFormatUtil.to_pm(timex) + elif values_map[Constants.TYPE_KEY] == Constants.SYS_DATETIME_DATETIME: + split_value = resolution[TimeTypeConstants.VALUE].split(' ') + resolution_pm[ + TimeTypeConstants.VALUE] = f'{split_value[0]} {DateTimeFormatUtil.to_pm(split_value[1])}' + resolution_pm[Constants.TIMEX_KEY] = DateTimeFormatUtil.all_str_to_pm(timex) + elif values_map[Constants.TYPE_KEY] == Constants.SYS_DATETIME_TIMEPERIOD: + if TimeTypeConstants.START in resolution: + resolution_pm[TimeTypeConstants.START] = DateTimeFormatUtil.to_pm( + resolution[TimeTypeConstants.START]) + if TimeTypeConstants.END in resolution: + resolution_pm[TimeTypeConstants.END] = DateTimeFormatUtil.to_pm( + resolution[TimeTypeConstants.END]) + resolution_pm[Constants.TIMEX_KEY] = DateTimeFormatUtil.all_str_to_pm(timex) + elif values_map[Constants.TYPE_KEY] == Constants.SYS_DATETIME_DATETIMEPERIOD: + if TimeTypeConstants.START in resolution: + split_value = resolution[TimeTypeConstants.START].split(' ') + resolution_pm[ + TimeTypeConstants.START] = f'{split_value[0]} {DateTimeFormatUtil.to_pm(split_value[1])}' + if TimeTypeConstants.END in resolution: + split_value = resolution[TimeTypeConstants.END].split(' ') + resolution_pm[ + TimeTypeConstants.END] = f'{split_value[0]} {DateTimeFormatUtil.to_pm(split_value[1])}' + resolution_pm[Constants.TIMEX_KEY] = DateTimeFormatUtil.all_str_to_pm(timex) + values_map[key_name + Constants.PM_GROUP_NAME] = resolution_pm \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_time.py index b746dc830f..b008bbd6a8 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_time.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/base_time.py @@ -317,7 +317,7 @@ def match_to_time(self, match: Match, reference: datetime): else: hour = int(hour_str) if hour_str.isnumeric( ) else self.config.numbers.get(hour_str, None) - if not hour: + if hour is None: return result # get minute min_str = RegExpUtility.get_group(match, Constants.MINUTE_GROUP_NAME) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/__init__.py new file mode 100644 index 0000000000..904b47957d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/__init__.py @@ -0,0 +1,7 @@ +from .base_configs import * +from .common_configs import * +from .date_extractor_config import * +from .time_extractor_config import * +from .date_parser_config import * +from .time_parser_config import * +from .merged_parser_config import * \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/base_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/base_configs.py new file mode 100644 index 0000000000..fd8dc69a68 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/base_configs.py @@ -0,0 +1,80 @@ +from typing import Pattern +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.date_time.base_date import DateTimeUtilityConfiguration +from recognizers_date_time.resources.catalan_date_time import CatalanDateTime + + +class CatalanDateTimeUtilityConfiguration(DateTimeUtilityConfiguration): + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def range_prefix_regex(self) -> Pattern: + return self._range_prefix_regex + + @property + def ago_regex(self) -> Pattern: + return self._ago_regex + + @property + def later_regex(self) -> Pattern: + return self._later_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 am_desc_regex(self) -> Pattern: + return self._am_desc_regex + + @property + def pm_desc__regex(self) -> Pattern: + return self._pm_desc__regex + + @property + def am_pm_desc_regex(self) -> Pattern: + return self._am_pm_desc_regex + + @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 common_date_prefix_regex(self) -> Pattern: + return self._common_date_prefix_regex + + def __init__(self): + self._later_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._ago_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._in_connector_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.InConnectorRegex) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.RangeUnitRegex) + self._am_desc_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.AmDescRegex) + self._pm_desc__regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.PmDescRegex) + self._am_pm_desc_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.AmPmDescRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._common_date_prefix_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._check_both_before_after = CatalanDateTime.CheckBothBeforeAfter + self._range_prefix_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.RangePrefixRegex + ) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/common_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/common_configs.py new file mode 100644 index 0000000000..f6f2a9202a --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/common_configs.py @@ -0,0 +1,132 @@ +from typing import Dict, Pattern, List +from datetime import datetime +from recognizers_text.extractor import ExtractResult +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from recognizers_number.number.catalan.parsers import CatalanNumberParserConfiguration +from recognizers_number.number.catalan.extractors import CatalanCardinalExtractor, CatalanIntegerExtractor, \ + CatalanOrdinalExtractor + +from ...resources.catalan_date_time import CatalanDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..base_configs import DateTimeUtilityConfiguration +from ..base_duration import BaseDurationExtractor, BaseDurationParser +from ..base_minimal_configs import MinimalBaseDateParserConfiguration +from ..base_date import BaseDateExtractor, DateExtractorConfiguration, BaseDateParser +from ..base_time import BaseTimeExtractor, BaseTimeParser +from ..base_timezone import BaseTimeZoneParser +from .base_configs import CatalanDateTimeUtilityConfiguration +from .date_extractor_config import CatalanDateExtractorConfiguration +from .date_parser_config import CatalanDateParserConfiguration +from .time_extractor_config import CatalanTimeExtractorConfiguration +from .time_parser_config import CatalanTimeParserConfiguration + + +class CatalanBaseDateExtractor(BaseDateExtractor): + + def __init__(self, config: DateExtractorConfiguration): + super().__init__(config) + + def extract(self, source: str, reference: datetime = None) -> List[ExtractResult]: + from ..utilities import merge_all_tokens + if reference is None: + reference = datetime.now() + + tokens = [] + tokens.extend(self.basic_regex_match(source)) + tokens.extend(self.implicit_date(source)) + tokens.extend(self.number_with_month(source, reference)) + + result = merge_all_tokens(tokens, source, self.extractor_type_name) + return result + + +class CatalanCommonDateTimeParserConfiguration(MinimalBaseDateParserConfiguration): + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def unit_map(self): + return {} + + @property + def cardinal_map(self): + return {} + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self): + MinimalBaseDateParserConfiguration.__init__(self) + + self._utility_configuration = CatalanDateTimeUtilityConfiguration() + self._time_zone_parser = BaseTimeZoneParser() + self._day_of_week = CatalanDateTime.DayOfWeek + self._month_of_year = CatalanDateTime.MonthOfYear + self._numbers = CatalanDateTime.Numbers + self._check_both_before_after = CatalanDateTime.CheckBothBeforeAfter + self._cardinal_extractor = CatalanCardinalExtractor() + self._integer_extractor = CatalanIntegerExtractor() + self._ordinal_extractor = CatalanOrdinalExtractor() + self._number_parser = BaseNumberParser( + CatalanNumberParserConfiguration()) + self._date_extractor = CatalanBaseDateExtractor( + CatalanDateExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor(CatalanTimeExtractorConfiguration()) + self._date_parser = BaseDateParser( + CatalanDateParserConfiguration(self)) + self._time_parser = BaseTimeParser(CatalanTimeParserConfiguration(self)) \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/date_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/date_extractor_config.py new file mode 100644 index 0000000000..a649d36aa0 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/date_extractor_config.py @@ -0,0 +1,214 @@ +from typing import Pattern, List, Dict +from recognizers_number import (BaseNumberExtractor, BaseNumberParser, + CatalanOrdinalExtractor, CatalanIntegerExtractor, CatalanNumberParserConfiguration) +from recognizers_text.utilities import RegExpUtility +from ...resources.catalan_date_time import CatalanDateTime +from ..extractors import DateTimeExtractor +from ..base_date import DateExtractorConfiguration +from ..utilities import DateTimeUtilityConfiguration +from .base_configs import CatalanDateTimeUtilityConfiguration +from ..constants import Constants +from ...resources.base_date_time import BaseDateTime + + +class CatalanDateExtractorConfiguration(DateExtractorConfiguration): + @property + def week_day_start(self) -> Pattern: + return self._week_day_start + + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def date_regex_list(self) -> List[Pattern]: + return self._date_regex_list + + @property + def implicit_date_list(self) -> List[Pattern]: + return self._implicit_date_list + + @property + def month_end(self) -> Pattern: + return self._month_end + + @property + def week_day_end(self) -> Pattern: + return self._week_day_end + + @property + def of_month(self) -> Pattern: + return self._of_month + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def for_the_regex(self) -> Pattern: + return self._for_the_regex + + @property + def week_day_and_day_of_month_regex(self) -> Pattern: + return self._week_day_and_day_of_month_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def prefix_article_regex(self) -> Pattern: + return self._prefix_article_regex + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_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 None + + @property + def strict_relative_regex(self) -> Pattern: + return self._strict_relative_regex + + @property + def range_connector_symbol_regex(self) -> Pattern: + return self._range_connector_symbol_regex + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def year_suffix(self) -> Pattern: + return self._year_suffix + + @property + def more_than_regex(self) -> Pattern: + return self._more_than_regex + + @property + def less_than_regex(self) -> Pattern: + return self._less_than_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 since_year_suffix_regex(self) -> Pattern: + return self._since_year_suffix_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + def __init__(self): + self._check_both_before_after = False + if CatalanDateTime.DefaultLanguageFallback == Constants.DEFAULT_LANGUAGE_FALLBACK_DMY: + date_extractor_4 = CatalanDateTime.DateExtractor5 + date_extractor_5 = CatalanDateTime.DateExtractor8 + date_extractor_6 = CatalanDateTime.DateExtractor9 + date_extractor_8 = CatalanDateTime.DateExtractor4 + date_extractor_7 = CatalanDateTime.DateExtractor6 + date_extractor_9 = CatalanDateTime.DateExtractor7 + else: + date_extractor_4 = CatalanDateTime.DateExtractor4 + date_extractor_5 = CatalanDateTime.DateExtractor6 + date_extractor_6 = CatalanDateTime.DateExtractor7 + date_extractor_8 = CatalanDateTime.DateExtractor5 + date_extractor_7 = CatalanDateTime.DateExtractor8 + date_extractor_9 = CatalanDateTime.DateExtractor9 + + self._date_regex_list = [ + RegExpUtility.get_safe_reg_exp(CatalanDateTime.DateExtractor1), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.DateExtractor2), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.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(CatalanDateTime.DateExtractor10), + ] + + self._implicit_date_list = [ + RegExpUtility.get_safe_reg_exp(CatalanDateTime.OnRegex), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.RelaxedOnRegex), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.SpecialDayRegex), + # TODO - we might invest in resolving below in time. + # RegExpUtility.get_safe_reg_exp(CatalanDateTime.ThisRegex), + # RegExpUtility.get_safe_reg_exp(CatalanDateTime.LastDateRegex), + # RegExpUtility.get_safe_reg_exp(CatalanDateTime.NextDateRegex), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.WeekDayRegex), + # RegExpUtility.get_safe_reg_exp( + # CatalanDateTime.WeekDayOfMonthRegex), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.SpecialDateRegex), + ] + self._month_end = RegExpUtility.get_safe_reg_exp(CatalanDateTime.MonthEndRegex) + self._of_month = RegExpUtility.get_safe_reg_exp(CatalanDateTime.OfMonthRegex) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._for_the_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayAndDayOfMonthRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayRegex) + self._day_of_week = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._ordinal_extractor = CatalanOrdinalExtractor() + self._integer_extractor = CatalanIntegerExtractor() + self._number_parser = BaseNumberParser( + CatalanNumberParserConfiguration()) + self._utility_configuration = CatalanDateTimeUtilityConfiguration() + self._range_connector_symbol_regex = RegExpUtility.get_safe_reg_exp( + BaseDateTime.RangeConnectorSymbolRegex + ) + self._strict_relative_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._year_suffix = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._month_of_year = CatalanDateTime.MonthOfYear + self._prefix_article_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._week_day_end = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayEnd + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._less_than_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._in_connector_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.InConnectorRegex + ) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.RangeUnitRegex + ) + self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayAndDayRegex + ) + self._week_day_start = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayStart + ) + self._check_both_before_after = CatalanDateTime.CheckBothBeforeAfter \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/date_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/date_parser_config.py new file mode 100644 index 0000000000..fa1ad69d0d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/date_parser_config.py @@ -0,0 +1,214 @@ +from typing import Pattern, List, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from ...resources.catalan_date_time import CatalanDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..utilities import DateTimeUtilityConfiguration +from ..base_date import DateParserConfiguration +from ..base_configs import BaseDateParserConfiguration +from .date_extractor_config import CatalanDateExtractorConfiguration + + +class CatalanDateParserConfiguration(DateParserConfiguration): + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return None + + @property + def duration_parser(self) -> DateTimeParser: + return None + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def date_regex(self) -> List[Pattern]: + return self._date_regex + + @property + def on_regex(self) -> Pattern: + return self._on_regex + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def special_day_with_num_regex(self) -> Pattern: + return self._special_day_with_num_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def week_day_of_month_regex(self) -> Pattern: + return self._week_day_of_month_regex + + @property + def for_the_regex(self) -> Pattern: + return self._for_the_regex + + @property + def week_day_and_day_of_month_regex(self) -> Pattern: + return self._week_day_and_day_of_month_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def relative_week_day_regex(self) -> Pattern: + return self._relative_week_day_regex + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def date_token_prefix(self) -> str: + return self._date_token_prefix + + _relative_day_regex = None + _next_prefix_regex = None + _past_prefix_regex = None + + def __init__(self, config: BaseDateParserConfiguration): + self._ordinal_extractor = config.ordinal_extractor + self._integer_extractor = config.integer_extractor + self._cardinal_extractor = config.cardinal_extractor + self._date_extractor = config.date_extractor + self._number_parser = config.number_parser + self._month_of_year = config.month_of_year + self._day_of_month = config.day_of_month + self._day_of_week = config.day_of_week + self._unit_map = config.unit_map + self._cardinal_map = config.cardinal_map + self._date_regex = ( + CatalanDateExtractorConfiguration()).date_regex_list + self._on_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.OnRegex) + self._special_day_regex = RegExpUtility.get_safe_reg_exp(CatalanDateTime.SpecialDayRegex) + self._special_day_with_num_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.SpecialDayWithNumRegex) + self._next_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._unit_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._month_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.MonthRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._this_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._week_day_of_month_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._for_the_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayAndDayOfMonthRegex) + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.WeekDayAndDayRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._relative_week_day_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.RelativeWeekDayRegex) + self._utility_configuration = config.utility_configuration + self._date_token_prefix = CatalanDateTime.DateTokenPrefix + self._check_both_before_after = CatalanDateTime.CheckBothBeforeAfter + + def get_swift_day(self, source: str) -> int: + trimmed_text = self.__normalize(source.strip().lower()) + swift = 0 + + if trimmed_text == 'avui': + swift = 0 + elif trimmed_text == 'mati' or trimmed_text == 'dema': + swift = 1 + elif trimmed_text == 'ahir': + swift = -1 + + return swift + + def get_swift_month(self, source: str) -> int: + trimmed_text = source.strip().lower() + swift = 0 + + if regex.search(CatalanDateParserConfiguration._next_prefix_regex, trimmed_text): + swift = 1 + + if regex.search(CatalanDateParserConfiguration._past_prefix_regex, trimmed_text): + swift = -1 + + return swift + + def is_cardinal_last(self, source: str) -> bool: + trimmed_text = source.strip().lower() + return not regex.search(CatalanDateParserConfiguration._past_prefix_regex, trimmed_text) is None + + def __normalize(self, source: str) -> str: + return source.replace('á', 'a').replace('é', 'e').replace('í', 'i').replace('ó', 'o').\ + replace('ú', 'u').replace('à', 'a') \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/merged_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/merged_extractor_config.py new file mode 100644 index 0000000000..efb01ee4ef --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/merged_extractor_config.py @@ -0,0 +1,65 @@ +from typing import List, Pattern + +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility +from recognizers_number import CatalanIntegerExtractor +from ...resources.catalan_date_time import CatalanDateTime +from ..extractors import DateTimeExtractor +from ..base_minimal_merged import MinimalMergedExtractorConfiguration +from ..base_date import BaseDateExtractor +from ..base_time import BaseTimeExtractor +from .date_extractor_config import CatalanDateExtractorConfiguration +from .time_extractor_config import CatalanTimeExtractorConfiguration +from ...resources.base_date_time import BaseDateTime + + +class CatalanMergedExtractorConfiguration(MinimalMergedExtractorConfiguration): + @property + def check_both_before_after(self): + return self._check_both_before_after + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def ambiguous_range_modifier_prefix(self) -> None: + return None + + @property + def potential_ambiguous_range_regex(self) -> None: + return None + + @property + def number_ending_pattern(self) -> Pattern: + return self._number_ending_pattern + + @property + def filter_word_regex_list(self) -> List[Pattern]: + return self._filter_word_regex_list + + def __init__(self): + self._ambiguous_range_modifier_prefix = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.AmbiguousRangeModifierPrefix) + self._number_ending_pattern = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.NumberEndingPattern) + + self._date_extractor = BaseDateExtractor( + CatalanDateExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor(CatalanTimeExtractorConfiguration()) + self._integer_extractor = CatalanIntegerExtractor() + self._filter_word_regex_list = [] + self._equal_regex = BaseDateTime.EqualRegex + self._check_both_before_after = CatalanDateTime.CheckBothBeforeAfter \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/merged_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/merged_parser_config.py new file mode 100644 index 0000000000..2f6832c0bd --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/merged_parser_config.py @@ -0,0 +1,63 @@ +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility +from .common_configs import CatalanCommonDateTimeParserConfiguration +from ..base_date import BaseDateParser +from ..base_time import BaseTimeParser +from ..base_minimal_merged import MinimalMergedParserConfiguration +from ...resources.catalan_date_time import CatalanDateTime, BaseDateTime +from ..parsers import DateTimeParser + + +class CatalanMergedParserConfiguration(CatalanCommonDateTimeParserConfiguration, MinimalMergedParserConfiguration): + @property + def around_regex(self) -> Pattern: + return self._around_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def suffix_after(self) -> Pattern: + return self._suffix_after + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def since_regex(self) -> Pattern: + return self._since_regex + + @property + def date_parser(self) -> BaseDateParser: + return self._date_parser + + @property + def time_parser(self) -> BaseTimeParser: + return self._time_parser + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def __init__(self, config): + CatalanCommonDateTimeParserConfiguration.__init__(self) + self._time_zone_parser = config.time_zone_parser + self._equal_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.EqualRegex) + self._suffix_after = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._year_regex = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.YearRegex) + self._around_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._before_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._after_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._since_regex = RegExpUtility.get_safe_reg_exp(f'^[.]') diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/time_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/time_extractor_config.py new file mode 100644 index 0000000000..5de3ee079d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/time_extractor_config.py @@ -0,0 +1,61 @@ +from typing import List, Pattern +from recognizers_text.utilities import RegExpUtility +from ...resources.catalan_date_time import CatalanDateTime +from ..base_time import TimeExtractorConfiguration +from ..base_timezone import BaseTimeZoneExtractor + + +class CatalanTimeExtractorConfiguration(TimeExtractorConfiguration): + @property + def time_zone_extractor(self): + return None + + @property + def options(self): + return self._options + + @property + def dmy_date_format(self) -> bool: + return self._dmy_date_format + + @property + def time_regex_list(self) -> List[Pattern]: + return self._time_regex_list + + @property + def at_regex(self) -> Pattern: + return self._at_regex + + @property + def ish_regex(self) -> Pattern: + return self._ish_regex + + @property + def time_before_after_regex(self) -> Pattern: + return self._time_before_after_regex + + def __init__(self): + super().__init__() + self._time_regex_list: List[Pattern] = CatalanTimeExtractorConfiguration.get_time_regex_list( + ) + self._at_regex: Pattern = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.AtRegex) + self._time_before_after_regex: Pattern = RegExpUtility.get_safe_reg_exp(f'^[.]') + self._ish_regex: Pattern = None + + @staticmethod + def get_time_regex_list() -> List[Pattern]: + return [ + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex1), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex2), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex3), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex4), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex5), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex6), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex7), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex8), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex9), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex11), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.TimeRegex12), + RegExpUtility.get_safe_reg_exp(CatalanDateTime.ConnectNumRegex) + ] \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/time_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/time_parser_config.py new file mode 100644 index 0000000000..bdc0d1a281 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/catalan/time_parser_config.py @@ -0,0 +1,121 @@ +from typing import List, Pattern, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from ...resources.catalan_date_time import CatalanDateTime +from ..base_time import TimeParserConfiguration, AdjustParams +from ..base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from .time_extractor_config import CatalanTimeExtractorConfiguration +from ..parsers import DateTimeParser + + +class CatalanTimeParserConfiguration(TimeParserConfiguration): + @property + def time_token_prefix(self) -> str: + return self._time_token_prefix + + @property + def at_regex(self) -> Pattern: + return self._at_regex + + @property + def time_regexes(self) -> List[Pattern]: + return self._time_regexes + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def __init__(self, config: BaseDateParserConfiguration): + self._time_token_prefix: str = CatalanDateTime.TimeTokenPrefix + self._at_regex: Pattern = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.AtRegex) + self._time_regexes: List[Pattern] = CatalanTimeExtractorConfiguration.get_time_regex_list( + ) + self.less_than_one_hour = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.LessThanOneHour) + self.time_suffix = RegExpUtility.get_safe_reg_exp( + CatalanDateTime.TimeSuffix) + + self._utility_configuration = config.utility_configuration + self._numbers: Dict[str, int] = config.numbers + self._time_zone_parser = config.time_zone_parser + + def adjust_by_prefix(self, prefix: str, adjust: AdjustParams): + delta_min = 0 + prefix = prefix.strip().lower() + + if prefix.startswith('quart') or prefix.startswith('i quart'): + delta_min = 15 + elif prefix.startswith('menys quart'): + delta_min = -15 + elif prefix.startswith('mitjana') or prefix.startswith('i mitjana') or \ + prefix.startswith('i mitja') or prefix.startswith(('mitja')): + delta_min = 30 + elif prefix.startswith('tres quarts'): + delta_min = 45 + else: + match = regex.search(self.less_than_one_hour, prefix) + if match: + min_str = RegExpUtility.get_group(match, 'deltamin') + if min_str: + delta_min = int(min_str) + else: + min_str = RegExpUtility.get_group( + match, 'deltaminnum').lower() + delta_min = self.numbers.get(min_str) + + if ( + prefix.endswith('passades') or prefix.endswith('passats') or + prefix.endswith('passades les') or prefix.endswith('passats les') or + prefix.endswith('passades de les') or prefix.endswith( + 'passats de les') + ): + # deltaMin it's positive + pass + elif ( + prefix.endswith('per a la') or prefix.endswith('per a les') or + prefix.endswith('abans de la') or prefix.endswith('abans de les') + ): + delta_min = delta_min * -1 + + adjust.minute += delta_min + + if adjust.minute < 0: + adjust.minute += 60 + adjust.hour -= 1 + + adjust.has_minute = True + + def adjust_by_suffix(self, suffix: str, adjust: AdjustParams): + suffix = suffix.strip().lower() + + delta_hour = 0 + match = regex.match(self.time_suffix, suffix) + + if match and match.group() == suffix: + oclock_str = RegExpUtility.get_group(match, 'oclock') + if not oclock_str: + am_str = RegExpUtility.get_group(match, 'am') + if am_str: + if adjust.hour >= 12: + delta_hour -= 12 + + adjust.has_am = True + + pm_str = RegExpUtility.get_group(match, 'pm') + if pm_str: + if adjust.hour < 12: + delta_hour = 12 + + adjust.has_pm = True + + adjust.hour = (adjust.hour + delta_hour) % 24 \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/date_parser.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/date_parser.py index 00a400df1f..731b315eab 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/date_parser.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/date_parser.py @@ -14,11 +14,10 @@ from ...resources.chinese_date_time import ChineseDateTime from ..constants import TimeTypeConstants, Constants -from ..utilities import DateTimeResolutionResult, DateTimeFormatUtil, DateUtils, DayOfWeek +from ..utilities import DateTimeResolutionResult, DateTimeFormatUtil, DateUtils from ..parsers import DateTimeParseResult from ..base_date import BaseDateParser from .date_parser_config import ChineseDateParserConfiguration -from ..utilities import parse_chinese_dynasty_year class ChineseDateParser(BaseDateParser): @@ -320,7 +319,12 @@ def parse_chinese_written_number_to_value(self, source: str) -> int: def convert_chinese_year_to_number(self, source: str) -> int: year = 0 - dynasty_year = parse_chinese_dynasty_year(source, self.config.dynasty_year_regex, self.config.dynasty_start_year, self.config.dynasty_year_map, self.integer_extractor, self.config.number_parser) + dynasty_year = DateTimeFormatUtil.parse_dynasty_year(source, + self.config.dynasty_year_regex, + self.config.dynasty_start_year, + self.config.dynasty_year_map, + self.integer_extractor, + self.config.number_parser) if dynasty_year is not None: return dynasty_year @@ -337,7 +341,7 @@ def convert_chinese_year_to_number(self, source: str) -> int: iter(self.config.integer_extractor.extract(char)), None) if er and er.type == NumberConstants.SYS_NUM_INTEGER: year = year + \ - int(self.config.number_parser.parse(er).value) + int(self.config.number_parser.parse(er).value) return -1 if year < 10 else year @@ -393,9 +397,9 @@ def parser_duration_with_ago_and_later(self, source: str, reference: datetime) - elif unit_str == Constants.TIMEX_WEEK: date = reference + timedelta(days=-7 * number) elif unit_str == Constants.TIMEX_MONTH_FULL: - date = reference.replace(month=reference.month-1) + date = reference.replace(month=reference.month - 1) elif unit_str == Constants.TIMEX_YEAR: - date = reference.replace(year=reference.year-1) + date = reference.replace(year=reference.year - 1) else: return result @@ -411,9 +415,9 @@ def parser_duration_with_ago_and_later(self, source: str, reference: datetime) - elif unit_str == Constants.TIMEX_WEEK: date = reference + timedelta(days=7 * number) elif unit_str == Constants.TIMEX_MONTH_FULL: - date = reference.replace(month=reference.month+1) + date = reference.replace(month=reference.month + 1) elif unit_str == Constants.TIMEX_YEAR: - date = reference.replace(year=reference.year+1) + date = reference.replace(year=reference.year + 1) else: return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_parser.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_parser.py index d2a385db0f..1b4447e7f0 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_parser.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_parser.py @@ -7,7 +7,7 @@ import regex from recognizers_text import RegExpUtility, ExtractResult -from recognizers_number import ChineseIntegerExtractor, CJKNumberParser, ChineseNumberParserConfiguration,\ +from recognizers_number import ChineseIntegerExtractor, CJKNumberParser, ChineseNumberParserConfiguration, \ Constants as NumberConstants from ...resources.chinese_date_time import ChineseDateTime @@ -16,7 +16,6 @@ from ..parsers import DateTimeParseResult from ..base_dateperiod import BaseDatePeriodParser from .dateperiod_parser_config import ChineseDatePeriodParserConfiguration -from ..utilities import parse_chinese_dynasty_year class ChineseDatePeriodParser(BaseDatePeriodParser): @@ -223,7 +222,8 @@ def _parse_duration(self, source: str, reference: datetime) -> DateTimeResolutio return self.__parse_common_duration_with_unit(before_str, source_unit, num_str, reference) - def __parse_common_duration_with_unit(self, before: str, unit: str, num: str, reference: datetime) -> DateTimeResolutionResult: + def __parse_common_duration_with_unit(self, before: str, unit: str, num: str, + reference: datetime) -> DateTimeResolutionResult: result = DateTimeResolutionResult() unit_str = self.config.unit_map[unit] @@ -436,7 +436,12 @@ def _parse_year(self, source: str, reference: datetime) -> DateTimeResolutionRes def _convert_year(self, year_str: str, is_chinese: bool) -> int: year = -1 if is_chinese: - dynasty_year = parse_chinese_dynasty_year(year_str, self.config.dynasty_year_regex, self.config.dynasty_start_year, self.config.dynasty_year_map, self.integer_extractor, self.number_parser) + dynasty_year = DateTimeFormatUtil.parse_dynasty_year(year_str, + self.config.dynasty_year_regex, + self.config.dynasty_start_year, + self.config.dynasty_year_map, + self.integer_extractor, + self.number_parser) if dynasty_year is not None: return dynasty_year @@ -478,7 +483,7 @@ def _get_week_of_month(self, cardinal, month, year, reference, no_year) -> DateT past_date = past_date + timedelta(days=-7) result.timex = ( - 'XXXX' if no_year else f'{year:04d}') + f'-{month:02d}-W{cardinal:02d}' + 'XXXX' if no_year else f'{year:04d}') + f'-{month:02d}-W{cardinal:02d}' days_to_add = 6 if self._inclusive_end_period else 7 result.future_value = [future_date, diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/constants.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/constants.py index e7365193bd..1d32e81d4e 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/constants.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/constants.py @@ -15,6 +15,7 @@ class Constants: SYS_DATETIME_DURATION: str = 'duration' SYS_DATETIME_SET: str = 'set' SYS_DATETIME_TIMEZONE: str = 'timezone' + SYS_DATETIME_DATETIMEALT: str = 'datetimealt' SYS_DATETIME_MERGED: str = 'datetimeV2' @@ -44,25 +45,62 @@ class Constants: MIN_MONTH: int = 1 MAX_MONTH: int = 12 INVALID_YEAR = -2147483648 + INVALID_MONTH = -2147483648 INVALID_HOUR = -2147483648 INVALID_MINUTE = -2147483648 INVALID_SECOND = -2147483648 COMMENT_KEY: str = 'Comment' COMMENT_AMPM = 'ampm' + COMMENT_AM = 'am' COMMENT_DOUBLETIMEX = "doubleTimex" + # Default boundaries for time of day resolution + EARLY_MORNING_BEGIN_HOUR = 4 + EARLY_MORNING_END_HOUR = 8 + MORNING_BEGIN_HOUR = 8 + MORNING_END_HOUR = 12 + MID_DAY_BEGIN_HOUR = 11 + MID_DAY_END_HOUR = 13 + AFTERNOON_BEGIN_HOUR = 12 + AFTERNOON_END_HOUR = 16 + EVENING_BEGIN_HOUR = 16 + EVENING_END_HOUR = 20 + DAYTIME_BEGIN_HOUR = 8 + DAYTIME_END_HOUR = 18 + NIGHTTIME_BEGIN_HOUR = 0 + NIGHTTIME_END_HOUR = 8 + BUSINESS_BEGIN_HOUR = 8 + BUSINESS_END_HOUR = 18 + NIGHT_BEGIN_HOUR = 20 + NIGHT_END_HOUR = 23 + NIGHT_END_MINUTE = 59 + MEAL_TIME_BREAKFAST_BEGIN_HOUR = 8 + MEAL_TIME_BREAKFAST_END_HOUR = 12 + MEAL_TIME_BRUNCH_BEGIN_HOUR = 8 + MEAL_TIME_BRUNCH_END_HOUR = 12 + MEAL_TIME_LUNCH_BEGIN_HOUR = 11 + MEAL_TIME_LUNCH_END_HOUR = 13 + MEAL_TIME_DINNER_BEGIN_HOUR = 16 + MEAL_TIME_DINNER_END_HOUR = 20 + + + # Failed connector extraction INVALID_CONNECTOR_CODE = -1 MIN_YEAR_NUM: int = int(BaseDateTime.MinYearNum) MAX_YEAR_NUM: int = int(BaseDateTime.MaxYearNum) + QUARTER_DAY_HOUR_COUNT = 6 HALF_DAY_HOUR_COUNT = 12 DAY_HOUR_COUNT = 24 + DAY_HOUR_START = 0 HOUR_SECOND_COUNT = 3600 MINUTE_SECOND_COUNT = 60 HALF_MID_DAY_DURATION_HOUR_COUNT = 2 + WEEK_DAY_COUNT = 7 + CENTURY_YEARS_COUNT = 100 # specifies the priority interpreting month and day order DEFAULT_LANGUAGE_FALLBACK_MDY: str = 'MDY' @@ -72,6 +110,9 @@ class Constants: MAX_TWO_DIGIT_YEAR_FUTURE_NUM: int = int(BaseDateTime.MaxTwoDigitYearFutureNum) MIN_TWO_DIGIT_YEAR_PAST_NUM: int = int(BaseDateTime.MinTwoDigitYearPastNum) + BASE_YEAR_PAST_CENTURY = 1900 + BASE_YEAR_CURRENT_CENTURY = 2000 + # Timex TIMEX_YEAR: str = "Y" TIMEX_MONTH: str = "M" @@ -85,11 +126,13 @@ class Constants: TIMEX_SECOND: str = "S" TIMEX_FUZZY: str = 'X' TIMEX_FUZZY_YEAR: str = "XXXX" + TIMEX_FUZZY_TWO_DIGIT_YEAR = "XX" TIMEX_FUZZY_MONTH: str = "XX" TIMEX_FUZZY_WEEK: str = "WXX" TIMEX_FUZZY_DAY: str = "XX" DATE_TIMEX_CONNECTOR: str = "-" TIME_TIMEX_CONNECTOR: str = ":" + TIMEX_SEPARATOR: str = "," GENERAL_PERIOD_PREFIX: str = "P" TIME_TIMEX_PREFIX: str = "T" @@ -99,6 +142,7 @@ class Constants: AFTERNOON: str = "TAF" EVENING: str = "TEV" DAYTIME: str = "TDT" + NIGHTTIME: str = "TNT" NIGHT: str = "TNI" BUSINESS_HOUR: str = "TBH" MEALTIME_BREAKFAST: str = "TMEB" @@ -109,8 +153,12 @@ class Constants: INVALID_DATE_STRING = "0001-01-01" COMPOSTIE_TIMEX_DELIMITER = "|" + # Timex non-constant + DURATION_UNIT_CHAR = ['D', 'W', 'M', 'Y', 'B'] + # Groups' names for named groups in regexes NEXT_GROUP_NAME = "next" + LAST_GROUP_NAME = "last" AM_GROUP_NAME = 'am' PM_GROUP_NAME = 'pm' AM_PM_GROUP_NAME = 'ampm' @@ -129,11 +177,38 @@ class Constants: WEEK_GROUP_NAME = 'week' WEEKDAY_GROUP_NAME = 'weekday' MONTH_GROUP_NAME = 'month' + MONTH_FROM_GROUP_NAME = "monthFrom" + MONTH_TO_GROUP_NAME = "monthTo" YEAR_GROUP_NAME = 'year' + THIS_YEAR_GROUP_NAME = 'thisyear' + THIS_MONTH_GROUP_NAME = 'thismonth' FULL_YEAR_GROUP_NAME = 'fullyear' HOUR_NUM_GROUP_NAME = 'hournum' TENS_GROUP_NAME = 'tens' YEAR_CJK_GROUP_NAME = 'yearCJK' + UNIT_OF_YEAR_GROUP_NAME = 'uoy' + LATER_GROUP_NAME = 'later' + FEW_GROUP_NAME = 'few' + LESS_GROUP_NAME = 'less' + MORE_GROUP_NAME = 'more' + SPECIFIC_END_OF_GROUP_NAME = "SpecificEndOf" + TOMORROW_GROUP_NAME = "tomorrow" + YESTERDAY_GROUP_NAME = "yesterday" + REST_OF_GROUP_NAME = "restof" + TO_DATE_GROUP_NAME = "toDate" + HALF_GROUP_NAME = "half" + FIRST_HALF_GROUP_NAME = 'firstHalf' + SECOND_HALF_GROUP_NAME = 'secondHalf' + HALF_TAG_GROUP_NAME = "halfTag" + UNIT_GROUP_NAME = "unit" + WITHIN_GROUP_NAME = "within" + EARLY_PREFIX_GROUP_NAME = "EarlyPrefix" + MID_PREFIX_GROUP_NAME = "MidPrefix" + LATE_PREFIX_GROUP_NAME = "LatePrefix" + SPECIAL_GROUP_NAME = 'special' + HALF_GROUP_NAME = 'half' + QUARTER_GROUP_NAME = 'quarter' + THREE_QUARTER_GROUP_NAME = 'threequarter' TIME_OF_DAY_GROUP_NAME = 'timeOfDay' BUSINESS_DAY_GROUP_NAME = 'business' @@ -141,6 +216,7 @@ class Constants: RIGHT_AM_PM_GROUP_NAME = 'rightDesc' MEALTIME_GROUP_NAME = 'mealTime' HOLIDAY_GROUP_NAME = 'holiday' + ANOTHER_GROUP_NAME = 'another' REL_MONTH = 'relmonth' FIRST_TWO_YEAR_NUM = 'firsttwoyearnum' @@ -148,6 +224,7 @@ class Constants: YEAR_CHINESE = 'yearCJK' OTHER = 'other' YEAR_RELATIVE = 'yearrel' + FOUR_DIGIT_YEAR_GROUP_NAME = "FourDigitYear" DAY_OF_MONTH = 'DayOfMonth' NEW_TIME = 'newTime' @@ -169,8 +246,16 @@ class Constants: MID_MORNING = 'midmorning' MID_NIGHT = 'midnight' + # Include the date mentioned, to make "before" -> "until" or "after" -> "since". Such as "on or earlier than 1/1/2016". + INCLUDE_GROUP_NAME = "include" + CARDINAL = 'cardinal' + DECADE_UNIT = '10Y' + FORTNIGHT_UNIT = '2W' + QUARTER_UNIT = '3MON' + WEEKEND_UNIT = 'WE' + DECADE = 'decade' CENTURY = 'century' REL_CENTURY = 'relcentury' @@ -198,10 +283,23 @@ class Constants: REL_LATE = 'RelLate' COMMENT_EARLY = 'early' COMMENT_LATE = 'late' + COMMENT_WEEK_OF = "WeekOf" + COMMENT_MONTH_OF = "MonthOf" HALF = 'half' HAS_MOD = 'mod' + LESS_THAN_MOD = 'less' + MORE_THAN_MOD = 'more' + + BEFORE_MOD = "before" + AFTER_MOD = "after" + UNTIL_MOD = "until" + SINCE_MOD = "since" + APPROX_MOD = "approx" + EARLY_MOD = "start" + MID_MOD = "mid" + LATE_MOD = "end" # Holidays # These should not be constants, they should go on the resources files for English @@ -225,9 +323,8 @@ class Constants: UTC_OFFSET_MINS_KEY = "utcOffsetMins" POSITIVE_SIGN = 1 NEGATIVE_SIGN = -1 - - # hours of one half day - HALF_DAY_HOUR_COUNT = 12 + RESOLVE_TIMEZONE = "resolveTimeZone" + TIMEZONE_TEXT = "timezoneText" class TimeTypeConstants: @@ -243,6 +340,7 @@ class TimeTypeConstants: VALUE: str = 'value' START_TIME: str = 'startTime' END_TIME: str = 'endTime' + DATETIME_ALT = "dateTimeAlt" START: str = 'start' END: str = 'end' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/data_structures.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/data_structures.py new file mode 100644 index 0000000000..39aadbb1aa --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/data_structures.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class TimeType(Enum): + CJKTime = 1 + LessTime = 2 + DigitTime = 3 + + +class PeriodType(Enum): + ShortTime = 1 + FullTime = 2 + + +class DatePeriodTimexType(Enum): + ByDay = 1 + ByWeek = 2 + ByFortNight = 3 + ByMonth = 4 + ByYear = 5 diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/date_time_recognizer.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/date_time_recognizer.py index ccbeaaa7dc..1b7298eb99 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/date_time_recognizer.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/date_time_recognizer.py @@ -8,6 +8,7 @@ from .utilities import DateTimeOptions from .models import DateTimeModel from .base_merged import BaseMergedExtractor, BaseMergedParser +from .base_minimal_merged import MinimalMergedExtractor, MinimalMergedParser from .english.common_configs import EnglishCommonDateTimeParserConfiguration from .english.merged_extractor_config import EnglishMergedExtractorConfiguration from .english.merged_parser_config import EnglishMergedParserConfiguration @@ -28,6 +29,19 @@ from .german.common_configs import GermanCommonDateTimeParserConfiguration from .german.merged_extractor_config import GermanMergedExtractorConfiguration from .german.merged_parser_config import GermanMergedParserConfiguration +from .dutch.common_configs import DutchCommonDateTimeParserConfiguration +from .dutch.merged_extractor_config import DutchMergedExtractorConfiguration +from .dutch.merged_parser_config import DutchMergedParserConfiguration +from .CJK.base_merged import BaseCJKMergedExtractor, BaseCJKMergedParser +from .japanese.merged_extractor_config import JapaneseMergedExtractorConfiguration +from .japanese.merged_parser_config import JapaneseMergedParserConfiguration +from .japanese.common_configs import JapaneseCommonDateTimeParserConfiguration +from .arabic.merged_extractor_config import ArabicMergedExtractorConfiguration +from .arabic.merged_parser_config import ArabicMergedParserConfiguration +from .arabic.common_configs import ArabicCommonDateTimeParserConfiguration +from .catalan.common_configs import CatalanCommonDateTimeParserConfiguration +from .catalan.merged_extractor_config import CatalanMergedExtractorConfiguration +from .catalan.merged_parser_config import CatalanMergedParserConfiguration class DateTimeRecognizer(Recognizer[DateTimeOptions]): @@ -45,11 +59,24 @@ def initialize_configuration(self): BaseMergedExtractor(EnglishMergedExtractorConfiguration(), options) )) + self.register_model('DateTimeModel', Culture.EnglishOthers, lambda options: DateTimeModel( + BaseMergedParser(EnglishMergedParserConfiguration( + EnglishCommonDateTimeParserConfiguration(dmyDateFormat=True)), options), + BaseMergedExtractor(EnglishMergedExtractorConfiguration(dmyDateFormat=True), options) + )) + self.register_model('DateTimeModel', Culture.Chinese, lambda options: DateTimeModel( ChineseMergedParser(), ChineseMergedExtractor(options) )) + self.register_model('DateTimeModel', Culture.Japanese, lambda options: DateTimeModel( + BaseCJKMergedParser(JapaneseMergedParserConfiguration( + JapaneseCommonDateTimeParserConfiguration() + ), options), + BaseCJKMergedExtractor(JapaneseMergedExtractorConfiguration(), options) + )) + self.register_model('DateTimeModel', Culture.Spanish, lambda options: DateTimeModel( BaseMergedParser(SpanishMergedParserConfiguration( SpanishCommonDateTimeParserConfiguration()), options), @@ -86,6 +113,24 @@ def initialize_configuration(self): BaseMergedExtractor(GermanMergedExtractorConfiguration(), options) )) + self.register_model('DateTimeModel', Culture.Dutch, lambda options: DateTimeModel( + BaseMergedParser(DutchMergedParserConfiguration( + DutchCommonDateTimeParserConfiguration()), options), + BaseMergedExtractor(DutchMergedExtractorConfiguration(), options) + )) + + self.register_model('DateTimeModel', Culture.Arabic, lambda options: DateTimeModel( + BaseMergedParser(ArabicMergedParserConfiguration( + ArabicCommonDateTimeParserConfiguration()), options), + BaseMergedExtractor(ArabicMergedExtractorConfiguration(), options) + )) + + self.register_model('DateTimeModel', Culture.Catalan, lambda options: DateTimeModel( + MinimalMergedParser(CatalanMergedParserConfiguration( + CatalanCommonDateTimeParserConfiguration()), options), + MinimalMergedExtractor(CatalanMergedExtractorConfiguration(), options) + )) + def get_datetime_model(self, culture: str = None, fallback_to_default_culture: bool = True) -> Model: return self.get_model('DateTimeModel', culture, fallback_to_default_culture) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/__init__.py new file mode 100644 index 0000000000..1db9c35b94 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/__init__.py @@ -0,0 +1,26 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from .base_configs import * +from .common_configs import * +from .duration_extractor_config import * +from .date_extractor_config import * +from .time_extractor_config import * +from .datetime_extractor_config import * +from .dateperiod_extractor_config import * +from .timeperiod_extractor_config import * +from .datetimeperiod_extractor_config import * +from .set_extractor_config import * +from .holiday_extractor_config import * +from .merged_extractor_config import * +from .duration_parser_config import * +from .date_parser_config import * +from .time_parser_config import * +from .datetime_parser_config import * +from .dateperiod_parser_config import * +from .timeperiod_parser_config import * +from .datetimeperiod_parser_config import * +from .set_parser_config import * +from .holiday_parser_config import * +from .merged_parser_config import * +from .parsers import * diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/base_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/base_configs.py new file mode 100644 index 0000000000..c31ce1de99 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/base_configs.py @@ -0,0 +1,95 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..base_date import DateTimeUtilityConfiguration + + +class DutchDateTimeUtilityConfiguration(DateTimeUtilityConfiguration): + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def range_prefix_regex(self) -> Pattern: + return self._range_prefix_regex + + @property + def ago_regex(self) -> Pattern: + return self._ago_regex + + @property + def later_regex(self) -> Pattern: + return self._later_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 am_desc_regex(self) -> Pattern: + return self._am_desc_regex + + @property + def pm_desc__regex(self) -> Pattern: + return self._pm_desc__regex + + @property + def am_pm_desc_regex(self) -> Pattern: + return self._am_pm_desc_regex + + @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 common_date_prefix_regex(self) -> Pattern: + return self._common_date_prefix_regex + + @property + def since_year_suffix_regex(self) -> Pattern: + return self._since_year_suffix_regex + + def __init__(self): + self._later_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LaterRegex) + self._ago_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AgoRegex) + self._in_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.InConnectorRegex) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RangeUnitRegex) + self._am_desc_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AmDescRegex) + self._pm_desc__regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PmDescRegex) + self._am_pm_desc_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AmPmDescRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WithinNextPrefixRegex) + self._common_date_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.CommonDatePrefixRegex) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._range_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RangePrefixRegex + ) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DateUnitRegex + ) + self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.SinceYearSuffixRegex) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/common_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/common_configs.py new file mode 100644 index 0000000000..6e081aa5fe --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/common_configs.py @@ -0,0 +1,204 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Dict, Pattern + +from recognizers_number import BaseNumberExtractor, DutchCardinalExtractor, DutchIntegerExtractor, \ + DutchOrdinalExtractor, BaseNumberParser, DutchNumberParserConfiguration + +from ...resources import DutchDateTime, BaseDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from ..base_date import BaseDateExtractor, BaseDateParser +from ..base_time import BaseTimeExtractor +from ..base_duration import BaseDurationExtractor, BaseDurationParser +from ..base_dateperiod import BaseDatePeriodExtractor, BaseDatePeriodParser +from ..base_timeperiod import BaseTimePeriodExtractor, BaseTimePeriodParser +from ..base_datetime import BaseDateTimeExtractor, BaseDateTimeParser +from ..base_datetimeperiod import BaseDateTimePeriodExtractor, BaseDateTimePeriodParser +from ..base_timezone import BaseTimeZoneParser +from .base_configs import DutchDateTimeUtilityConfiguration +from .duration_extractor_config import DutchDurationExtractorConfiguration +from .date_extractor_config import DutchDateExtractorConfiguration +from .time_extractor_config import DutchTimeExtractorConfiguration +from .datetime_extractor_config import DutchDateTimeExtractorConfiguration +from .dateperiod_extractor_config import DutchDatePeriodExtractorConfiguration +from .timeperiod_extractor_config import DutchTimePeriodExtractorConfiguration +from .datetimeperiod_extractor_config import DutchDateTimePeriodExtractorConfiguration +from .duration_parser_config import DutchDurationParserConfiguration +from .date_parser_config import DutchDateParserConfiguration +from .time_parser_config import DutchTimeParserConfiguration +from .datetime_parser_config import DutchDateTimeParserConfiguration +from .dateperiod_parser_config import DutchDatePeriodParserConfiguration +from .timeperiod_parser_config import DutchTimePeriodParserConfiguration +from .datetimeperiod_parser_config import DutchDateTimePeriodParserConfiguration +from .parsers import DutchTimeParser + + +class DutchCommonDateTimeParserConfiguration(BaseDateParserConfiguration): + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def date_period_parser(self) -> DateTimeParser: + return self._date_period_parser + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def date_time_period_parser(self) -> DateTimeParser: + return self._date_time_period_parser + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def unit_value_map(self) -> Dict[str, int]: + return self._unit_value_map + + @property + def season_map(self) -> Dict[str, str]: + return self._season_map + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def double_numbers(self) -> Dict[str, int]: + return self._double_numbers + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + def __init__(self): + super().__init__() + self._time_zone_parser = BaseTimeZoneParser() + self._utility_configuration = DutchDateTimeUtilityConfiguration() + self._unit_map = DutchDateTime.UnitMap + self._unit_value_map = DutchDateTime.UnitValueMap + self._season_map = DutchDateTime.SeasonMap + self._cardinal_map = DutchDateTime.CardinalMap + self._day_of_week = DutchDateTime.DayOfWeek + self._month_of_year = DutchDateTime.MonthOfYear + self._numbers = DutchDateTime.Numbers + self._double_numbers = DutchDateTime.DoubleNumbers + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + + self._cardinal_extractor = DutchCardinalExtractor() + self._integer_extractor = DutchIntegerExtractor() + self._ordinal_extractor = DutchOrdinalExtractor() + + self._day_of_month = { + **BaseDateTime.DayOfMonthDictionary, **DutchDateTime.DayOfMonth} + self._number_parser = BaseNumberParser( + DutchNumberParserConfiguration()) + self._date_extractor = BaseDateExtractor( + DutchDateExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor( + DutchTimeExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._date_period_extractor = BaseDatePeriodExtractor( + DutchDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + DutchTimePeriodExtractorConfiguration()) + self._date_time_extractor = BaseDateTimeExtractor( + DutchDateTimeExtractorConfiguration()) + self._date_time_period_extractor = BaseDateTimePeriodExtractor( + DutchDateTimePeriodExtractorConfiguration()) + self._duration_parser = BaseDurationParser( + DutchDurationParserConfiguration(self)) + self._date_parser = BaseDateParser(DutchDateParserConfiguration(self)) + self._time_parser = DutchTimeParser( + DutchTimeParserConfiguration(self)) + self._date_period_parser = BaseDatePeriodParser( + DutchDatePeriodParserConfiguration(self)) + self._time_period_parser = BaseTimePeriodParser( + DutchTimePeriodParserConfiguration(self)) + self._date_time_parser = BaseDateTimeParser( + DutchDateTimeParserConfiguration(self)) + self._date_time_period_parser = BaseDateTimePeriodParser( + DutchDateTimePeriodParserConfiguration(self)) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/date_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/date_extractor_config.py new file mode 100644 index 0000000000..74ec3cabda --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/date_extractor_config.py @@ -0,0 +1,243 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, List, Dict +from recognizers_number import (BaseNumberExtractor, BaseNumberParser, + DutchOrdinalExtractor, DutchIntegerExtractor, DutchNumberParserConfiguration) +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..base_duration import BaseDurationExtractor +from ..base_date import DateExtractorConfiguration +from ..utilities import DateTimeUtilityConfiguration +from .duration_extractor_config import DutchDurationExtractorConfiguration +from .base_configs import DutchDateTimeUtilityConfiguration +from ..constants import Constants +from ...resources.base_date_time import BaseDateTime + + +class DutchDateExtractorConfiguration(DateExtractorConfiguration): + + @property + def week_day_start(self) -> Pattern: + return self._week_day_start + + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def date_regex_list(self) -> List[Pattern]: + return self._date_regex_list + + @property + def implicit_date_list(self) -> List[Pattern]: + return self._implicit_date_list + + @property + def month_end(self) -> Pattern: + return self._month_end + + @property + def week_day_end(self) -> Pattern: + return self._week_day_end + + @property + def of_month(self) -> Pattern: + return self._of_month + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def for_the_regex(self) -> Pattern: + return self._for_the_regex + + @property + def week_day_and_day_of_month_regex(self) -> Pattern: + return self._week_day_and_day_of_month_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def prefix_article_regex(self) -> Pattern: + return self._prefix_article_regex + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_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 utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def strict_relative_regex(self) -> Pattern: + return self._strict_relative_regex + + @property + def range_connector_symbol_regex(self) -> Pattern: + return self._range_connector_symbol_regex + + @property + def year_suffix(self) -> Pattern: + return self._year_suffix + + @property + def more_than_regex(self) -> Pattern: + return self._more_than_regex + + @property + def less_than_regex(self) -> Pattern: + return self._less_than_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 since_year_suffix_regex(self) -> Pattern: + return self._since_year_suffix_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + def __init__(self): + self._check_both_before_after = False + if DutchDateTime.DefaultLanguageFallback == Constants.DEFAULT_LANGUAGE_FALLBACK_DMY: + date_extractor_4 = DutchDateTime.DateExtractor5 + date_extractor_5 = DutchDateTime.DateExtractor8 + date_extractor_6 = DutchDateTime.DateExtractor9L + date_extractor_7 = DutchDateTime.DateExtractor9S + date_extractor_8 = DutchDateTime.DateExtractor4 + date_extractor_9 = DutchDateTime.DateExtractor6 + date_extractor_10 = DutchDateTime.DateExtractor7L + date_extractor_11 = DutchDateTime.DateExtractor7S + else: + date_extractor_4 = DutchDateTime.DateExtractor4 + date_extractor_5 = DutchDateTime.DateExtractor6 + date_extractor_6 = DutchDateTime.DateExtractor7L + date_extractor_7 = DutchDateTime.DateExtractor7S + date_extractor_8 = DutchDateTime.DateExtractor5 + date_extractor_9 = DutchDateTime.DateExtractor8 + date_extractor_10 = DutchDateTime.DateExtractor9L + date_extractor_11 = DutchDateTime.DateExtractor9S + + self._date_regex_list = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.DateExtractor1), + RegExpUtility.get_safe_reg_exp(DutchDateTime.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(date_extractor_10), + RegExpUtility.get_safe_reg_exp(date_extractor_11), + RegExpUtility.get_safe_reg_exp(DutchDateTime.DateExtractorA), + ] + + self._implicit_date_list = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.OnRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.RelaxedOnRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.SpecialDayRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.ThisRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.LastDateRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.NextDateRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.SingleWeekDayRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekDayOfMonthRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.SpecialDate), + RegExpUtility.get_safe_reg_exp(DutchDateTime.SpecialDayWithNumRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.RelativeWeekDayRegex), + ] + self._month_end = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthEnd) + self._of_month = RegExpUtility.get_safe_reg_exp(DutchDateTime.OfMonth) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DateUnitRegex) + self._for_the_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ForTheRegex) + self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayAndDayOfMonthRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeMonthRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayRegex) + self._day_of_week = DutchDateTime.DayOfWeek + self._ordinal_extractor = DutchOrdinalExtractor() + self._integer_extractor = DutchIntegerExtractor() + self._number_parser = BaseNumberParser( + DutchNumberParserConfiguration()) + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._utility_configuration = DutchDateTimeUtilityConfiguration() + self._range_connector_symbol_regex = RegExpUtility.get_safe_reg_exp( + BaseDateTime.RangeConnectorSymbolRegex + ) + self._strict_relative_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.StrictRelativeRegex + ) + self._year_suffix = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearSuffix + ) + self._month_of_year = DutchDateTime.MonthOfYear + self._prefix_article_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrefixArticleRegex + ) + self._week_day_end = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayEnd + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MoreThanRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LessThanRegex + ) + self._in_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.InConnectorRegex + ) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RangeUnitRegex + ) + self._since_year_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SinceYearSuffixRegex + ) + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayAndDayRegex + ) + self._week_day_start = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayStart + ) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/date_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/date_parser_config.py new file mode 100644 index 0000000000..77f9b51f8d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/date_parser_config.py @@ -0,0 +1,240 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, List, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..utilities import DateTimeUtilityConfiguration +from ..base_date import DateParserConfiguration +from ..base_configs import BaseDateParserConfiguration +from .date_extractor_config import DutchDateExtractorConfiguration + + +class DutchDateParserConfiguration(DateParserConfiguration): + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def date_regex(self) -> List[Pattern]: + return self._date_regex + + @property + def on_regex(self) -> Pattern: + return self._on_regex + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def special_day_with_num_regex(self) -> Pattern: + return self._special_day_with_num_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def week_day_of_month_regex(self) -> Pattern: + return self._week_day_of_month_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + @property + def for_the_regex(self) -> Pattern: + return self._for_the_regex + + @property + def week_day_and_day_of_month_regex(self) -> Pattern: + return self._week_day_and_day_of_month_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def relative_week_day_regex(self) -> Pattern: + return self._relative_week_day_regex + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def date_token_prefix(self) -> str: + return self._date_token_prefix + + _relative_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeDayRegex) + _next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + _past_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex) + + def __init__(self, config: BaseDateParserConfiguration): + self._ordinal_extractor = config.ordinal_extractor + self._integer_extractor = config.integer_extractor + self._cardinal_extractor = config.cardinal_extractor + self._date_extractor = config.date_extractor + self._duration_extractor = config.duration_extractor + self._number_parser = config.number_parser + self._duration_parser = config.duration_parser + self._month_of_year = config.month_of_year + self._day_of_month = config.day_of_month + self._day_of_week = config.day_of_week + self._unit_map = config.unit_map + self._cardinal_map = config.cardinal_map + self._date_regex = (DutchDateExtractorConfiguration()).date_regex_list + self._on_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.OnRegex) + self._special_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecialDayRegex) + self._special_day_with_num_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecialDayWithNumRegex) + self._next_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextDateRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DateUnitRegex) + self._month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LastDateRegex) + self._this_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ThisRegex) + self._week_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayOfMonthRegex) + self._for_the_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ForTheRegex) + self._week_day_and_day_of_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayAndDayOfMonthRegex) + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayAndDayRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeMonthRegex) + self._relative_week_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeWeekDayRegex) + self._utility_configuration = config.utility_configuration + self._date_token_prefix = DutchDateTime.DateTokenPrefix + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + + def get_swift_day(self, source: str) -> int: + trimmed_text = source.strip().lower() + swift = 0 + matches = regex.search( + DutchDateParserConfiguration._relative_day_regex, source) + if trimmed_text == 'vandaag': + swift = 0 + elif trimmed_text == 'morgen': + swift = 1 + elif trimmed_text == 'gisteren': + swift = -1 + elif trimmed_text.endswith('overmorgen'): + swift = 2 + elif trimmed_text.endswith('eergisteren'): + swift = -2 + elif trimmed_text.endswith('dag na'): + swift = 1 + elif trimmed_text.endswith('de dag ervoor'): + swift = -1 + elif matches: + swift = self.get_swift(source) + + return swift + + def get_swift_month(self, source: str) -> int: + return self.get_swift(source) + + def get_swift(self, source: str) -> int: + trimmed_text = source.strip().lower() + swift = 0 + next_prefix_matches = regex.search( + DutchDateParserConfiguration._next_prefix_regex, trimmed_text) + past_prefix_matches = regex.search( + DutchDateParserConfiguration._past_prefix_regex, trimmed_text) + if next_prefix_matches: + swift = 1 + elif past_prefix_matches: + swift = -1 + + return swift + + def is_cardinal_last(self, source: str) -> bool: + trimmed_text = source.strip().lower() + return not regex.search(DutchDateParserConfiguration._past_prefix_regex, trimmed_text) is None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/dateperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/dateperiod_extractor_config.py new file mode 100644 index 0000000000..53c2e48ed0 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/dateperiod_extractor_config.py @@ -0,0 +1,371 @@ +# 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.dutch.extractors import DutchIntegerExtractor, DutchCardinalExtractor +from recognizers_number.number.dutch.parsers import DutchNumberParserConfiguration +from ...resources.base_date_time import BaseDateTime +from ...resources.dutch_date_time import DutchDateTime +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 DutchDurationExtractorConfiguration +from .date_extractor_config import DutchDateExtractorConfiguration +from recognizers_text.extractor import Extractor +from recognizers_number import DutchOrdinalExtractor, BaseNumberExtractor, DutchCardinalExtractor + + +class DutchDatePeriodExtractorConfiguration(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 + + @property + def week_of_month_regex(self) -> Pattern: + return self._week_of_month_regex + + @property + def written_month_regex(self) -> Pattern: + return self._written_month_regex + + @property + def first_last_regex(self) -> Pattern: + return self._first_last_regex + + @property + def between_token_regex(self) -> Pattern: + return self._between_token_regex + + def __init__(self): + self._all_half_year_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.AllHalfYearRegex) + self._week_day_of_month_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekDayOfMonthRegex) + self._complex_date_period_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.ComplexDatePeriodRegex) + self._rest_of_date_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.RestOfDateRegex) + self._which_week_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WhichWeekRegex) + self._this_prefix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.ThisPrefixRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.NextPrefixRegex) + self._past_prefix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.PastSuffixRegex) + self._month_suffix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MonthSuffixRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.RelativeMonthRegex) + self._written_month_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WrittenMonthRegex) + self._week_day_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekDayRegex) + self._day_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.DayRegex) + self._range_connector_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.RangeConnectorRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeUnitRegex) + self._first_last_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.FirstLastRegex) + self._between_token_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.BetweenTokenRegex) + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PastSuffixRegex) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._week_of_month_regex = DutchDateTime.WeekOfMonthRegex + self._simple_cases_regexes = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.SimpleCasesRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.BetweenRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.OneWordPeriodRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.MonthWithYear), + RegExpUtility.get_safe_reg_exp(DutchDateTime.MonthNumWithYear), + RegExpUtility.get_safe_reg_exp(DutchDateTime.YearRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekOfMonthRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekOfYearRegex), + RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthFrontBetweenRegex), + RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthFrontSimpleCasesRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.QuarterRegex), + RegExpUtility.get_safe_reg_exp( + DutchDateTime.QuarterRegexYearFront), + RegExpUtility.get_safe_reg_exp(DutchDateTime.AllHalfYearRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.SeasonRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.WhichWeekRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.RestOfDateRegex), + RegExpUtility.get_safe_reg_exp( + DutchDateTime.LaterEarlyPeriodRegex), + RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekWithWeekDayRangeRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.YearPlusNumberRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.DecadeWithCenturyRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.RelativeDecadeRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.ReferenceDatePeriodRegex) + ] + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._illegal_year_regex = RegExpUtility.get_safe_reg_exp( + BaseDateTime.IllegalYearRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TillRegex) + self._followed_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FollowedDateUnit) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NumberCombinedWithDateUnit) + self._past_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self._week_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekOfRegex) + self._month_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthOfRegex) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DateUnitRegex) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WithinNextPrefixRegex) + self._in_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.InConnectorRegex) + self._range_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RangeUnitRegex) + + self.from_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FromRegex) + self.before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeRegex) + + self._date_point_extractor = BaseDateExtractor( + DutchDateExtractorConfiguration()) + self._integer_extractor = DutchIntegerExtractor() + self._number_parser = BaseNumberParser( + DutchNumberParserConfiguration()) + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._now_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NowRegex) + self._future_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FutureSuffixRegex + ) + self._ago_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AgoRegex + ) + self._later_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LaterRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LessThanRegex + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MoreThanRegex + ) + self._duration_date_restrictions = DutchDateTime.DurationDateRestrictions + self._year_period_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearPeriodRegex + ) + self._month_num_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthNumRegex + ) + self._century_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.CenturySuffixRegex + ) + self._decade_with_century_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DecadeWithCenturyRegex + ) + self._ordinal_extractor = DutchOrdinalExtractor() + self._cardinal_extractor = DutchCardinalExtractor() + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex + ) + self._cardinal_extractor = DutchCardinalExtractor() + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeUnitRegex) + + 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.between_token_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.range_connector_regex.search(source) is None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/dateperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/dateperiod_parser_config.py new file mode 100644 index 0000000000..4d12bb1773 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/dateperiod_parser_config.py @@ -0,0 +1,423 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..base_configs import BaseDateParserConfiguration +from ..base_dateperiod import DatePeriodParserConfiguration + + +class DutchDatePeriodParserConfiguration(DatePeriodParserConfiguration): + @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 check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def reference_date_period_regex(self) -> Pattern: + return self._reference_date_period_regex + + @property + def decade_with_century_regex(self) -> Pattern: + return self._decade_with_century_regex + + @property + def relative_regex(self) -> Pattern: + return self._relative_regex + + @property + def ago_regex(self) -> Pattern: + return self._ago_regex + + @property + def later_regex(self) -> Pattern: + return self._later_regex + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def month_front_between_regex(self) -> Pattern: + return self._month_front_between_regex + + @property + def between_regex(self) -> Pattern: + return self._between_regex + + @property + def month_front_simple_cases_regex(self) -> Pattern: + return self._month_front_simple_cases_regex + + @property + def simple_cases_regex(self) -> Pattern: + return self._simple_cases_regex + + @property + def one_word_period_regex(self) -> Pattern: + return self._one_word_period_regex + + @property + def month_with_year(self) -> Pattern: + return self._month_with_year + + @property + def month_num_with_year(self) -> Pattern: + return self._month_num_with_year + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def in_connector_regex(self) -> Pattern: + return self._in_connector_regex + + @property + def week_of_month_regex(self) -> Pattern: + return self._week_of_month_regex + + @property + def week_of_year_regex(self) -> Pattern: + return self._week_of_year_regex + + @property + def quarter_regex(self) -> Pattern: + return self._quarter_regex + + @property + def quarter_regex_year_front(self) -> Pattern: + return self._quarter_regex_year_front + + @property + def all_half_year_regex(self) -> Pattern: + return self._all_half_year_regex + + @property + def season_regex(self) -> Pattern: + return self._season_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 which_week_regex(self) -> Pattern: + return self._which_week_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._past_prefix_regex + + @property + def this_prefix_regex(self) -> Pattern: + return self._this_prefix_regex + + @property + def rest_of_date_regex(self) -> Pattern: + return self._rest_of_date_regex + + @property + def later_early_period_regex(self) -> Pattern: + return self._later_early_period_regex + + @property + def week_with_week_day_range_regex(self) -> Pattern: + return self._week_with_week_day_range_regex + + @property + def unspecific_end_of_range_regex(self) -> Pattern: + return self._unspecific_end_of_range_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def season_map(self) -> Dict[str, str]: + return self._season_map + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def complex_dateperiod_regex(self) -> Pattern: + return self._complex_dateperiod_regex + + @property + def relative_decade_regex(self) -> Pattern: + return self._relative_decade_regex + + @property + def dynasty_year_regex(self) -> Pattern: + return None + + @property + def dynasty_year_map(self) -> Dict[str, int]: + return None + + @property + def year_plus_number_regex(self) -> Pattern: + return self._year_plus_number_regex + + @property + def year_period_regex(self) -> Pattern: + return self._year_period_regex + + @property + def within_next_prefix_regex(self) -> Pattern: + return self._within_next_prefix_regex + + @property + def century_suffix_regex(self) -> Pattern: + return self._century_suffix_regex + + @property + def first_last_regex(self) -> Pattern: + return self._first_last_regex + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def after_next_suffix_regex(self) -> Pattern: + return self._after_next_suffix_regex + + def __init__(self, config: BaseDateParserConfiguration): + self._relative_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeRegex) + self._later_regex = DutchDateTime.LaterRegex + self._ago_regex = DutchDateTime.AgoRegex + self._token_before_date = DutchDateTime.TokenBeforeDate + self.cardinal_extractor = config.cardinal_extractor + self.number_parser = config.number_parser + self._duration_extractor = config.duration_extractor + self._date_extractor = config.date_extractor + self._duration_parser = config.duration_parser + self._date_parser = config.date_parser + + self._after_next_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AfterNextSuffixRegex) + self._year_plus_number_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearPlusNumberRegex) + self._year_period_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearPeriodRegex) + self._month_front_between_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthFrontBetweenRegex) + self._between_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BetweenRegex) + self._month_front_simple_cases_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthFrontSimpleCasesRegex) + self._simple_cases_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SimpleCasesRegex) + self._one_word_period_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.OneWordPeriodRegex) + self._month_with_year = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthWithYear) + self._month_num_with_year = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthNumWithYear) + self._year_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearRegex) + self._past_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PastSuffixRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self.number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NumberCombinedWithDurationUnit) + self._week_of_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekOfMonthRegex) + self._week_of_year_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekOfYearRegex) + self._quarter_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.QuarterRegex) + self._quarter_regex_year_front = RegExpUtility.get_safe_reg_exp( + DutchDateTime.QuarterRegexYearFront) + self._all_half_year_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AllHalfYearRegex) + self._season_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SeasonRegex) + self._which_week_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WhichWeekRegex) + self._week_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekOfRegex) + self._month_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MonthOfRegex) + self._rest_of_date_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RestOfDateRegex) + self._later_early_period_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LaterEarlyPeriodRegex) + self._week_with_week_day_range_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekWithWeekDayRangeRegex) + self._unspecific_end_of_range_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.UnspecificEndOfRangeRegex) + + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self._past_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex) + self._this_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ThisPrefixRegex) + self._next_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FutureSuffixRegex) + self._past_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PastSuffixRegex) + + self._in_connector_regex = config.utility_configuration.in_connector_regex + self._unit_map = config.unit_map + self._cardinal_map = config.cardinal_map + self._day_of_month = config.day_of_month + self._month_of_year = config.month_of_year + self._season_map = config.season_map + self._now_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NowRegex) + self._decade_with_century_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DecadeWithCenturyRegex) + self._complex_dateperiod_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ComplexDatePeriodRegex + ) + self._relative_decade_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeDecadeRegex + ) + self._reference_date_period_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ReferenceDatePeriodRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LessThanRegex + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MoreThanRegex + ) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WithinNextPrefixRegex + ) + self._century_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.CenturySuffixRegex + ) + self._first_last_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FirstLastRegex + ) + self._special_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecialDayRegex + ) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + + def get_swift_day_or_month(self, source: str) -> int: + trimmed_source = source.strip().lower() + swift = 0 + if self.after_next_suffix_regex.search(trimmed_source): + swift = 2 + elif self.next_prefix_regex.search(trimmed_source): + swift = 1 + elif self.previous_prefix_regex.search(trimmed_source): + swift = -1 + + return swift + + def get_swift_year(self, source: str) -> int: + trimmed_source = source.strip().lower() + swift = -10 + + if self.after_next_suffix_regex.search(trimmed_source): + swift = 2 + elif self.next_prefix_regex.search(trimmed_source): + swift = 1 + elif self.previous_prefix_regex.search(trimmed_source): + swift = -1 + elif self.this_prefix_regex.search(trimmed_source): + swift = 0 + + return swift + + def is_future(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.startswith(o) for o in DutchDateTime.FutureTerms) + + def is_year_to_date(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in DutchDateTime.YearToDateTerms) + + def is_month_to_date(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in DutchDateTime.MonthToDateTerms) + + def is_week_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return (any(trimmed_source.endswith(o) for o in DutchDateTime.WeekTerms) or + (any(trimmed_source.__contains__(o) for o in DutchDateTime.WeekTerms) and + (self._next_suffix_regex.search(trimmed_source) or + self._past_suffix_regex.search(trimmed_source)))) and not\ + any(trimmed_source.endswith(o) + for o in DutchDateTime.WeekendTerms) + + def is_weekend(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in DutchDateTime.WeekendTerms) + + def is_month_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in DutchDateTime.MonthTerms) + + def is_year_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in DutchDateTime.YearTerms) + + def is_last_cardinal(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in DutchDateTime.LastCardinalTerms) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetime_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetime_extractor_config.py new file mode 100644 index 0000000000..312a5cacd5 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetime_extractor_config.py @@ -0,0 +1,161 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern +import regex + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..base_date import BaseDateExtractor +from ..base_time import BaseTimeExtractor +from ..base_duration import BaseDurationExtractor +from ..base_datetime import DateTimeExtractorConfiguration +from .base_configs import DutchDateTimeUtilityConfiguration +from .date_extractor_config import DutchDateExtractorConfiguration +from .time_extractor_config import DutchTimeExtractorConfiguration +from .duration_extractor_config import DutchDurationExtractorConfiguration + + +class DutchDateTimeExtractorConfiguration(DateTimeExtractorConfiguration): + + @property + def date_point_extractor(self) -> DateTimeExtractor: + return self._date_point_extractor + + @property + def time_point_extractor(self) -> DateTimeExtractor: + return self._time_point_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def suffix_regex(self) -> Pattern: + return self._suffix_regex + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def time_of_today_after_regex(self) -> Pattern: + return self._time_of_today_after_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def simple_time_of_today_after_regex(self) -> Pattern: + return self._simple_time_of_today_after_regex + + @property + def night_regex(self) -> Pattern: + return self._night_regex + + @property + def time_of_today_before_regex(self) -> Pattern: + return self._time_of_today_before_regex + + @property + def simple_time_of_today_before_regex(self) -> Pattern: + return self._simple_time_of_today_before_regex + + @property + def specific_end_of_regex(self) -> Pattern: + return self._specific_end_of_regex + + @property + def unspecific_end_of_regex(self) -> Pattern: + return self._unspecific_end_of_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def utility_configuration(self) -> DutchDateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def number_as_time_regex(self) -> Pattern: + return self._number_as_time_regex + + @property + def date_number_connector_regex(self) -> Pattern: + return self._date_number_connector_regex + + @property + def suffix_after_regex(self) -> Pattern: + return self._suffix_after_regex + + @property + def year_suffix(self) -> Pattern: + return self._year_suffix + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + def __init__(self): + super().__init__() + self.preposition_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrepositionRegex) + self._now_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NowRegex) + self._suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixRegex) + + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeOfDayRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeOfDayRegex) + self._time_of_today_after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeOfTodayAfterRegex) + self._time_of_today_before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeOfTodayBeforeRegex) + self._simple_time_of_today_after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SimpleTimeOfTodayAfterRegex) + self._simple_time_of_today_before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SimpleTimeOfTodayBeforeRegex) + self._specific_end_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificEndOfRegex) + self._unspecific_end_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.UnspecificEndOfRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex) + self.connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ConnectorRegex) + self._night_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NightRegex) + self._number_as_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NumberAsTimeRegex) + self._date_number_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DateNumberConnectorRegex + ) + self._suffix_after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixAfterRegex + ) + self._year_suffix = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearSuffix + ) + self._year_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearRegex + ) + + self._date_point_extractor = BaseDateExtractor( + DutchDateExtractorConfiguration()) + self._time_point_extractor = BaseTimeExtractor( + DutchTimeExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._utility_configuration = DutchDateTimeUtilityConfiguration() + + def is_connector_token(self, source: str) -> bool: + return source.strip() == '' or regex.search(self.connector_regex, source) is not None or regex.search(self.preposition_regex, source) is not None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetime_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetime_parser_config.py new file mode 100644 index 0000000000..e25246d156 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetime_parser_config.py @@ -0,0 +1,215 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.parsers import BaseNumberParser +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..utilities import DateTimeUtilityConfiguration +from ..base_configs import BaseDateParserConfiguration +from ..base_datetime import DateTimeParserConfiguration, MatchedTimex +from ..constants import Constants + + +class DutchDateTimeParserConfiguration(DateTimeParserConfiguration): + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def token_before_time(self) -> str: + return self._token_before_time + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def am_time_regex(self) -> Pattern: + return self._am_time_regex + + @property + def pm_time_regex(self) -> Pattern: + return self._pm_time_regex + + @property + def simple_time_of_today_after_regex(self) -> Pattern: + return self._simple_time_of_today_after_regex + + @property + def simple_time_of_today_before_regex(self) -> Pattern: + return self._simple_time_of_today_before_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def specific_end_of_regex(self) -> Pattern: + return self._specific_end_of_regex + + @property + def unspecific_end_of_regex(self) -> Pattern: + return self._unspecific_end_of_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def night_time_regex(self) -> Pattern: + return self._night_time_regex + + @property + def morning_time_regex(self) -> Pattern: + return self._morning_time_regex + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def now_time_regex(self) -> Pattern: + return self._now_time_regex + + @property + def recently_time_regex(self) -> Pattern: + return self._recently_time_regex + + @property + def asap_time_regex(self) -> Pattern: + return self._asap_time_regex + + + def __init__(self, config: BaseDateParserConfiguration): + self._token_before_date = DutchDateTime.TokenBeforeDate + self._token_before_time = DutchDateTime.TokenBeforeTime + self._now_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NowRegex) + self._am_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AMTimeRegex) + self._pm_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PMTimeRegex) + self._simple_time_of_today_after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SimpleTimeOfTodayAfterRegex) + self._simple_time_of_today_before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SimpleTimeOfTodayBeforeRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeOfDayRegex) + self._specific_end_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificEndOfRegex) + self._unspecific_end_of_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.UnspecificEndOfRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex) + + self.next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self.previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex) + self._night_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NightTimeRegex) + self._morning_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MorningTimeRegex) + self._now_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NowTimeRegex) + self._recently_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RecentlyTimeRegex) + self._asap_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AsapTimeRegex) + + self._date_extractor = config.date_extractor + self._time_extractor = config.time_extractor + self._date_parser = config.date_parser + self._time_parser = config.time_parser + self._numbers = config.numbers + self._cardinal_extractor = config.cardinal_extractor + self._number_parser = config.number_parser + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + self._unit_map = config.unit_map + self._utility_configuration = config.utility_configuration + + def have_ambiguous_token(self, source: str, matched_text: str) -> bool: + return False + + def get_matched_now_timex(self, source: str) -> MatchedTimex: + source = source.strip().lower() + + if self.now_time_regex.search(source): + timex = 'PRESENT_REF' + elif self.recently_time_regex.search(source): + timex = 'PAST_REF' + elif self.asap_time_regex.search(source): + timex = 'FUTURE_REF' + else: + return MatchedTimex(False, None) + + return MatchedTimex(True, timex) + + def get_swift_day(self, source: str) -> int: + source = source.strip().lower() + swift = 0 + + if self.previous_prefix_regex.search(source): + swift = -1 + elif self.next_prefix_regex.search(source): + swift = 1 + + return swift + + def get_hour(self, source: str, hour: int) -> int: + source = source.strip().lower() + result = hour + + if self.morning_time_regex.search(source) and hour >= Constants.HALF_DAY_HOUR_COUNT: + result -= 12 + elif not (self.morning_time_regex.search(source) or self.night_time_regex.search(source)) \ + and hour < Constants.HALF_DAY_HOUR_COUNT: + result += 12 + + return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetimeperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetimeperiod_extractor_config.py new file mode 100644 index 0000000000..71f5996d81 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetimeperiod_extractor_config.py @@ -0,0 +1,275 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Pattern + +from recognizers_number import BaseNumberExtractor, DutchCardinalExtractor +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..base_datetimeperiod import DateTimePeriodExtractorConfiguration, MatchedIndex +from ..base_date import BaseDateExtractor +from ..base_time import BaseTimeExtractor +from ..base_duration import BaseDurationExtractor +from ..base_timeperiod import BaseTimePeriodExtractor +from ..base_datetime import BaseDateTimeExtractor +from ..base_timezone import BaseTimeZoneExtractor +from .date_extractor_config import DutchDateExtractorConfiguration +from .time_extractor_config import DutchTimeExtractorConfiguration +from .duration_extractor_config import DutchDurationExtractorConfiguration +from .timeperiod_extractor_config import DutchTimePeriodExtractorConfiguration +from .timezone_extractor_config import DutchTimeZoneExtractorConfiguration +from .datetime_extractor_config import DutchDateTimeExtractorConfiguration + + +class DutchDateTimePeriodExtractorConfiguration(DateTimePeriodExtractorConfiguration): + @property + def check_both_before_after(self) -> Pattern: + return self._check_both_before_after + + @property + def suffix_regex(self) -> Pattern: + return self._suffix_regex + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def single_date_extractor(self) -> DateTimeExtractor: + return self._single_date_extractor + + @property + def single_time_extractor(self) -> DateTimeExtractor: + return self._single_time_extractor + + @property + def single_date_time_extractor(self) -> DateTimeExtractor: + return self._single_date_time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def time_zone_extractor(self) -> DateTimeExtractor: + return self._time_zone_extractor + + @property + def simple_cases_regexes(self) -> List[Pattern]: + return self._simple_cases_regexes + + @property + def preposition_regex(self) -> Pattern: + return self._preposition_regex + + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def period_time_of_day_with_date_regex(self) -> Pattern: + return self._period_time_of_day_with_date_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 time_unit_regex(self) -> Pattern: + return self._time_unit_regex + + @property + def previous_prefix_regex(self) -> Pattern: + return self._past_prefix_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def relative_time_unit_regex(self) -> Pattern: + return self._relative_time_unit_regex + + @property + def rest_of_date_time_regex(self) -> Pattern: + return self._rest_of_date_time_regex + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def general_ending_regex(self) -> Pattern: + return self._general_ending_regex + + @property + def middle_pause_regex(self) -> Pattern: + return self._middle_pause_regex + + @property + def within_next_prefix_regex(self) -> Pattern: + return self._within_next_prefix_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def future_suffix_regex(self) -> Pattern: + return self._future_suffix_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def am_desc_regex(self) -> Pattern: + return self._am_desc_regex + + @property + def pm_desc_regex(self) -> Pattern: + return self._pm_desc_regex + + @property + def prefix_day_regex(self) -> Pattern: + return self._prefix_day_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + def __init__(self): + super().__init__() + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._simple_cases_regexes = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.PureNumFromTo), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeDateFromTo), + RegExpUtility.get_safe_reg_exp(DutchDateTime.PureNumBetweenAnd), + RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeOfDayRegex) + ] + + self._preposition_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrepositionRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TillRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeOfDayRegex) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PeriodTimeOfDayRegex) + self._followed_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeFollowedUnit) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex) + self._past_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PastSuffixRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeNumberCombinedWithUnit) + self._week_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WeekDayRegex) + self._period_time_of_day_with_date_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PeriodTimeOfDayWithDateRegex) + self._relative_time_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeTimeUnitRegex) + self._rest_of_date_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RestOfDateTimeRegex) + self._general_ending_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.GeneralEndingRegex) + self._middle_pause_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MiddlePauseRegex) + + self.from_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FromRegex) + self.range_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RangeConnectorRegex) + + self._cardinal_extractor = DutchCardinalExtractor() + + self._single_date_extractor = BaseDateExtractor( + DutchDateExtractorConfiguration()) + self._single_time_extractor = BaseTimeExtractor( + DutchTimeExtractorConfiguration()) + self._single_date_time_extractor = BaseDateTimeExtractor( + DutchDateTimeExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + DutchTimePeriodExtractorConfiguration()) + self._time_zone_extractor = BaseTimeZoneExtractor( + DutchTimeZoneExtractorConfiguration()) + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.WithinNextPrefixRegex + ) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex + ) + self._token_before_date = DutchDateTime.TokenBeforeDate + self._future_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FutureSuffixRegex + ) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DateUnitRegex + ) + self._am_desc_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AmDescRegex + ) + self._pm_desc_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PmDescRegex + ) + self._prefix_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrefixDayRegex + ) + self._before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeRegex + ) + self._after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AfterRegex + ) + self._suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixRegex + ) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + + 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: + match = self.range_connector_regex.search(source) + if match: + return MatchedIndex(True, match.start()) + + return MatchedIndex(False, -1) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetimeperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetimeperiod_parser_config.py new file mode 100644 index 0000000000..608e1d0c9f --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/datetimeperiod_parser_config.py @@ -0,0 +1,257 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, Dict +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..base_datetimeperiod import DateTimePeriodParserConfiguration, MatchedTimeRange +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..base_configs import BaseDateParserConfiguration +from ..base_timezone import BaseTimeZoneParser +from ..constants import Constants + + +class DutchDateTimePeriodParserConfiguration(DateTimePeriodParserConfiguration): + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def future_suffix_regex(self): + return self._future_suffix_regex + + @property + def within_next_prefix_regex(self): + return self._within_next_prefix_regex + + def __init__(self, config: BaseDateParserConfiguration): + self._within_next_prefix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WithinNextPrefixRegex) + self._future_suffix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.FutureSuffixRegex) + self._am_desc_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.AmDescRegex) + self._pm_desc_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.PmDescRegex) + self._date_extractor = config.date_extractor + self._time_extractor = config.time_extractor + self._date_time_extractor = config.date_time_extractor + self._time_period_extractor = config.time_period_extractor + self._cardinal_extractor = config.cardinal_extractor + self._duration_extractor = config.duration_extractor + self.number_parser = config.number_parser + self._date_parser = config.date_parser + self._time_parser = config.time_parser + self._date_time_parser = config.date_time_parser + self._time_period_parser = config.time_period_parser + self._duration_parser = config.duration_parser + self._unit_map = config.unit_map + self._numbers = config.numbers + + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._token_before_date = DutchDateTime.TokenBeforeDate + self._token_before_time = DutchDateTime.TokenBeforeTime + self._prefix_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrefixDayRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AfterRegex) + self.next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self._previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex) + self.this_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ThisPrefixRegex) + self.morning_start_end_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MorningStartEndRegex) + self.afternoon_start_end_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AfternoonStartEndRegex) + self.evening_start_end_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EveningStartEndRegex) + self.night_start_end_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NightStartEndRegex) + self._pure_number_from_to_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PureNumFromTo) + self._pure_number_between_and_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PureNumBetweenAnd) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeOfDayRegex) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeOfDayRegex) + self._past_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PastSuffixRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FutureSuffixRegex) + self.number_combined_with_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeNumberCombinedWithUnit) + self.unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex) + self._period_time_of_day_with_date_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PeriodTimeOfDayWithDateRegex) + self._relative_time_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeTimeUnitRegex) + self._rest_of_date_time_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RestOfDateTimeRegex) + self._time_zone_parser = config.time_zone_parser + @property + def previous_prefix_regex(self): + return self._previous_prefix_regex + + @property + def cardinal_extractor(self): + return self._cardinal_extractor + + @property + def am_desc_regex(self): + return self._am_desc_regex + + @property + def pm_desc_regex(self): + return self._pm_desc_regex + + @property + def before_regex(self): + return self._before_regex + + @property + def after_regex(self): + return self._after_regex + + @property + def prefix_day_regex(self): + return self._prefix_day_regex + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def token_before_time(self): + return self._token_before_time + + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def pure_number_from_to_regex(self) -> Pattern: + return self._pure_number_from_to_regex + + @property + def pure_number_between_and_regex(self) -> Pattern: + return self._pure_number_between_and_regex + + @property + def period_time_of_day_with_date_regex(self) -> Pattern: + return self._period_time_of_day_with_date_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def relative_time_unit_regex(self) -> Pattern: + return self._relative_time_unit_regex + + @property + def rest_of_date_time_regex(self) -> Pattern: + return self._rest_of_date_time_regex + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def get_matched_time_range(self, source: str) -> MatchedTimeRange: + trimmed_source = source.strip().lower() + begin_hour = 0 + end_hour = 0 + end_min = 0 + + if self.morning_start_end_regex.search(trimmed_source): + time_str = Constants.MORNING + begin_hour = 8 + end_hour = 12 + elif self.afternoon_start_end_regex.search(trimmed_source): + time_str = Constants.AFTERNOON + begin_hour = 12 + end_hour = 16 + elif self.evening_start_end_regex.search(trimmed_source): + time_str = Constants.EVENING + begin_hour = 16 + end_hour = 20 + elif self.night_start_end_regex.search(trimmed_source): + time_str = Constants.NIGHT + begin_hour = 20 + end_hour = 23 + end_min = 59 + else: + time_str = '' + return MatchedTimeRange(time_str, begin_hour, end_hour, end_min, False) + + return MatchedTimeRange(time_str, begin_hour, end_hour, end_min, True) + + def get_swift_prefix(self, source: str) -> int: + trimmed_source = source.strip().lower() + swift = 0 + + if self.previous_prefix_regex.search(trimmed_source): + swift = -1 + elif self.next_prefix_regex.search(trimmed_source): + swift = 1 + + return swift diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/duration_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/duration_extractor_config.py new file mode 100644 index 0000000000..83b4b28d5a --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/duration_extractor_config.py @@ -0,0 +1,157 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.dutch.extractors import DutchCardinalExtractor +from ...resources.dutch_date_time import DutchDateTime +from ..base_duration import DurationExtractorConfiguration + + +class DutchDurationExtractorConfiguration(DurationExtractorConfiguration): + + @property + def check_both_before_after(self): + return self._check_both_before_after + + @property + def dmy_date_format(self) -> bool: + return self._dmy_date_format + + @property + def all_regex(self) -> Pattern: + return self._all_regex + + @property + def half_regex(self) -> Pattern: + return self._half_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 an_unit_regex(self) -> Pattern: + return self._an_unit_regex + + @property + def inexact_number_unit_regex(self) -> Pattern: + return self._inexact_number_unit_regex + + @property + def suffix_and_regex(self) -> Pattern: + return self._suffix_and_regex + + @property + def relative_duration_unit_regex(self) -> Pattern: + return self._relative_duration_unit_regex + + @property + def more_than_regex(self) -> Pattern: + return self._more_than_regex + + @property + def less_than_regex(self) -> Pattern: + return self._less_than_regex + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def during_regex(self) -> Pattern: + return self._during_regex + + @property + def unit_map(self) -> {}: + return self._unit_map + + @property + def unit_value_map(self) -> {}: + return self._unit_value_map + + @property + def duration_unit_regex(self) -> Pattern: + return self._duration_unit_regex + + @property + def duration_connector_regex(self) -> Pattern: + return self._duration_connector_regex + + @property + def conjunction_regex(self) -> Pattern: + return self._conjunction_regex + + @property + def mod_prefix_regex(self) -> Pattern: + return self._mod_prefix_regex + + @property + def mod_suffix_regex(self) -> Pattern: + return self._mod_suffix_regex + + @property + def inexact_number_regex(self): + return self._inexact_number_regex + + @property + def special_number_unit_regex(self): + return self._special_number_unit_regex + + def __init__(self): + super().__init__() + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._inexact_number_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.InexactNumberRegex) + self._conjunction_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.ConjunctionRegex) + self._all_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AllRegex) + self._half_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.HalfRegex) + self._followed_unit: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DurationFollowedUnit) + self._number_combined_with_unit: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NumberCombinedWithDurationUnit) + self._an_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AnUnitRegex) + self._inexact_number_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.InexactNumberUnitRegex) + self._suffix_and_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixAndRegex) + self._relative_duration_unit_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RelativeDurationUnitRegex) + self._more_than_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MoreThanRegex) + self._less_than_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LessThanOneHour) + self._cardinal_extractor: BaseNumberExtractor = DutchCardinalExtractor() + self._during_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DuringRegex + ) + self._unit_map = DutchDateTime.UnitMap + self._unit_value_map = DutchDateTime.UnitValueMap + self._duration_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DurationUnitRegex + ) + self._duration_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DurationConnectorRegex + ) + self._more_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.MoreThanRegex + ) + self._less_than_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LessThanRegex + ) + self._mod_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ModPrefixRegex + ) + self._mod_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ModSuffixRegex + ) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._special_number_unit_regex = None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/duration_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/duration_parser_config.py new file mode 100644 index 0000000000..7493a73dd3 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/duration_parser_config.py @@ -0,0 +1,89 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import BaseNumberExtractor +from recognizers_number.number.parsers import BaseNumberParser +from ...resources.dutch_date_time import DutchDateTime + +from ..extractors import DateTimeExtractor +from ..base_duration import DurationParserConfiguration, BaseDurationExtractor +from .duration_extractor_config import DutchDurationExtractorConfiguration + + +class DutchDurationParserConfiguration(DurationParserConfiguration): + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def followed_unit(self) -> Pattern: + return self._followed_unit + + @property + def suffix_and_regex(self) -> Pattern: + return self._suffix_and_regex + + @property + def number_combined_with_unit(self) -> Pattern: + return self._number_combined_with_unit + + @property + def an_unit_regex(self) -> Pattern: + return self._an_unit_regex + + @property + def all_date_unit_regex(self) -> Pattern: + return self._all_date_unit_regex + + @property + def half_date_unit_regex(self) -> Pattern: + return self._half_date_unit_regex + + @property + def inexact_number_unit_regex(self) -> Pattern: + return self._inexact_number_unit_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def unit_value_map(self) -> Dict[str, int]: + return self._unit_value_map + + @property + def double_numbers(self) -> Dict[str, float]: + return self._double_numbers + + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + def __init__(self, config): + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration(), False) + self._cardinal_extractor = config.cardinal_extractor + self._number_parser = config.number_parser + self._followed_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DurationFollowedUnit) + self._suffix_and_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixAndRegex) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NumberCombinedWithDurationUnit) + self._an_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AnUnitRegex) + self._all_date_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AllRegex) + self._half_date_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.HalfRegex) + self._inexact_number_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.InexactNumberUnitRegex) + self._unit_map = config.unit_map + self._unit_value_map = config.unit_value_map + self._double_numbers = config.double_numbers diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/holiday_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/holiday_extractor_config.py new file mode 100644 index 0000000000..8f7506e961 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/holiday_extractor_config.py @@ -0,0 +1,24 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Pattern +from recognizers_text.utilities import RegExpUtility + +from ..base_holiday import HolidayExtractorConfiguration +from ...resources.dutch_date_time import DutchDateTime + + +class DutchHolidayExtractorConfiguration(HolidayExtractorConfiguration): + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def holiday_regexes(self) -> List[Pattern]: + return self._holiday_regexes + + def __init__(self): + self._year_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.YearRegex) + self._holiday_regexes = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.HolidayRegex) + ] diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/holiday_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/holiday_parser_config.py new file mode 100644 index 0000000000..bb28350fae --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/holiday_parser_config.py @@ -0,0 +1,239 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Dict, Callable, Pattern +from datetime import datetime + +from recognizers_text.utilities import RegExpUtility +from ..utilities import DateUtils +from ..base_holiday import BaseHolidayParserConfiguration +from ...resources.dutch_date_time import DutchDateTime + + +class DutchHolidayParserConfiguration(BaseHolidayParserConfiguration): + @property + def holiday_names(self) -> Dict[str, List[str]]: + return self._holiday_names + + @property + def holiday_regex_list(self) -> List[Pattern]: + return self._holiday_regexes + + @property + def holiday_func_dictionary(self) -> Dict[str, Callable[[int], datetime]]: + return self._holiday_func_dictionary + + def __init__(self, config): + super().__init__() + self._holiday_regexes = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.HolidayRegex), + ] + self._holiday_names = DutchDateTime.HolidayNames + + self.next_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NextPrefixRegex) + self.previous_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PreviousPrefixRegex) + self.this_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ThisPrefixRegex) + + def _init_holiday_funcs(self) -> Dict[str, Callable[[int], datetime]]: + local = dict([ + ("maosbirthday", DutchHolidayParserConfiguration.mao_birthday), + ("teachersday", DutchHolidayParserConfiguration.teacher_day), + ("singleday", DutchHolidayParserConfiguration.singles_day), + ("allsaintsday", DutchHolidayParserConfiguration.halloween_day), + ("youthday", DutchHolidayParserConfiguration.youth_day), + ("childrenday", DutchHolidayParserConfiguration.children_day), + ("femaleday", DutchHolidayParserConfiguration.female_day), + ("treeplantingday", DutchHolidayParserConfiguration.tree_plant_day), + ("arborday", DutchHolidayParserConfiguration.tree_plant_day), + ("girlsday", DutchHolidayParserConfiguration.girls_day), + ("whiteloverday", DutchHolidayParserConfiguration.white_lover_day), + ("loverday", DutchHolidayParserConfiguration.valentines_day), + ("christmas", DutchHolidayParserConfiguration.christmas_day), + ("xmas", DutchHolidayParserConfiguration.children_day), + ("newyear", DutchHolidayParserConfiguration.new_year), + ("newyearday", DutchHolidayParserConfiguration.new_year), + ("newyearsday", DutchHolidayParserConfiguration.new_year), + ("groundhougday", DutchHolidayParserConfiguration.groundhog_day), + ("valentinesday", DutchHolidayParserConfiguration.valentines_day), + ("stpatrickday", DutchHolidayParserConfiguration.st_patrick_day), + ("aprilfools", DutchHolidayParserConfiguration.fool_day), + ("stgeorgeday", DutchHolidayParserConfiguration.st_george_day), + ("mayday", DutchHolidayParserConfiguration.mayday), + ("cincodemayoday", DutchHolidayParserConfiguration.cinco_de_mayo_day), + ("baptisteday", DutchHolidayParserConfiguration.baptiste_day), + ("usindependenceday", DutchHolidayParserConfiguration.usa_independence_day), + ("independenceday", DutchHolidayParserConfiguration.usa_independence_day), + ("bastilleday", DutchHolidayParserConfiguration.bastille_day), + ("halloweenday", DutchHolidayParserConfiguration.halloween_day), + ("allhallowday", DutchHolidayParserConfiguration.all_hallow_day), + ("allsoulsday", DutchHolidayParserConfiguration.all_souls_day), + ("guyfawkesday", DutchHolidayParserConfiguration.guyfawkes_day), + ("veteransday", DutchHolidayParserConfiguration.veterans_day), + ("christmaseve", DutchHolidayParserConfiguration.christmas_eve), + ("newyeareve", DutchHolidayParserConfiguration.new_year_eve), + ("fathersday", DutchHolidayParserConfiguration.fathers_day), + ("mothersday", DutchHolidayParserConfiguration.mothers_day), + ("labourday", DutchHolidayParserConfiguration.international_workers_day), + ("memorialday", DutchHolidayParserConfiguration.memorial_day), + ("easterday", DutchHolidayParserConfiguration.easter_day), + ("eastermonday", DutchHolidayParserConfiguration.easter_day), + ("mardigras", DutchHolidayParserConfiguration.easter_day), + ]) + + return {**super()._init_holiday_funcs(), **local} + + @staticmethod + def new_year(year: int) -> datetime: + return datetime(year, 1, 1) + + @staticmethod + def new_year_eve(year: int) -> datetime: + return datetime(year, 12, 31) + + @staticmethod + def christmas_day(year: int) -> datetime: + return datetime(year, 12, 25) + + @staticmethod + def christmas_eve(year: int) -> datetime: + return datetime(year, 12, 24) + + @staticmethod + def female_day(year: int) -> datetime: + return datetime(year, 3, 8) + + @staticmethod + def children_day(year: int) -> datetime: + return datetime(year, 6, 1) + + @staticmethod + def halloween_day(year: int) -> datetime: + return datetime(year, 10, 31) + + @staticmethod + def easter_day(year: int) -> datetime: + return DateUtils.min_value + + @staticmethod + def valentines_day(year: int) -> datetime: + return datetime(year, 2, 14) + + @staticmethod + def white_lover_day(year: int) -> datetime: + return datetime(year, 3, 14) + + @staticmethod + def fool_day(year: int) -> datetime: + return datetime(year, 4, 1) + + @staticmethod + def girls_day(year: int) -> datetime: + return datetime(year, 3, 7) + + @staticmethod + def tree_plant_day(year: int) -> datetime: + return datetime(year, 3, 12) + + @staticmethod + def youth_day(year: int) -> datetime: + return datetime(year, 5, 4) + + @staticmethod + def teacher_day(year: int) -> datetime: + return datetime(year, 9, 10) + + @staticmethod + def singles_day(year: int) -> datetime: + return datetime(year, 11, 11) + + @staticmethod + def mao_birthday(year: int) -> datetime: + return datetime(year, 12, 26) + + @staticmethod + def inauguration_day(year: int) -> datetime: + return datetime(year, 1, 20) + + @staticmethod + def groundhog_day(year: int) -> datetime: + return datetime(year, 2, 2) + + @staticmethod + def st_patrick_day(year: int) -> datetime: + return datetime(year, 3, 17) + + @staticmethod + def st_george_day(year: int) -> datetime: + return datetime(year, 4, 23) + + @staticmethod + def mayday(year: int) -> datetime: + return datetime(year, 5, 1) + + @staticmethod + def cinco_de_mayo_day(year: int) -> datetime: + return datetime(year, 5, 5) + + @staticmethod + def baptiste_day(year: int) -> datetime: + return datetime(year, 6, 24) + + @staticmethod + def usa_independence_day(year: int) -> datetime: + return datetime(year, 7, 4) + + @staticmethod + def bastille_day(year: int) -> datetime: + return datetime(year, 7, 14) + + @staticmethod + def all_hallow_day(year: int) -> datetime: + return datetime(year, 11, 1) + + @staticmethod + def all_souls_day(year: int) -> datetime: + return datetime(year, 11, 2) + + @staticmethod + def guyfawkes_day(year: int) -> datetime: + return datetime(year, 11, 5) + + @staticmethod + def veterans_day(year: int) -> datetime: + return datetime(year, 11, 11) + + @staticmethod + def fathers_day(year: int) -> datetime: + return datetime(year, 6, 17) + + @staticmethod + def mothers_day(year: int) -> datetime: + return datetime(year, 5, 27) + + @staticmethod + def labour_day(year: int) -> datetime: + return datetime(year, 5, 1) + + def get_swift_year(self, text: str) -> int: + trimmed_text = text.strip().lower() + swift = -10 + + if self.next_prefix_regex.search(trimmed_text): + swift = 1 + + if self.previous_prefix_regex.search(trimmed_text): + swift = -1 + + if self.this_prefix_regex.search(trimmed_text): + swift = 0 + + return swift + + def sanitize_holiday_token(self, holiday: str) -> str: + return holiday\ + .replace(' ', '')\ + .replace("'", '') \ + .replace('-', '') diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/merged_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/merged_extractor_config.py new file mode 100644 index 0000000000..3e83bbbf42 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/merged_extractor_config.py @@ -0,0 +1,223 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Pattern + +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_number import DutchIntegerExtractor +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..base_merged import MergedExtractorConfiguration +from ..base_date import BaseDateExtractor +from ..base_time import BaseTimeExtractor +from ..base_duration import BaseDurationExtractor +from ..base_dateperiod import BaseDatePeriodExtractor +from ..base_timeperiod import BaseTimePeriodExtractor +from ..base_datetime import BaseDateTimeExtractor +from ..base_datetimeperiod import BaseDateTimePeriodExtractor +from ..base_set import BaseSetExtractor +from ..base_holiday import BaseHolidayExtractor +from .date_extractor_config import DutchDateExtractorConfiguration +from .time_extractor_config import DutchTimeExtractorConfiguration +from .duration_extractor_config import DutchDurationExtractorConfiguration +from .dateperiod_extractor_config import DutchDatePeriodExtractorConfiguration +from .timeperiod_extractor_config import DutchTimePeriodExtractorConfiguration +from .datetime_extractor_config import DutchDateTimeExtractorConfiguration +from .datetimeperiod_extractor_config import DutchDateTimePeriodExtractorConfiguration +from .set_extractor_config import DutchSetExtractorConfiguration +from .holiday_extractor_config import DutchHolidayExtractorConfiguration +from ...resources.base_date_time import BaseDateTime + + +class DutchMergedExtractorConfiguration(MergedExtractorConfiguration): + @property + def check_both_before_after(self): + return self._check_both_before_after + + @property + def time_zone_extractor(self): + return self._time_zone_extractor + + @property + def datetime_alt_extractor(self): + return self._datetime_alt_extractor + + @property + def term_filter_regexes(self) -> List[Pattern]: + return self._term_filter_regexes + + @property + def fail_fast_regex(self) -> Pattern: + return self._fail_fast_regex + + @property + def superfluous_word_matcher(self) -> Pattern: + return self._superfluous_word_matcher + + @property + def unspecified_date_period_regex(self) -> Pattern: + return self._unspecified_date_period_regex + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def holiday_extractor(self) -> DateTimeExtractor: + return self._holiday_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def set_extractor(self) -> DateTimeExtractor: + return self._set_extractor + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def since_regex(self) -> Pattern: + return self._since_regex + + @property + def around_regex(self) -> Pattern: + return self._around_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def suffix_after_regex(self) -> Pattern: + return self._suffix_after_regex + + @property + def from_to_regex(self) -> Pattern: + return self._from_to_regex + + @property + def single_ambiguous_month_regex(self) -> Pattern: + return self._single_ambiguous_month_regex + + @property + def preposition_suffix_regex(self) -> Pattern: + return self._preposition_suffix_regex + + @property + def number_ending_pattern(self) -> Pattern: + return self._number_ending_pattern + + @property + def filter_word_regex_list(self) -> List[Pattern]: + return self._filter_word_regex_list + + @property + def ambiguous_range_modifier_prefix(self) -> Pattern: + return None + + @property + def ambiguity_filters_dict(self) -> Pattern: + return self._ambiguity_filters_dict + + @property + def potential_ambiguous_range_regex(self) -> Pattern: + return self._potential_ambiguous_range_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + def __init__(self): + self._before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AfterRegex) + self._since_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SinceRegex) + self._from_to_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FromToRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.YearRegex) + self._single_ambiguous_month_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SingleAmbiguousMonthRegex) + self._preposition_suffix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrepositionSuffixRegex) + self._ambiguous_range_modifier_prefix = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AmbiguousRangeModifierPrefix) + self._number_ending_pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NumberEndingPattern) + + self._date_extractor = BaseDateExtractor( + DutchDateExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor( + DutchTimeExtractorConfiguration()) + self._date_time_extractor = BaseDateTimeExtractor( + DutchDateTimeExtractorConfiguration()) + self._date_period_extractor = BaseDatePeriodExtractor( + DutchDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + DutchTimePeriodExtractorConfiguration()) + self._date_time_period_extractor = BaseDateTimePeriodExtractor( + DutchDateTimePeriodExtractorConfiguration()) + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._set_extractor = BaseSetExtractor( + DutchSetExtractorConfiguration()) + self._holiday_extractor = BaseHolidayExtractor( + DutchHolidayExtractorConfiguration()) + self._integer_extractor = DutchIntegerExtractor() + self._filter_word_regex_list = [] + self._unspecified_date_period_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.UnspecificDatePeriodRegex + ) + self._around_regex = DutchDateTime.AroundRegex + self._equal_regex = BaseDateTime.EqualRegex + self._suffix_after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixAfterRegex + ) + self._potential_ambiguous_range_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PotentialAmbiguousRangeRegex + ) + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._term_filter_regexes = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.OneOnOneRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.SingleAmbiguousTermsRegex), + ] + # TODO When the implementation for these properties is added, change the None values to their respective Regexps + self._superfluous_word_matcher = None + self._fail_fast_regex = None + self._datetime_alt_extractor = None + self._time_zone_extractor = None + self._ambiguity_filters_dict = DefinitionLoader.load_ambiguity_filters(DutchDateTime.AmbiguityFiltersDict) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/merged_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/merged_parser_config.py new file mode 100644 index 0000000000..24c7d7c5d8 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/merged_parser_config.py @@ -0,0 +1,111 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility + +from .holiday_parser_config import DutchHolidayParserConfiguration +from .set_parser_config import DutchSetParserConfiguration +from .dateperiod_parser_config import DutchDatePeriodParserConfiguration +from .timeperiod_parser_config import DutchTimePeriodParserConfiguration +from .common_configs import DutchCommonDateTimeParserConfiguration +from ..base_date import BaseDateParser +from ..base_time import BaseTimeParser +from ..base_datetime import BaseDateTimeParser +from ..base_holiday import BaseHolidayParser +from ..base_dateperiod import BaseDatePeriodParser +from ..base_timeperiod import BaseTimePeriodParser +from ..base_datetimeperiod import BaseDateTimePeriodParser +from ..base_duration import BaseDurationParser +from ..base_set import BaseSetParser +from ..base_merged import MergedParserConfiguration +from ...resources.dutch_date_time import DutchDateTime, BaseDateTime + + +class DutchMergedParserConfiguration(DutchCommonDateTimeParserConfiguration, MergedParserConfiguration): + @property + def around_regex(self) -> Pattern: + return self._around_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def suffix_after(self) -> Pattern: + return self._suffix_after + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def since_regex(self) -> Pattern: + return self._since_regex + + @property + def date_parser(self) -> BaseDateParser: + return self._date_parser + + @property + def holiday_parser(self) -> BaseHolidayParser: + return self._holiday_parser + + @property + def time_parser(self) -> BaseTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> BaseDateTimeParser: + return self._date_time_parser + + @property + def date_period_parser(self) -> BaseDatePeriodParser: + return self._date_period_parser + + @property + def time_period_parser(self) -> BaseTimePeriodParser: + return self._time_period_parser + + @property + def date_time_period_parser(self) -> BaseDateTimePeriodParser: + return self._date_time_period_parser + + @property + def duration_parser(self) -> BaseDurationParser: + return self._duration_parser + + @property + def set_parser(self) -> BaseSetParser: + return self._set_parser + + def __init__(self, config): + DutchCommonDateTimeParserConfiguration.__init__(self) + self._suffix_after = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SuffixAfterRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.YearRegex) + self._equal_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.EqualRegex) + self._around_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.AroundRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AfterRegex) + self._since_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SinceRegex) + + self._date_period_parser = BaseDatePeriodParser( + DutchDatePeriodParserConfiguration(self)) + self._time_period_parser = BaseTimePeriodParser( + DutchTimePeriodParserConfiguration(self)) + self._set_parser = BaseSetParser(DutchSetParserConfiguration(config)) + self._holiday_parser = BaseHolidayParser( + DutchHolidayParserConfiguration(config)) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/parsers.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/parsers.py new file mode 100644 index 0000000000..a5ae50dc28 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/parsers.py @@ -0,0 +1,37 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from datetime import datetime + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..base_time import BaseTimeParser +from ..utilities import DateTimeResolutionResult, DateTimeFormatUtil, DateUtils + + +class DutchTimeParser(BaseTimeParser): + def internal_parser(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = super().internal_parser(source, reference) + if not result.success: + result = self.parse_ish(source, reference) + + return result + + def parse_ish(self, source: str, reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + trimmed_source = source.strip().lower() + + match = RegExpUtility.get_safe_reg_exp( + DutchDateTime.IshRegex).match(source) + if match and match.end() == len(trimmed_source): + hour_str = RegExpUtility.get_group(match, 'hour') + hour = 12 + if hour_str: + hour = int(hour_str) + + result.timex = 'T' + DateTimeFormatUtil.to_str(hour, 2) + result.future_value = result.past_value = DateUtils.safe_create_from_min_value( + reference.year, reference.month, reference.day, hour, 0, 0) + result.success = True + + return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/set_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/set_extractor_config.py new file mode 100644 index 0000000000..4650509784 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/set_extractor_config.py @@ -0,0 +1,124 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..base_set import SetExtractorConfiguration +from ..base_date import BaseDateExtractor +from ..base_time import BaseTimeExtractor +from ..base_duration import BaseDurationExtractor +from ..base_dateperiod import BaseDatePeriodExtractor +from ..base_timeperiod import BaseTimePeriodExtractor +from ..base_datetime import BaseDateTimeExtractor +from ..base_datetimeperiod import BaseDateTimePeriodExtractor +from .date_extractor_config import DutchDateExtractorConfiguration +from .time_extractor_config import DutchTimeExtractorConfiguration +from .duration_extractor_config import DutchDurationExtractorConfiguration +from .dateperiod_extractor_config import DutchDatePeriodExtractorConfiguration +from .timeperiod_extractor_config import DutchTimePeriodExtractorConfiguration +from .datetime_extractor_config import DutchDateTimeExtractorConfiguration +from .datetimeperiod_extractor_config import DutchDateTimePeriodExtractorConfiguration + + +class DutchSetExtractorConfiguration(SetExtractorConfiguration): + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def each_prefix_regex(self) -> Pattern: + return self._each_prefix_regex + + @property + def periodic_regex(self) -> Pattern: + return self._periodic_regex + + @property + def each_unit_regex(self) -> Pattern: + return self._each_unit_regex + + @property + def each_day_regex(self) -> Pattern: + return self._each_day_regex + + @property + def before_each_day_regex(self) -> Pattern: + return self._before_each_day_regex + + @property + def set_unit_regex(self) -> Pattern: + return self._set_unit_regex + + @property + def set_week_day_regex(self) -> Pattern: + return self._set_week_day_regex + + @property + def set_each_regex(self) -> Pattern: + return self._set_each_regex + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + def __init__(self): + self._last_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SetLastRegex) + self._periodic_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PeriodicRegex) + self._each_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EachUnitRegex) + self._each_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EachPrefixRegex) + self._each_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EachDayRegex) + self._before_each_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeEachDayRegex) + self._set_each_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SetEachRegex) + self._set_week_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SetWeekDayRegex) + self._set_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DurationUnitRegex) + + self._duration_extractor = BaseDurationExtractor( + DutchDurationExtractorConfiguration()) + self._time_extractor = BaseTimeExtractor( + DutchTimeExtractorConfiguration()) + self._date_extractor = BaseDateExtractor( + DutchDateExtractorConfiguration()) + self._date_time_extractor = BaseDateTimeExtractor( + DutchDateTimeExtractorConfiguration()) + self._date_period_extractor = BaseDatePeriodExtractor( + DutchDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseTimePeriodExtractor( + DutchTimePeriodExtractorConfiguration()) + self._date_time_period_extractor = BaseDateTimePeriodExtractor( + DutchDateTimePeriodExtractorConfiguration()) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/set_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/set_parser_config.py new file mode 100644 index 0000000000..13f0687a83 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/set_parser_config.py @@ -0,0 +1,197 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..base_set import SetParserConfiguration, MatchedTimex +from ..base_configs import BaseDateParserConfiguration + + +class DutchSetParserConfiguration(SetParserConfiguration): + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def date_period_parser(self) -> DateTimeParser: + return self._date_period_parser + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def date_time_period_parser(self) -> DateTimeParser: + return self._date_time_period_parser + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def each_prefix_regex(self) -> Pattern: + return self._each_prefix_regex + + @property + def periodic_regex(self) -> Pattern: + return self._periodic_regex + + @property + def each_unit_regex(self) -> Pattern: + return self._each_unit_regex + + @property + def each_day_regex(self) -> Pattern: + return self._each_day_regex + + @property + def set_week_day_regex(self) -> Pattern: + return self._set_week_day_regex + + @property + def set_each_regex(self) -> Pattern: + return self._set_each_regex + + @property + def day_type_regex(self) -> Pattern: + return self._day_type_regex + + @property + def week_type_regex(self) -> Pattern: + return self._week_type_regex + + @property + def bi_week_type_regex(self) -> Pattern: + return self._bi_week_type_regex + + @property + def month_type_regex(self) -> Pattern: + return self._month_type_regex + + @property + def quarter_type_regex(self) -> Pattern: + return self._quarter_type_regex + + @property + def year_type_regex(self) -> Pattern: + return self._year_type_regex + + @property + def semi_year_type_regex(self) -> Pattern: + return self._semi_year_type_regex + + @property + def weekend_type_regex(self) -> Pattern: + return self._weekend_type_regex + + def __init__(self, config: BaseDateParserConfiguration): + self._duration_extractor = config.duration_extractor + self._time_extractor = config.time_extractor + self._date_extractor = config.date_extractor + self._date_time_extractor = config.date_time_extractor + self._date_period_extractor = config.date_period_extractor + self._time_period_extractor = config.time_period_extractor + self._date_time_period_extractor = config.date_time_period_extractor + self._duration_parser = config.duration_parser + self._time_parser = config.time_parser + self._date_parser = config.date_parser + self._date_time_parser = config.date_time_parser + self._date_period_parser = config.date_period_parser + self._time_period_parser = config.time_period_parser + self._date_time_period_parser = config.date_time_period_parser + self._unit_map = DutchDateTime.UnitMap + + self._day_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.DayTypeRegex) + self._week_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekTypeRegex) + self._bi_week_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.BiWeekTypeRegex) + self._month_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MonthTypeRegex) + self._quarter_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.QuarterTypeRegex) + self._year_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.YearTypeRegex) + self._semi_year_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.SemiYearTypeRegex) + self._weekend_type_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WeekendTypeRegex) + self._each_prefix_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EachPrefixRegex) + self._periodic_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PeriodicRegex) + self._each_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EachUnitRegex) + self._each_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.EachDayRegex) + self._set_week_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SetWeekDayRegex) + self._set_each_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SetEachRegex) + + def get_matched_daily_timex(self, text: str) -> MatchedTimex: + trimmed_source = text.strip().lower() + timex = '' + + if self._day_type_regex.search(trimmed_source): + timex = 'P1D' + elif self._week_type_regex.search(trimmed_source): + timex = 'P1W' + elif self._bi_week_type_regex.search(trimmed_source): + timex = 'P2W' + elif self._month_type_regex.search(trimmed_source): + timex = 'P1M' + elif self._year_type_regex.search(trimmed_source): + timex = 'P1Y' + elif self._semi_year_type_regex.search(trimmed_source): + timex = 'P0.5Y' + elif self._quarter_type_regex.search(trimmed_source): + timex = 'P3M' + elif self._weekend_type_regex.search(trimmed_source): + timex = 'XXXX-WXX-WE' + else: + return MatchedTimex(False, None) + + return MatchedTimex(True, timex) + + def get_matched_unit_timex(self, text: str) -> MatchedTimex: + + return self.get_matched_daily_timex(text) + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/time_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/time_extractor_config.py new file mode 100644 index 0000000000..039eb6cffe --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/time_extractor_config.py @@ -0,0 +1,150 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Pattern + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..base_time import TimeExtractorConfiguration +from ..utilities import DateTimeOptions +from ..base_timezone import BaseTimeZoneExtractor +from .timezone_extractor_config import DutchTimeZoneExtractorConfiguration + + +class DutchTimeExtractorConfiguration(TimeExtractorConfiguration): + @property + def time_zone_extractor(self): + return self._time_zone_extractor + + @property + def time_regex_list(self) -> List[Pattern]: + return self._time_regex_list + + @property + def at_regex(self) -> Pattern: + return self._at_regex + + @property + def ish_regex(self) -> Pattern: + return self._ish_regex + + @property + def time_before_after_regex(self) -> Pattern: + return self._time_before_after_regex + + @property + def desc_regex(self) -> Pattern: + return self._desc_regex + + @property + def hour_num_regex(self) -> Pattern: + return self._hour_num_regex + + @property + def minute_num_regex(self) -> Pattern: + return self._minute_num_regex + + @property + def oclock_regex(self) -> Pattern: + return self._oclock_regex + + @property + def pm_regex(self) -> Pattern: + return self._pm_regex + + @property + def am_regex(self) -> Pattern: + return self._am_regex + + @property + def less_than_one_hour_regex(self) -> Pattern: + return self._less_than_one_hour + + @property + def written_time_regex(self) -> Pattern: + return self._written_time_regex + + @property + def time_prefix_regex(self) -> Pattern: + return self._time_prefix_regex + + @property + def time_suffix_regex(self) -> Pattern: + return self._time_suffix_regex + + @property + def basic_time_regex(self) -> Pattern: + return self._basic_time_regex + + @property + def midnight_regex(self) -> Pattern: + return self._midnight_regex + + @property + def midmorning_regex(self) -> Pattern: + return self._midmorning_regex + + @property + def midafternoon_regex(self) -> Pattern: + return self._midafternoon_regex + + @property + def midday_regex(self) -> Pattern: + return self._midday_regex + + @property + def midtime_regex(self) -> Pattern: + return self._midtime_regex + + @property + def time_unit_regex(self) -> Pattern: + return self._time_unit_regex + + def __init__(self): + super().__init__() + self._time_regex_list: List[Pattern] = DutchTimeExtractorConfiguration.get_time_regex_list( + ) + self._at_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AtRegex) + self._ish_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.IshRegex) + self._time_before_after_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeBeforeAfterRegex) + self._options = DateTimeOptions.NONE + self._time_zone_extractor = BaseTimeZoneExtractor( + DutchTimeZoneExtractorConfiguration()) + self._desc_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.DescRegex) + self._hour_num_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.HourNumRegex) + self._minute_num_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MinuteNumRegex) + self._oclock_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.OclockRegex) + self._pm_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.PmRegex) + self._am_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.AmRegex) + self._less_than_one_hour = RegExpUtility.get_safe_reg_exp(DutchDateTime.LessThanOneHour) + self._written_time_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.WrittenTimeRegex) + self._time_prefix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.TimePrefix) + self._time_suffix_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeSuffix) + self._basic_time_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.BasicTime) + self._midnight_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MidnightRegex) + self._midmorning_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MidmorningRegex) + self._midafternoon_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MidafternoonRegex) + self._midday_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MiddayRegex) + self._midtime_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.MidTimeRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeUnitRegex) + + @staticmethod + def get_time_regex_list() -> List[Pattern]: + return [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex1), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex2), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex3), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex4), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex5), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex6), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex7), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex8), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex9), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex10), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex11), + RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeRegex12), + RegExpUtility.get_safe_reg_exp(DutchDateTime.ConnectNumRegex) + ] diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/time_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/time_parser_config.py new file mode 100644 index 0000000000..2dc3ba86c5 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/time_parser_config.py @@ -0,0 +1,145 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Pattern, Dict +import regex + +from recognizers_text.utilities import RegExpUtility +from ...resources.dutch_date_time import DutchDateTime +from ..base_time import TimeParserConfiguration, AdjustParams +from ..base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from .time_extractor_config import DutchTimeExtractorConfiguration +from ..parsers import DateTimeParser +from ..constants import Constants + + +class DutchTimeParserConfiguration(TimeParserConfiguration): + @property + def time_token_prefix(self) -> str: + return self._time_token_prefix + + @property + def at_regex(self) -> Pattern: + return self._at_regex + + @property + def time_regexes(self) -> List[Pattern]: + return self._time_regexes + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def __init__(self, config: BaseDateParserConfiguration): + self._time_token_prefix: str = DutchDateTime.TimeTokenPrefix + self._at_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.AtRegex) + self._time_regexes: List[Pattern] = DutchTimeExtractorConfiguration.get_time_regex_list( + ) + self.less_than_one_hour = RegExpUtility.get_safe_reg_exp( + DutchDateTime.LessThanOneHour) + self.time_suffix = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeSuffix) + self.night_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.NightRegex) + self.time_suffix_full_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.TimeSuffixFull) + self.lunch_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.LunchRegex) + self.to_token_regex_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.ToTokenRegex) + self.to_half_token_regex_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.ToHalfTokenRegex) + self.for_half_token_regex_regex = RegExpUtility.get_safe_reg_exp(DutchDateTime.ForHalfTokenRegex) + + self._half_token_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.HalfTokenRegex) + self._quarter_token_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.QuarterTokenRegex) + self._three_quarter_token_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.ThreeQuarterTokenRegex) + + self._utility_configuration = config.utility_configuration + self._numbers: Dict[str, int] = config.numbers + self._time_zone_parser = config.time_zone_parser + + def adjust_by_prefix(self, prefix: str, adjust: AdjustParams): + delta_min = 0 + trimmed_prefix = prefix.strip().lower() + + if regex.search(self._half_token_regex, prefix): + delta_min = -30 + elif regex.search(self._quarter_token_regex, prefix): + delta_min = 15 + elif regex.search(self._three_quarter_token_regex, prefix): + delta_min = 45 + else: + match = regex.search(self.less_than_one_hour, trimmed_prefix) + if match: + min_str = RegExpUtility.get_group(match, 'deltamin') + if min_str: + delta_min = int(min_str) + else: + min_str = RegExpUtility.get_group( + match, 'deltaminnum').lower() + delta_min = self.numbers.get(min_str) + + if regex.search(self.to_half_token_regex_regex, prefix): + delta_min = delta_min - 30 + elif regex.search(self.for_half_token_regex_regex, prefix): + delta_min = -delta_min -30 + elif regex.search(self.to_token_regex_regex, prefix): + delta_min = delta_min * -1 + + adjust.minute += delta_min + + if adjust.minute < 0: + adjust.minute += 60 + adjust.hour -= 1 + + adjust.has_minute = True + + def adjust_by_suffix(self, suffix: str, adjust: AdjustParams): + suffix = suffix.strip().lower() + delta_hour = 0 + match = regex.search(self.time_suffix_full_regex, suffix) + if match is not None and match.start() == 0 and match.group() == suffix: + oclock_str = RegExpUtility.get_group(match, 'oclock') + if not oclock_str: + am_str = RegExpUtility.get_group(match, Constants.AM_GROUP_NAME) + if am_str: + if adjust.hour >= Constants.HALF_DAY_HOUR_COUNT: + delta_hour -= Constants.HALF_DAY_HOUR_COUNT + else: + adjust.has_am = True + pm_str = RegExpUtility.get_group(match, Constants.PM_GROUP_NAME) + + if pm_str: + if adjust.hour < Constants.HALF_DAY_HOUR_COUNT: + delta_hour = Constants.HALF_DAY_HOUR_COUNT + if regex.search(self.lunch_regex, pm_str): + if adjust.hour >= 10 and adjust.hour <= Constants.HALF_DAY_HOUR_COUNT: + delta_hour = 0 + if (adjust.hour == Constants.HALF_DAY_HOUR_COUNT): + adjust.has_pm = True + else: + adjust.has_am = True + else: + adjust.has_pm = True + + elif regex.search(self.night_regex, pm_str): + if adjust.hour <= 3 or adjust.hour == Constants.HALF_DAY_HOUR_COUNT: + if adjust.hour == Constants.HALF_DAY_HOUR_COUNT: + adjust.hour = 0 + delta_hour = 0 + adjust.has_am = True + else: + adjust.has_pm = True + else: + adjust.has_pm = True + + adjust.hour = (adjust.hour + delta_hour) % 24 diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timeperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timeperiod_extractor_config.py new file mode 100644 index 0000000000..d5c54d9862 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timeperiod_extractor_config.py @@ -0,0 +1,170 @@ +# 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_text.extractor import Extractor +from recognizers_number.number.dutch.extractors import DutchIntegerExtractor +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..base_timeperiod import TimePeriodExtractorConfiguration, MatchedIndex +from ..base_time import BaseTimeExtractor +from ..base_timezone import BaseTimeZoneExtractor +from .time_extractor_config import DutchTimeExtractorConfiguration +from .base_configs import DutchDateTimeUtilityConfiguration +from .timezone_extractor_config import DutchTimeZoneExtractorConfiguration + + +class DutchTimePeriodExtractorConfiguration(TimePeriodExtractorConfiguration): + @property + def check_both_before_after(self) -> bool: + return self._check_both_before_after + + @property + def simple_cases_regex(self) -> List[Pattern]: + return self._simple_cases_regex + + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def general_ending_regex(self) -> Pattern: + return self._general_ending_regex + + @property + def single_time_extractor(self) -> DateTimeExtractor: + return self._single_time_extractor + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def pure_number_regex(self) -> List[Pattern]: + return self._pure_number_regex + + @property + def time_zone_extractor(self) -> DateTimeExtractor: + return self._time_zone_extractor + + @property + def hour_regex(self) -> Pattern: + return self._hour_regex + + @property + def period_hour_num_regex(self) -> Pattern: + return self._period_hour_num_regex + + @property + def period_desc_regex(self) -> Pattern: + return self._period_desc_regex + + @property + def time_date_from_to_regex(self): + return self._time_date_from_to_regex + + @property + def specific_time_from_to(self): + return self._specific_time_from_to_regex + + @property + def specific_time_between_and(self): + return self._specific_time_between_and_regex + + @property + def preposition_regex(self): + return self._preposition_regex + + @property + def specific_time_of_day_regex(self): + return self._specific_time_of_day_regex + + @property + def time_unit_regex(self): + return self._time_unit_regex + + def __init__(self): + super().__init__() + self._check_both_before_after = DutchDateTime.CheckBothBeforeAfter + self._single_time_extractor = BaseTimeExtractor( + DutchTimeExtractorConfiguration()) + self._integer_extractor = DutchIntegerExtractor() + self.utility_configuration = DutchDateTimeUtilityConfiguration() + + self._simple_cases_regex: List[Pattern] = [ + RegExpUtility.get_safe_reg_exp(DutchDateTime.PureNumFromTo), + RegExpUtility.get_safe_reg_exp(DutchDateTime.PureNumBetweenAnd), + RegExpUtility.get_safe_reg_exp(DutchDateTime.PmRegex), + RegExpUtility.get_safe_reg_exp(DutchDateTime.AmRegex) + ] + + self._till_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TillRegex) + self._time_of_day_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeOfDayRegex) + self._general_ending_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.GeneralEndingRegex) + self._hour_regex: Pattern = RegExpUtility.get_safe_reg_exp(DutchDateTime.HourRegex) + self._period_desc_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.DescRegex) + self._period_hour_num_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PeriodHourNumRegex) + self._specific_time_of_day_regex: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeOfDayRegex) + self.time_followed_unit: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeFollowedUnit) + self.time_number_combined_with_unit: Pattern = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeNumberCombinedWithUnit) + + self.from_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.FromRegex) + self.between_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BetweenRegex) + self._time_unit_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeUnitRegex) + self.range_connector_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.RangeConnectorRegex) + self.before_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BeforeRegex) + self._time_date_from_to_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeDateFromTo) + self._specific_time_from_to_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeFromTo) + self._specific_time_between_and_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeBetweenAnd) + self._preposition_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PrepositionRegex) + self._token_before_date = DutchDateTime.TokenBeforeDate + self._pure_number_regex = [DutchDateTime.PureNumFromTo, DutchDateTime.PureNumFromTo] + self._time_zone_extractor = BaseTimeZoneExtractor( + DutchTimeZoneExtractorConfiguration()) + self.between_token_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.BetweenTokenRegex) + + 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.between_token_regex.search(source) + if match: + return MatchedIndex(True, match.start()) + + return MatchedIndex(False, -1) + + def is_connector_token(self, source: str): + return self.range_connector_regex.match(source) + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timeperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timeperiod_parser_config.py new file mode 100644 index 0000000000..85966753b1 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timeperiod_parser_config.py @@ -0,0 +1,134 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility +from recognizers_text.extractor import Extractor +from recognizers_number.number.dutch.extractors import DutchIntegerExtractor +from ...resources.dutch_date_time import DutchDateTime +from ..extractors import DateTimeExtractor +from ..parsers import DateTimeParser +from ..base_configs import BaseDateParserConfiguration, DateTimeUtilityConfiguration +from ..base_timeperiod import TimePeriodParserConfiguration, MatchedTimeRegex +from ..constants import Constants +from ..utilities import TimexUtil +from ..base_timezone import BaseTimeZoneParser + + +class DutchTimePeriodParserConfiguration(TimePeriodParserConfiguration): + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def pure_number_from_to_regex(self) -> Pattern: + return self._pure_number_from_to_regex + + @property + def pure_number_between_and_regex(self) -> Pattern: + return self._pure_number_between_and_regex + + @property + def specific_time_from_to_regex(self) -> Pattern: + return self._specific_time_from_to_regex + + @property + def specific_time_between_and_regex(self) -> Pattern: + return self._specific_time_between_and_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def numbers(self) -> Dict[str, int]: + return self._numbers + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return self._utility_configuration + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + def __init__(self, config: BaseDateParserConfiguration): + self._time_extractor = config.time_extractor + self._time_parser = config.time_parser + self._integer_extractor = config.integer_extractor + self._numbers = config.numbers + self._utility_configuration = config.utility_configuration + self._pure_number_from_to_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PureNumFromTo) + self._pure_number_between_and_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.PureNumBetweenAnd) + self._specific_time_from_to_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeFromTo) + self._specific_time_between_and_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.SpecificTimeBetweenAnd) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TimeOfDayRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp( + DutchDateTime.TillRegex) + self._time_zone_parser = config.time_zone_parser + + def get_matched_timex_range(self, source: str) -> MatchedTimeRegex: + trimmed_text = source.strip().lower() + if trimmed_text.endswith('s'): + trimmed_text = trimmed_text[:-1] + + if any(trimmed_text.endswith(o) for o in DutchDateTime.MorningTermList): + time_of_day = Constants.MORNING + elif any(trimmed_text.endswith(o) for o in DutchDateTime.AfternoonTermList): + time_of_day = Constants.AFTERNOON + elif any(trimmed_text.endswith(o) for o in DutchDateTime.EveningTermList): + time_of_day = Constants.EVENING + elif any(trimmed_text.endswith(o) for o in DutchDateTime.DaytimeTermList): + time_of_day = Constants.DAYTIME + elif any(trimmed_text.endswith(o) for o in DutchDateTime.NightTermList): + time_of_day = Constants.NIGHT + elif all(trimmed_text.endswith(o) for o in DutchDateTime.BusinessHourSplitStrings): + time_of_day = Constants.BUSINESS_HOUR + elif all(trimmed_text.endswith(o) for o in DutchDateTime.BusinessHourSplitStrings2): + time_of_day = Constants.BUSINESS_HOUR + elif any(trimmed_text.endswith(o) for o in DutchDateTime.MealtimeBreakfastTermList): + time_of_day = Constants.MEALTIME_BREAKFAST + elif any(trimmed_text.endswith(o) for o in DutchDateTime.MealtimeLunchTermList): + time_of_day = Constants.MEALTIME_LUNCH + elif any(trimmed_text.endswith(o) for o in DutchDateTime.MealtimeDinnerTermList): + time_of_day = Constants.MEALTIME_DINNER + else: + return MatchedTimeRegex( + matched=False, + timex='', + begin_hour=0, + end_hour=0, + end_min=0 + ) + + parse_result = TimexUtil.parse_time_of_day(time_of_day) + timex = parse_result.timex + begin_hour = parse_result.begin_hour + end_hour = parse_result.end_hour + end_min = parse_result.end_min + + return MatchedTimeRegex( + matched=True, + timex=timex, + begin_hour=begin_hour, + end_hour=end_hour, + end_min=end_min + ) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timezone_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timezone_extractor_config.py new file mode 100644 index 0000000000..7d9c1f5fda --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/dutch/timezone_extractor_config.py @@ -0,0 +1,52 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from typing import List, Pattern +from recognizers_text.matcher.string_matcher import StringMatcher +from recognizers_text.utilities import QueryProcessor +from ..base_timezone import TimeZoneExtractorConfiguration +from ...resources.english_time_zone import TimeZoneDefinitions +from ..utilities import TimeZoneUtility, RegExpUtility + + +class DutchTimeZoneExtractorConfiguration(TimeZoneExtractorConfiguration): + @property + def timezone_matcher(self): + return self._timezone_matcher + + @property + def direct_utc_regex(self) -> Pattern: + return self._direct_utc_regex + + @property + def abbreviations_list(self) -> List[str]: + return self._abbreviations_list + + @property + def full_name_list(self) -> List[str]: + return self._full_name_list + + @property + def location_time_suffix_regex(self) -> Pattern: + return self._location_time_suffix_regex + + @property + def location_matcher(self) -> StringMatcher: + return self._location_matcher + + @property + def ambiguous_timezone_list(self) -> List[str]: + return self._ambiguous_timezone_list + + def __init__(self): + super().__init__() + + self._direct_utc_regex = RegExpUtility.get_safe_reg_exp(TimeZoneDefinitions.DirectUtcRegex) + self._abbreviations_list = list(TimeZoneDefinitions.AbbreviationsList) + self._full_name_list = list(TimeZoneDefinitions.FullNameList) + self._timezone_matcher = TimeZoneUtility.build_matcher_from_lists(self.full_name_list, self.abbreviations_list) + self._location_time_suffix_regex = RegExpUtility.get_safe_reg_exp(TimeZoneDefinitions.LocationTimeSuffixRegex) + self._location_matcher = StringMatcher() + self._ambiguous_timezone_list = list(TimeZoneDefinitions.AmbiguousTimezoneList) + + self._location_matcher.init(list(map(lambda o: QueryProcessor.remove_diacritics(o.lower()), TimeZoneDefinitions.MajorLocations))) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/time_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/time_parser_config.py index b48ec064aa..8da42351f1 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/time_parser_config.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/time_parser_config.py @@ -91,8 +91,8 @@ def adjust_by_prefix(self, prefix: str, adjust: AdjustParams): match, 'deltaminnum').lower() delta_min = self.numbers.get(min_str) - if trimmed_prefix.startswith('zum'): - delta_min = delta_min * -1 + if trimmed_prefix.endswith('vor'): + delta_min = delta_min * -1 adjust.minute += delta_min diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/italian/time_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/italian/time_parser_config.py index b5d735b54b..a34d3e2510 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/italian/time_parser_config.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/italian/time_parser_config.py @@ -76,7 +76,7 @@ def adjust_by_prefix(self, prefix: str, adjust: AdjustParams): match, 'deltaminnum').lower() delta_min = self.numbers.get(min_str) - if trimmed_prefix.startswith('meno'): + if trimmed_prefix.startswith('meno') or trimmed_prefix.endswith('alle'): delta_min = delta_min * -1 adjust.minute += delta_min diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/__init__.py new file mode 100644 index 0000000000..4b414b7d83 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/__init__.py @@ -0,0 +1,21 @@ +from .common_configs import * +from .duration_extractor_config import * +from .date_extractor_config import * +from .time_extractor_config import * +from .datetime_extractor_config import * +from .dateperiod_extractor_config import * +from .timeperiod_extractor_config import * +from .datetimeperiod_extractor_config import * +from .set_extractor_config import * +from .holiday_extractor_config import * +from .merged_extractor_config import * +from .duration_parser_config import * +from .date_parser_config import * +from .time_parser_config import * +from .datetime_parser_config import * +from .dateperiod_parser_config import * +from .timeperiod_parser_config import * +from .datetimeperiod_parser_config import * +from .set_parser_config import * +from .holiday_parser_config import * +from .merged_parser_config import * diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/common_configs.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/common_configs.py new file mode 100644 index 0000000000..ec4f485d15 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/common_configs.py @@ -0,0 +1,236 @@ +from typing import Dict + +from recognizers_date_time.date_time.base_timezone import BaseTimeZoneParser +from recognizers_date_time.date_time.utilities.datetime_utility_config import DateTimeUtilityConfiguration +from recognizers_number import BaseNumberExtractor + +from recognizers_number.number.japanese.parsers import JapaneseNumberParserConfiguration +from recognizers_number.number.japanese.extractors import JapaneseIntegerExtractor, JapaneseOrdinalExtractor, \ + JapaneseCardinalExtractor +from recognizers_number.number.cjk_parsers import CJKNumberParser + +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.CJK import CJKCommonDateTimeParserConfiguration, BaseCJKDateTimeExtractor, \ + BaseCJKDateTimePeriodExtractor, BaseCJKDurationExtractor, BaseCJKHolidayExtractor, BaseCJKSetExtractor, \ + BaseCJKDateTimeParser, BaseCJKDateTimePeriodParser, BaseCJKDurationParser, BaseCJKHolidayParser, \ + BaseCJKSetParser, BaseCJKTimeExtractor, BaseCJKTimePeriodExtractor, BaseCJKTimeParser, \ + BaseCJKTimePeriodParser, BaseCJKDateParser, BaseCJKDateExtractor, BaseCJKDatePeriodExtractor, \ + BaseCJKDatePeriodParser +from recognizers_date_time.date_time.japanese.datetime_extractor_config import JapaneseDateTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.datetimeperiod_extractor_config import \ + JapaneseDateTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.date_time.japanese.set_extractor_config import JapaneseSetExtractorConfiguration +from recognizers_date_time.date_time.japanese.holiday_extractor_config import JapaneseHolidayExtractorConfiguration + +from recognizers_date_time.date_time.japanese.datetime_parser_config import JapaneseDateTimeParserConfiguration +from recognizers_date_time.date_time.japanese.datetimeperiod_parser_config import \ + JapaneseDateTimePeriodParserConfiguration +from recognizers_date_time.date_time.japanese.duration_parser_config import JapaneseDurationParserConfiguration +from recognizers_date_time.date_time.japanese.set_parser_config import JapaneseSetParserConfiguration +from recognizers_date_time.date_time.japanese.holiday_parser_config import JapaneseHolidayParserConfiguration +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.timeperiod_extractor_config import \ + JapaneseTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.timeperiod_parser_config import JapaneseTimePeriodParserConfiguration +from recognizers_date_time.date_time.japanese.time_parser_config import JapaneseTimeParserConfiguration +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.japanese.dateperiod_extractor_config import \ + JapaneseDatePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.date_parser_config import JapaneseDateParserConfiguration +from recognizers_date_time.date_time.japanese.dateperiod_parser_config import JapaneseDatePeriodParserConfiguration +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser + + +class JapaneseCommonDateTimeParserConfiguration(CJKCommonDateTimeParserConfiguration): + + @property + def cardinal_extractor(self) -> BaseNumberExtractor: + return self._cardinal_extractor + + @property + def integer_extractor(self) -> JapaneseIntegerExtractor: + return self._integer_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def number_parser(self) -> CJKNumberParser: + return self._number_parser + + @property + def date_extractor(self) -> BaseCJKDateExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def set_extractor(self) -> DateTimeExtractor: + return self._set_extractor + + @property + def holiday_extractor(self) -> DateTimeExtractor: + return self._holiday_extractor + + @property + def date_parser(self) -> BaseCJKDateParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def date_period_parser(self) -> DateTimeParser: + return self._date_period_parser + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def date_time_period_parser(self) -> DateTimeParser: + return self._date_time_period_parser + + @property + def set_parser(self) -> DateTimeParser: + return self._set_parser + + @property + def holiday_parser(self) -> DateTimeParser: + return self._holiday_parser + + @property + def date_time_alt_parser(self) -> DateTimeParser: + return None + + @property + def time_zone_parser(self) -> DateTimeParser: + return self._time_zone_parser + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def numbers(self) -> Dict[str, int]: + return None + + @property + def unit_value_map(self) -> Dict[str, int]: + return self._unit_value_map + + @property + def season_map(self) -> Dict[str, str]: + return self._season_map + + @property + def special_year_prefixes_map(self) -> Dict[str, str]: + return None + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def double_numbers(self) -> Dict[str, int]: + return None + + @property + def written_decades(self) -> Dict[str, int]: + return None + + @property + def special_decade_cases(self) -> Dict[str, int]: + return None + + @property + def utility_configuration(self) -> DateTimeUtilityConfiguration: + return None + + def __init__(self): + super().__init__() + + self._unit_map = JapaneseDateTime.ParserConfigurationUnitMap + self._unit_value_map = JapaneseDateTime.DurationUnitValueMap + self._cardinal_map = JapaneseDateTime.ParserConfigurationCardinalMap + self._day_of_month = JapaneseDateTime.ParserConfigurationDayOfMonth + self._day_of_week = JapaneseDateTime.ParserConfigurationDayOfWeek + self._month_of_year = JapaneseDateTime.ParserConfigurationMonthOfYear + + self._integer_extractor = JapaneseIntegerExtractor() + self._cardinal_extractor = JapaneseCardinalExtractor() + self._ordinal_extractor = JapaneseOrdinalExtractor() + self._number_parser = CJKNumberParser(JapaneseNumberParserConfiguration()) + + # Do not change order. The order of initialization can lead to side effects + self._date_extractor = BaseCJKDateExtractor( + JapaneseDateExtractorConfiguration()) + self._time_extractor = BaseCJKTimeExtractor(JapaneseTimeExtractorConfiguration()) + self._date_time_extractor = BaseCJKDateTimeExtractor(JapaneseDateTimeExtractorConfiguration()) + self._duration_extractor = BaseCJKDurationExtractor(JapaneseDurationExtractorConfiguration()) + self._date_period_extractor = BaseCJKDatePeriodExtractor( + JapaneseDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseCJKTimePeriodExtractor(JapaneseTimePeriodExtractorConfiguration()) + self._date_time_period_extractor = BaseCJKDateTimePeriodExtractor( + JapaneseDateTimePeriodExtractorConfiguration()) + self._holiday_extractor = BaseCJKHolidayExtractor(JapaneseHolidayExtractorConfiguration()) + self._set_extractor = BaseCJKSetExtractor(JapaneseSetExtractorConfiguration()) + + self._duration_parser = BaseCJKDurationParser(JapaneseDurationParserConfiguration(self)) + self._date_parser = BaseCJKDateParser(JapaneseDateParserConfiguration(self)) + self._time_parser = BaseCJKTimeParser(JapaneseTimeParserConfiguration(self)) + self._date_time_parser = BaseCJKDateTimeParser(JapaneseDateTimeParserConfiguration(self)) + self._date_period_parser = BaseCJKDatePeriodParser(JapaneseDatePeriodParserConfiguration(self)) + self._time_period_parser = BaseCJKTimePeriodParser(JapaneseTimePeriodParserConfiguration(self)) + self._date_time_period_parser = BaseCJKDateTimePeriodParser(JapaneseDateTimePeriodParserConfiguration(self)) + self._holiday_parser = BaseCJKHolidayParser(JapaneseHolidayParserConfiguration(self)) + self._set_parser = BaseCJKSetParser(JapaneseSetParserConfiguration(self)) + + self._season_map = JapaneseDateTime.ParserConfigurationSeasonMap + self._time_zone_parser = BaseTimeZoneParser() diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/date_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/date_extractor_config.py new file mode 100644 index 0000000000..3852d83b54 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/date_extractor_config.py @@ -0,0 +1,270 @@ +from typing import List, Pattern, Dict + +from recognizers_text import RegExpUtility +from recognizers_number import JapaneseIntegerExtractor, CJKNumberParser, JapaneseNumberParserConfiguration +from recognizers_date_time.date_time.CJK import CJKDateExtractorConfiguration, BaseCJKDurationExtractor +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.resources import JapaneseDateTime +from recognizers_date_time.resources.base_date_time import BaseDateTime + + +class JapaneseDateExtractorConfiguration(CJKDateExtractorConfiguration): + + @property + def week_day_regex(self) -> Pattern: + return self._week_day_regex + + @property + def lunar_regex(self) -> Pattern: + return self._lunar_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def week_day_of_month_regex(self) -> Pattern: + return self._week_day_of_month + + @property + def special_date_regex(self) -> Pattern: + return self._special_date_regex + + @property + def special_day_with_num_regex(self) -> Pattern: + return self._special_day_with_num_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def week_day_start_end(self) -> Pattern: + return self._week_day_start_end + + @property + def datetime_period_unit_regex(self) -> Pattern: + return self._datetime_period_unit_regex + + @property + def range_connector_symbol_regex(self) -> Pattern: + return self._range_connector_symbol_regex + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def day_regex(self): + return self._day_regex + + @property + def date_day_regex_in_cjk(self) -> Pattern: + return self._date_day_regex_in_CJK + + @property + def day_regex_num_in_cjk(self) -> Pattern: + return self._day_regex_num_in_CJK + + @property + def month_num_regex(self) -> Pattern: + return self._month_num_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + @property + def duration_relative_duration_unit_regex(self) -> Pattern: + return self._duration_relative_duration_unit_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def relative_regex(self) -> Pattern: + return self._relative_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def zero_to_nine_integer_regex_cjk(self) -> Pattern: + return self._zero_to_nine_integer_regex_cjk + + @property + def date_year_in_cjk_regex(self) -> Pattern: + return self._date_year_in_cjk_regex + + @property + def this_prefix_regex(self) -> Pattern: + return self._this_prefix_regex + + @property + def last_prefix_regex(self) -> Pattern: + return self._last_prefix_regex + + @property + def next_prefix_regex(self) -> Pattern: + return self._next_prefix_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def dynasty_year_regex(self) -> Pattern: + return self._dynasty_year_regex + + @property + def dynasty_start_year(self) -> str: + return self._dynasty_start_year + + @property + def dynasty_year_map(self) -> Dict[str, int]: + return self._dynasty_year_map + + @property + def date_regex_list(self) -> List[Pattern]: + return self._date_regex_list + + @property + def implicit_date_list(self) -> List[Pattern]: + return self._implicit_date_list + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def ambiguity_date_filters_dict(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_date_filters_dict + + @property + def number_parser(self) -> CJKNumberParser: + return self._number_parser + + @property + def time_clock_desc_regex(self) -> Pattern: + return self._time_clock_desc_regex + + @property + def time_minutes_desc_regex(self) -> Pattern: + return self._time_minutes_desc_regex + + def __init__(self): + self._duration_extractor = BaseCJKDurationExtractor( + JapaneseDurationExtractorConfiguration(), False) + + # 2016年12月1日 + self._date_regex_list_1 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList1) + + # 金曜日 6月 15日 + self._date_regex_list_2 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList2) + + # (2015年)?(农历)?十月二十(星期三)? + self._date_regex_list_3 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList3) + + # 2015-12-23 + self._date_regex_list_8 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList8) + + # 23/7 + self._date_regex_list_5 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList5) + + # 7/23 + self._date_regex_list_4 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList4) + + # 23-3-2017 + self._date_regex_list_7 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList7) + + # 3-23-2015 + self._date_regex_list_6 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList6) + + # 12月1日 + self._date_regex_list_9 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList9) + + # 2015/12/23 + self._date_regex_list_10 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList10) + + # 2016/12 (this is not a Date) + # self._date_regex_list_11 = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateRegexList11) + + self._date_regex_list = [ + self._date_regex_list_1, self._date_regex_list_10, self._date_regex_list_2, self._date_regex_list_9, + self._date_regex_list_3, self._date_regex_list_4, self._date_regex_list_5 + ] + + # Regex precedence where the order between D and M varies is controlled by DefaultLanguageFallback + + if JapaneseDateTime.DefaultLanguageFallback == Constants.DEFAULT_LANGUAGE_FALLBACK_DMY: + self._date_regex_list.extend([self._date_regex_list_7, self._date_regex_list_6, self._date_regex_list_8]) + else: + self._date_regex_list.extend([self._date_regex_list_6, self._date_regex_list_7, self._date_regex_list_8]) + + self._integer_extractor = JapaneseIntegerExtractor() + self._number_parser = CJKNumberParser(JapaneseNumberParserConfiguration()) + + self._week_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekDayRegex) + self._lunar_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LunarRegex) + self._this_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateThisRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateLastRegex) + self._next_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateNextRegex) + self._special_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecialDayRegex) + self._week_day_of_month = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekDayOfMonthRegex) + self._special_date_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecialDate) + self._special_day_with_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecialDayWithNumRegex) + self._month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthRegex) + self._day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DayRegex) + self._date_day_regex_in_CJK = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateDayRegexInCJK) + self._day_regex_num_in_CJK = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DayRegexNumInCJK) + self._month_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthNumRegex) + self._week_day_and_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekDayAndDayRegex) + self._duration_relative_duration_unit_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.DurationRelativeDurationUnitRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearRegex) + self._relative_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.RelativeRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.RelativeMonthRegex) + self._zero_to_nine_integer_regex_cjk = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.ZeroToNineIntegerRegexCJK) + self._date_year_in_cjk_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateYearInCJKRegex) + self._this_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ThisPrefixRegex) + self._last_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LastPrefixRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NextPrefixRegex) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.UnitRegex) + self._dynasty_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DynastyYearRegex) + self._dynasty_start_year = JapaneseDateTime.DynastyStartYear + self._dynasty_year_map = JapaneseDateTime.DynastyYearMap + + self._datetime_period_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodUnitRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AfterRegex) + self._week_day_start_end = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekDayStartEnd) + self._range_connector_symbol_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.RangeConnectorSymbolRegex) + self._ambiguity_date_filters_dict = JapaneseDateTime.AmbiguityDateTimeFiltersDict + self._time_clock_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeClockDescRegex) + self._time_minutes_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeMinuteDescRegex) + + self._implicit_date_list = [ + self.special_day_with_num_regex, self.special_day_regex, self.this_regex, self.last_regex, self.next_regex, + self.week_day_regex, self.week_day_of_month_regex, self.special_date_regex, self.week_day_and_day_regex + ] diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/date_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/date_parser_config.py new file mode 100644 index 0000000000..b6b45b8429 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/date_parser_config.py @@ -0,0 +1,254 @@ +from typing import List, Pattern, Dict + +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.CJK.base_configs import CJKCommonDateTimeParserConfiguration +from recognizers_number import BaseNumberExtractor, BaseNumberParser +from recognizers_text import RegExpUtility +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.CJK.base_date import CJKDateParserConfiguration + +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseDateParserConfiguration(CJKDateParserConfiguration): + + @property + def plus_one_day_regex(self) -> Pattern: + return self._plus_one_day_regex + + @property + def minus_one_day_regex(self) -> Pattern: + return self._minus_one_day_regex + + @property + def plus_two_day_regex(self) -> Pattern: + return self._plus_two_day_regex + + @property + def minus_two_day_regex(self) -> Pattern: + return self._minus_two_day_regex + + @property + def plus_three_day_regex(self) -> Pattern: + return self._plus_three_day_regex + + @property + def minus_three_day_regex(self) -> Pattern: + return self._minus_three_day_regex + + @property + def plus_four_day_regex(self) -> Pattern: + return self._plus_four_day_regex + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def ordinal_extractor(self) -> BaseNumberExtractor: + return self._ordinal_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def date_regex_list(self) -> List[Pattern]: + return self._date_regex_list + + @property + def special_date(self) -> Pattern: + return self._special_date + + @property + def next_re(self) -> Pattern: + return self._next_re + + @property + def last_re(self) -> Pattern: + return self._last_re + + @property + def special_day_regex(self) -> Pattern: + return self._special_day_regex + + @property + def strict_week_day_regex(self) -> Pattern: + return self._strict_week_day_regex + + @property + def lunar_regex(self) -> Pattern: + return self._lunar_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def week_day_of_month_regex(self) -> any: + return self._week_day_of_month_regex + + @property + def week_day_and_day_regex(self) -> Pattern: + return self._week_day_and_day_regex + + @property + def duration_relative_duration_unit_regex(self) -> Pattern: + return self._duration_relative_duration_unit_regex + + @property + def special_day_with_num_regex(self) -> Pattern: + return self._special_day_with_num_regex + + @property + def dynasty_year_regex(self) -> Pattern: + return self._dynasty_year_regex + + @property + def dynasty_year_map(self) -> Dict[str, int]: + return self._dynasty_year_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def day_of_week(self) -> Dict[str, int]: + return self._day_of_week + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def dynasty_start_year(self) -> Pattern: + return self._dynasty_start_year + + @property + def last_week_day_regex(self) -> Pattern: + return self._last_week_day_regex + + @property + def next_month_regex(self) -> Pattern: + return self._next_month_regex + + @property + def last_month_regex(self) -> Pattern: + return self._last_month_regex + + def get_swift_day(self, source: str) -> int: + source = source.strip().lower() + swift = 0 + + if RegExpUtility.match_begin(self.plus_one_day_regex, source, trim=True): + swift = 1 + elif RegExpUtility.match_begin(self.minus_one_day_regex, source, trim=True): + swift = -1 + + if RegExpUtility.is_exact_match(self.plus_one_day_regex, source, trim=False): + swift = 1 + elif RegExpUtility.is_exact_match(self.plus_three_day_regex, source, trim=False): + swift = 3 + elif RegExpUtility.is_exact_match(self.plus_four_day_regex, source, trim=False): + swift = 4 + elif RegExpUtility.is_exact_match(self.minus_three_day_regex, source, trim=False): + swift = -3 + elif RegExpUtility.is_exact_match(self.minus_one_day_regex, source, trim=False): + swift = -1 + elif RegExpUtility.is_exact_match(self.plus_two_day_regex, source, trim=False): + swift = 2 + elif RegExpUtility.is_exact_match(self.minus_two_day_regex, source, trim=False): + swift = -2 + return swift + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + super().__init__() + self._integer_extractor = config.integer_extractor + self._ordinal_extractor = config.ordinal_extractor + + self._number_parser = config.number_parser + + self._date_extractor = config.date_extractor + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + + self._date_regex_list = JapaneseDateExtractorConfiguration().date_regex_list + self._special_date = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecialDate) + self._next_re = JapaneseDateExtractorConfiguration().next_prefix_regex + self._last_re = JapaneseDateExtractorConfiguration().last_prefix_regex + self._special_day_regex = JapaneseDateExtractorConfiguration().special_day_regex + self._strict_week_day_regex = JapaneseDateExtractorConfiguration().week_day_regex + self._lunar_regex = JapaneseDateExtractorConfiguration().lunar_regex + + self._unit_regex = JapaneseDateExtractorConfiguration().date_unit_regex + self._before_regex = JapaneseDateExtractorConfiguration().before_regex + self._after_regex = JapaneseDateExtractorConfiguration().after_regex + self._dynasty_year_regex = JapaneseDateExtractorConfiguration().dynasty_year_regex + self._dynasty_start_year = JapaneseDateExtractorConfiguration().dynasty_start_year + self._dynasty_year_map = JapaneseDateExtractorConfiguration().dynasty_year_map + self._next_regex = JapaneseDateExtractorConfiguration().next_regex + self._this_regex = JapaneseDateExtractorConfiguration().this_regex + self._last_regex = JapaneseDateExtractorConfiguration().last_regex + self._week_day_of_month_regex = JapaneseDateExtractorConfiguration().week_day_of_month_regex + self._week_day_and_day_regex = JapaneseDateExtractorConfiguration().week_day_and_day_regex + self._duration_relative_duration_unit_regex = \ + JapaneseDateExtractorConfiguration().duration_relative_duration_unit_regex + self._special_day_with_num_regex = JapaneseDateExtractorConfiguration().special_day_with_num_regex + + self._cardinal_map = config.cardinal_map + self._unit_map = config.unit_map + self._day_of_month = config.day_of_month + self._day_of_week = config.day_of_week + self._month_of_year = config.month_of_year + + self._plus_one_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PlusOneDayRegex) + self._minus_one_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MinusOneDayRegex) + self._plus_two_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PlusTwoDayRegex) + self._minus_two_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MinusTwoDayRegex) + self._plus_three_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PlusThreeDayRegex) + self._minus_three_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MinusThreeDayRegex) + self._plus_four_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PlusFourDayRegex) + self._next_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationNextMonthRegex) + self._last_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationLastMonthRegex) + self._last_week_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationLastWeekDayRegex) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/dateperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/dateperiod_extractor_config.py new file mode 100644 index 0000000000..c8254971d9 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/dateperiod_extractor_config.py @@ -0,0 +1,337 @@ +from typing import List, Pattern, Dict + +from recognizers_text import Extractor, RegExpUtility +from recognizers_number import JapaneseNumberExtractor +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.date_time.CJK import BaseCJKDateExtractor, CJKDatePeriodExtractorConfiguration, \ + BaseCJKDurationExtractor +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.extractors import DateTimeExtractor + + +class JapaneseDatePeriodExtractorConfiguration(CJKDatePeriodExtractorConfiguration): + + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def range_prefix_regex(self) -> Pattern: + return self._range_prefix_regex + + @property + def range_suffix_regex(self) -> Pattern: + return self._range_suffix_regex + + @property + def strict_year_regex(self) -> Pattern: + return self._strict_year_regex + + @property + def year_in_cjk_regex(self) -> Pattern: + return self._year_in_cjk_regex + + # for case "(より)?(2017)?12日に1月10日" + @property + def simple_cases_regex(self) -> Pattern: + return self._simple_cases_regex + + @property + def year_and_month(self) -> Pattern: + return self._year_and_month + + # 2017.12, 2017-12, 2017/12, 12/2017 + @property + def pure_num_year_and_month(self) -> Pattern: + return self._pure_num_year_and_month + + @property + def simple_year_and_month(self) -> Pattern: + return self._simple_year_and_month + + @property + def one_word_period_regex(self) -> Pattern: + return self._one_word_period_regex + + @property + def week_of_month_regex(self) -> Pattern: + return self._week_of_month_regex + + @property + def week_of_year_regex(self) -> Pattern: + return self._week_of_year_regex + + @property + def week_of_date_regex(self) -> Pattern: + return self._week_of_date_regex + + @property + def month_of_date_regex(self) -> Pattern: + return self._month_of_date_regex + + @property + def which_week_regex(self) -> Pattern: + return self._which_week_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 year_to_year(self) -> Pattern: + return self._year_to_year + + @property + def year_to_year_suffix_required(self) -> Pattern: + return self._year_to_year_suffix_required + + @property + def month_to_month(self) -> Pattern: + return self._month_to_month + + @property + def month_to_month_suffix_required(self) -> Pattern: + return self._month_to_month_suffix_required + + @property + def day_to_day(self) -> Pattern: + return self._day_to_day + + @property + def day_regex_for_period(self) -> Pattern: + return self._day_regex_for_period + + @property + def month_day_range(self) -> Pattern: + return self._month_day_range + + @property + def year_month_range(self) -> Pattern: + return self._year_month_range + + @property + def year_month_day_range(self) -> Pattern: + return self._year_month_day_range + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def week_with_weekday_range_regex(self) -> Pattern: + return self._week_with_weekday_range_regex + + @property + def first_last_of_year_regex(self) -> Pattern: + return self._first_last_of_year_regex + + @property + def season_with_year_regex(self) -> Pattern: + return self._season_with_year_regex + + @property + def quarter_regex(self) -> Pattern: + return self._quarter_regex + + @property + def decade_regex(self) -> Pattern: + return self._decade_regex + + @property + def century_regex(self) -> Pattern: + return self._century_regex + + @property + def special_month_regex(self) -> Pattern: + return self._special_month_regex + + @property + def special_year_regex(self) -> Pattern: + return self._special_year_regex + + @property + def day_regex(self) -> Pattern: + return self._day_regex + + @property + def day_regex_in_cjk(self) -> Pattern: + return self._day_regex_in_cjk + + @property + def month_num_regex(self) -> Pattern: + return self._month_num_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def date_unit_regex(self) -> Pattern: + return self._date_unit_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def later_early_period_regex(self) -> Pattern: + return self._later_early_period_regex + + @property + def date_point_with_ago_and_later(self) -> Pattern: + return self._date_point_with_ago_and_later + + @property + def reference_date_period_regex(self) -> Pattern: + return self._reference_date_period_regex + + @property + def complex_date_period_regex(self) -> Pattern: + return self._complex_date_period_regex + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def year_regex_in_number(self) -> Pattern: + return self._year_regex_in_number + + @property + def zero_to_nine_integer_regex_cjk(self) -> Pattern: + return self._zero_to_nine_integer_regex_cjk + + @property + def month_suffix_regex(self) -> Pattern: + return self._month_suffix_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def duration_unit_regex(self) -> Pattern: + return self._duration_unit_regex + + @property + def season_regex(self): + return self._season_regex + + @property + def date_point_extractor(self) -> DateTimeExtractor: + return self._date_point_extractor + + @property + def duration_extractor(self): + return self._duration_extractor + + @property + def integer_extractor(self) -> Extractor: + return self._integer_extractor + + @property + def simple_cases_regexes(self) -> List[Pattern]: + return self._simple_cases_regexes + + @property + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_filters_dict + + def __init__(self): + super().__init__() + self._till_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodTillRegex) + self._range_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodRangePrefixRegex) + self._range_suffix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodRangeSuffixRegex) + self._strict_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.StrictYearRegex) + self._year_in_cjk_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodYearInCJKRegex) + self._simple_cases_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SimpleCasesRegex) + self._year_and_month = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearAndMonth) + self._pure_num_year_and_month = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PureNumYearAndMonth) + self._simple_year_and_month = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SimpleYearAndMonth) + self._one_word_period_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.OneWordPeriodRegex) + self._week_of_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekOfMonthRegex) + self._week_of_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekOfYearRegex) + self._week_of_date_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekOfDateRegex) + self._month_of_date_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthOfDateRegex) + self._which_week_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WhichWeekRegex) + self._followed_unit = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.FollowedUnit) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NumberCombinedWithUnit) + self._year_to_year = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearToYear) + self._year_to_year_suffix_required = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.YearToYearSuffixRequired) + self._month_to_month = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthToMonth) + self._month_to_month_suffix_required = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.MonthToMonthSuffixRequired) + self._day_to_day = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DayToDay) + self._day_regex_for_period = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DayRegexForPeriod) + self._month_day_range = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthDayRange) + self._year_month_range = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearMonthRange) + self._year_month_day_range = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearMonthDayRange) + self._past_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PastRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.FutureRegex) + self._week_with_weekday_range_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekWithWeekDayRangeRegex) + self._first_last_of_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekWithWeekDayRangeRegex) + self._season_with_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SeasonWithYear) + self._quarter_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.QuarterRegex) + self._decade_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DecadeRegex) + self._century_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.CenturyRegex) + self._special_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecialMonthRegex) + self._special_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecialYearRegex) + + self._day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DayRegex) + self._day_regex_in_cjk = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodDayRegexInCJK) + self._month_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthNumRegex) + self._this_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodThisRegex) + self._date_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateUnitRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodLastRegex) + self._next_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodNextRegex) + self._relative_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.RelativeMonthRegex) + self._later_early_period_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LaterEarlyPeriodRegex) + self._date_point_with_ago_and_later = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePointWithAgoAndLater) + self._reference_date_period_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ReferenceDatePeriodRegex) + self._complex_date_period_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ComplexDatePeriodRegex) + self._month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthRegex) + self._year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearRegex) + self._year_regex_in_number = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearRegexInNumber) + self._zero_to_nine_integer_regex_cjk = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.ZeroToNineIntegerRegexCJK) + self._month_suffix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthSuffixRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.UnitRegex) + self._duration_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationUnitRegex) + self._season_regex = JapaneseDateTime.SeasonRegex + + self._simple_cases_regexes = [ + self._simple_cases_regex, self._one_word_period_regex, self._strict_year_regex, self._year_to_year, + self._year_to_year_suffix_required, self._month_to_month, self._day_to_day, self._year_month_range, + self._month_day_range, self._year_month_day_range, self._month_to_month_suffix_required, self._year_and_month, + self._pure_num_year_and_month, self._year_in_cjk_regex, self._special_month_regex, self._special_year_regex, + self._week_of_month_regex, self._week_of_year_regex, self._week_of_date_regex, self._month_of_date_regex, + self._which_week_regex, self._later_early_period_regex, self._season_with_year_regex, self._quarter_regex, + self._decade_regex, self._century_regex, self._reference_date_period_regex, self._date_point_with_ago_and_later] + + self._date_point_extractor = BaseCJKDateExtractor(JapaneseDateExtractorConfiguration()) + self._duration_extractor = BaseCJKDurationExtractor( + JapaneseDurationExtractorConfiguration(), False) + self._integer_extractor = JapaneseNumberExtractor() + self._ambiguity_filters_dict = JapaneseDateTime.AmbiguityFiltersDict diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/dateperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/dateperiod_parser_config.py new file mode 100644 index 0000000000..9a9e37ab53 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/dateperiod_parser_config.py @@ -0,0 +1,452 @@ +from typing import Pattern, Dict + +from recognizers_number import JapaneseIntegerExtractor, CJKNumberParser +from recognizers_text import RegExpUtility +from recognizers_date_time.date_time.CJK.base_date import BaseCJKDateExtractor, BaseCJKDateParser +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.CJK.base_dateperiod import CJKDatePeriodParserConfiguration +from recognizers_date_time.date_time.japanese.dateperiod_extractor_config import \ + JapaneseDatePeriodExtractorConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseDatePeriodParserConfiguration(CJKDatePeriodParserConfiguration): + + @property + def wom_last_regex(self) -> Pattern: + return self._wom_last_regex + + @property + def wom_previous_regex(self) -> Pattern: + return self._wom_previous_regex + + @property + def wom_next_regex(self) -> Pattern: + return self._wom_next_regex + + @property + def month_of_year(self) -> Dict[str, int]: + return self._month_of_year + + @property + def next_month_regex(self) -> Pattern: + return self._next_month_regex + + @property + def after_next_month_regex(self) -> Pattern: + return self._after_next_month_regex + + @property + def last_month_regex(self) -> Pattern: + return self._last_month_regex + + @property + def next_year_regex(self) -> Pattern: + return self._next_year_regex + + @property + def after_next_year_regex(self) -> Pattern: + return self._after_next_year_regex + + @property + def last_year_regex(self) -> Pattern: + return self._last_year_regex + + @property + def this_year_regex(self) -> Pattern: + return self._this_year_regex + + @property + def date_extractor(self) -> BaseCJKDateExtractor: + return self._date_extractor + + @property + def duration_extractor(self): + return self._duration_extractor + + @property + def cardinal_extractor(self): + return self._cardinal_extractor + + @property + def duration_parser(self): + raise self._duration_parser + + @property + def date_parser(self) -> BaseCJKDateParser: + return self._date_parser + + @property + def integer_extractor(self) -> JapaneseIntegerExtractor: + return self._integer_extractor + + @property + def number_parser(self) -> CJKNumberParser: + return self._number_parser + + @property + def dynasty_year_map(self) -> Dict[str, int]: + return self._dynasty_year_map + + @property + def unit_map(self) -> Dict[str, int]: + return self._unit_map + + @property + def cardinal_map(self) -> Dict[str, int]: + return self._cardinal_map + + @property + def day_of_month(self) -> Dict[str, int]: + return self._day_of_month + + @property + def season_map(self) -> Dict[str, int]: + return self._season_map + + @property + def dynasty_start_year(self) -> Pattern: + return self._dynasty_start_year + + @property + def token_before_date(self) -> str: + return self._token_before_date + + @property + def dynasty_year_regex(self) -> Pattern: + return self._dynasty_year_regex + + @property + def simple_cases_regex(self) -> Pattern: + return self._simple_cases_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def year_to_year(self) -> Pattern: + return self._year_to_year + + @property + def year_to_year_suffix_required(self) -> Pattern: + return self._year_to_year_suffix_required + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def relative_regex(self) -> Pattern: + return self._relative_regex + + @property + def relative_month_regex(self) -> Pattern: + return self._relative_month_regex + + @property + def later_early_period_regex(self) -> Pattern: + return self._later_early_period_regex + + @property + def date_period_with_ago_and_later(self) -> Pattern: + return self._date_period_with_ago_and_later + + @property + def reference_date_period_regex(self) -> Pattern: + return self._reference_date_period_regex + + @property + def complex_date_period_regex(self) -> Pattern: + return self._complex_date_period_regex + + @property + def duration_relative_duration_unit_regex(self) -> Pattern: + return self._duration_relative_duration_unit_regex + + @property + def year_in_cjk_regex(self) -> Pattern: + return self._year_in_cjk_regex + + @property + def month_to_month(self) -> Pattern: + return self._month_to_month + + @property + def month_to_month_suffix_required(self) -> Pattern: + return self._month_to_month_suffix_required + + @property + def month_regex(self) -> Pattern: + return self._month_regex + + @property + def year_and_month(self) -> Pattern: + return self._year_and_month + + @property + def pure_num_year_and_month(self) -> Pattern: + return self._pure_num_year_and_month + + @property + def one_word_period_regex(self) -> Pattern: + return self._one_word_period_regex + + @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 future_regex(self) -> Pattern: + return self._future_regex + + @property + def week_with_week_day_range_regex(self) -> Pattern: + return self._week_with_week_day_range_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def duration_unit_regex(self) -> Pattern: + return self._duration_unit_regex + + @property + def week_of_month_regex(self) -> Pattern: + return self._week_of_month_regex + + @property + def week_of_year_regex(self) -> Pattern: + return self._week_of_year_regex + + @property + def week_of_date_regex(self) -> Pattern: + return self._week_of_date_regex + + @property + def month_of_date_regex(self) -> Pattern: + return self._month_of_date_regex + + @property + def which_week_regex(self) -> Pattern: + return self._which_week_regex + + @property + def first_last_of_year_regex(self) -> Pattern: + return self._first_last_of_year_regex + + @property + def season_with_year(self) -> Pattern: + return self._season_with_year + + @property + def quarter_regex(self) -> Pattern: + return self._quarter_regex + + @property + def decade_regex(self) -> Pattern: + return self._decade_regex + + @property + def century_regex(self) -> Pattern: + return self._century_regex + + @property + def day_to_day(self) -> Pattern: + return self._day_to_day + + @property + def month_day_range(self) -> Pattern: + return self._month_day_range + + @property + def day_regex_for_period(self) -> Pattern: + return self._day_regex_for_period + + @property + def simple_year_and_month(self) -> Pattern: + return self._simple_year_and_month + + @property + def special_month_regex(self) -> Pattern: + return self._special_month_regex + + @property + def special_year_regex(self) -> Pattern: + return self._special_year_regex + + @property + def two_num_year(self) -> int: + return self._two_num_year + + @property + def date_point_with_ago_and_later(self) -> Pattern: + return self.date_period_with_ago_and_later + + def __init__(self, config): + super().__init__() + self._integer_extractor = config.integer_extractor + self._number_parser = config.number_parser + self._date_extractor = config.date_extractor + self._duration = config.duration_extractor + self._cardinal_extractor = config.cardinal_extractor + self._date_parser = config.date_parser + + self._dynasty_year_regex = JapaneseDateExtractorConfiguration().dynasty_year_regex + self._dynasty_start_year = JapaneseDateExtractorConfiguration().dynasty_start_year + self._dynasty_year_map = JapaneseDateExtractorConfiguration().dynasty_year_map + self._simple_cases_regex = JapaneseDatePeriodExtractorConfiguration().simple_cases_regex + self._this_regex = JapaneseDatePeriodExtractorConfiguration().this_regex + self._next_regex = JapaneseDatePeriodExtractorConfiguration().next_regex + self._last_regex = JapaneseDatePeriodExtractorConfiguration().last_regex + + self._year_to_year = JapaneseDatePeriodExtractorConfiguration().year_to_year + self._year_to_year_suffix_required = JapaneseDatePeriodExtractorConfiguration().year_to_year_suffix_required + self._year_regex = JapaneseDatePeriodExtractorConfiguration().year_regex + self._year_in_cjk_regex = JapaneseDatePeriodExtractorConfiguration().year_in_cjk_regex + self._month_to_month = JapaneseDatePeriodExtractorConfiguration().month_to_month + self._month_to_month_suffix_required = JapaneseDatePeriodExtractorConfiguration().month_to_month_suffix_required + self._day_to_day = JapaneseDatePeriodExtractorConfiguration().day_to_day + self._month_day_range = JapaneseDatePeriodExtractorConfiguration().month_day_range + self._day_regex_for_period = JapaneseDatePeriodExtractorConfiguration().day_regex_for_period + self._month_regex = JapaneseDatePeriodExtractorConfiguration().month_regex + self._special_month_regex = JapaneseDatePeriodExtractorConfiguration().special_month_regex + self._special_year_regex = JapaneseDatePeriodExtractorConfiguration().special_year_regex + self._year_and_month = JapaneseDatePeriodExtractorConfiguration().year_and_month + self._pure_num_year_and_month = JapaneseDatePeriodExtractorConfiguration().pure_num_year_and_month + self._simple_year_and_month = JapaneseDatePeriodExtractorConfiguration().simple_year_and_month + self._one_word_period_regex = JapaneseDatePeriodExtractorConfiguration().one_word_period_regex + self._number_combined_with_unit = JapaneseDatePeriodExtractorConfiguration().number_combined_with_unit + self._past_regex = JapaneseDatePeriodExtractorConfiguration().past_regex + self._future_regex = JapaneseDatePeriodExtractorConfiguration().future_regex + self._week_with_week_day_range_regex = JapaneseDatePeriodExtractorConfiguration().week_with_weekday_range_regex + self._unit_regex = JapaneseDatePeriodExtractorConfiguration().unit_regex + self._duration_unit_regex = JapaneseDatePeriodExtractorConfiguration().duration_unit_regex + self._week_of_month_regex = JapaneseDatePeriodExtractorConfiguration().week_of_month_regex + self._week_of_year_regex = JapaneseDatePeriodExtractorConfiguration().week_of_year_regex + self._week_of_date_regex = JapaneseDatePeriodExtractorConfiguration().week_of_date_regex + self._month_of_date_regex = JapaneseDatePeriodExtractorConfiguration().month_of_date_regex + self._which_week_regex = JapaneseDatePeriodExtractorConfiguration().which_week_regex + self._first_last_of_year_regex = JapaneseDatePeriodExtractorConfiguration().first_last_of_year_regex + self._season_with_year = JapaneseDatePeriodExtractorConfiguration().season_with_year_regex + self._quarter_regex = JapaneseDatePeriodExtractorConfiguration().quarter_regex + self._decade_regex = JapaneseDatePeriodExtractorConfiguration().decade_regex + self._century_regex = JapaneseDatePeriodExtractorConfiguration().century_regex + self._relative_regex = JapaneseDateExtractorConfiguration().relative_regex + self._relative_month_regex = JapaneseDateExtractorConfiguration().relative_month_regex + self._later_early_period_regex = JapaneseDatePeriodExtractorConfiguration().later_early_period_regex + self._date_period_with_ago_and_later = JapaneseDatePeriodExtractorConfiguration().date_point_with_ago_and_later + self._reference_date_period_regex = JapaneseDatePeriodExtractorConfiguration().reference_date_period_regex + self._complex_date_period_regex = JapaneseDatePeriodExtractorConfiguration().complex_date_period_regex + self._duration_relative_duration_unit_regex = JapaneseDateExtractorConfiguration().\ + duration_relative_duration_unit_regex + self._unit_map = JapaneseDateTime.ParserConfigurationUnitMap + self._cardinal_map = JapaneseDateTime.ParserConfigurationCardinalMap + self._day_of_month = JapaneseDateTime.ParserConfigurationDayOfMonth + self._season_map = JapaneseDateTime.ParserConfigurationSeasonMap + self._month_of_year = JapaneseDateTime.ParserConfigurationMonthOfYear + self._token_before_date = '' + + self._wom_previous_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WoMPreviousRegex) + self._wom_next_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WoMNextRegex) + self._wom_last_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WoMLastRegex) + self._next_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NextPrefixRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AfterRegex) + self._next_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationNextMonthRegex) + self._after_next_month_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.ParserConfigurationAfterNextMonthRegex) + self._last_month_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationLastMonthRegex) + self._next_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationNextYearRegex) + self._after_next_year_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.ParserConfigurationAfterNextYearRegex) + self._last_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationLastYearRegex) + self._this_year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationThisYearRegex) + self._two_num_year = int(JapaneseDateTime.TwoNumYear) + + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + + def to_month_number(self, month_str: str) -> int: + return self.month_of_year[month_str] % 12 if self.month_of_year[month_str] > 12 \ + else self.month_of_year[month_str] + + def is_month_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in JapaneseDateTime.MonthTerms) + + def is_weekend(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in JapaneseDateTime.WeekendTerms) + + def is_week_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.endswith(o) for o in JapaneseDateTime.WeekTerms) + + def is_year_only(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source.startswith(o) or trimmed_source.endswith(o) for o in JapaneseDateTime.YearTerms) + + def is_this_year(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in JapaneseDateTime.ThisYearTerms) + + def is_year_to_date(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in JapaneseDateTime.YearToDateTerms) + + def is_last_year(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in JapaneseDateTime.LastYearTerms) + + def is_next_year(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in JapaneseDateTime.NextYearTerms) + + def is_year_after_next(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in JapaneseDateTime.YearAfterNextTerms) + + def is_year_before_last(self, source: str) -> bool: + trimmed_source = source.strip().lower() + return any(trimmed_source == o for o in JapaneseDateTime.YearBeforeLastTerms) + + def get_swift_month(self, source: str) -> int: + # Current month: 今月 + value = 0 + + if self.next_month_regex.search(source): + value = 1 + elif self.last_month_regex.search(source): + value = -1 + elif self.after_next_month_regex.search(source): + value = 2 + + return value + + def get_swift_year(self, source: str) -> int: + value = -10 + + if self.after_next_year_regex.search(source): + value = 2 + elif self.next_year_regex.search(source): + value = 1 + elif self.last_year_regex.search(source): + value = -1 + elif self.this_year_regex.search(source): + # Current year: 今年 + value = 0 + + return value diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetime_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetime_extractor_config.py new file mode 100644 index 0000000000..8d0429246a --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetime_extractor_config.py @@ -0,0 +1,96 @@ +from typing import Dict, Pattern + +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration +from recognizers_date_time.date_time.CJK import CJKDateTimeExtractorConfiguration, BaseCJKDateExtractor, \ + BaseCJKTimeExtractor, BaseCJKDurationExtractor +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseDateTimeExtractorConfiguration(CJKDateTimeExtractorConfiguration): + @property + def preposition_regex(self) -> Pattern: + return self._preposition_regex + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def night_regex(self) -> Pattern: + return self._night_regex + + @property + def time_of_special_day_regex(self) -> Pattern: + return self._time_of_special_day_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def datetime_period_unit_regex(self) -> Pattern: + return self._datetime_period_unit_regex + + @property + def duration_relative_duration_unit_regex(self) -> Pattern: + return self._duration_relative_duration_unit_regex + + @property + def ago_later_regex(self) -> Pattern: + return self._ago_later_regex + + @property + def connector_regex(self) -> Pattern: + return self._connector_regex + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_point_extractor(self) -> DateTimeExtractor: + return self._date_point_extractor + + @property + def time_point_extractor(self) -> DateTimeExtractor: + return self._time_point_extractor + + @property + def ambiguity_date_time_filters(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_date_time_filters + + def __init__(self): + super().__init__() + self._date_point_extractor = BaseCJKDateExtractor(JapaneseDateExtractorConfiguration()) + self._time_point_extractor = BaseCJKTimeExtractor(JapaneseTimeExtractorConfiguration()) + self._duration_extractor = BaseCJKDurationExtractor(JapaneseDurationExtractorConfiguration()) + + self._preposition_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PrepositionRegex) + self._now_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NowRegex) + self._night_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NightRegex) + self._time_of_special_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeOfSpecialDayRegex) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeOfDayRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.BeforeRegex) + self._after_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AfterRegex) + self._datetime_period_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodUnitRegex) + self._duration_relative_duration_unit_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.DurationRelativeDurationUnitRegex) + self._ago_later_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AgoLaterRegex) + self._connector_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ConnectorRegex) + + self._ambiguity_date_time_filters = DefinitionLoader.load_ambiguity_filters( + JapaneseDateTime.AmbiguityDateTimeFiltersDict + ) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetime_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetime_parser_config.py new file mode 100644 index 0000000000..325b977ad1 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetime_parser_config.py @@ -0,0 +1,209 @@ +from typing import Dict, Pattern + +from recognizers_number import BaseNumberParser, BaseNumberExtractor +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_datetime import MatchedTimex +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.CJK import CJKDateTimeParserConfiguration,CJKCommonDateTimeParserConfiguration +from recognizers_date_time.date_time.japanese.datetime_extractor_config import JapaneseDateTimeExtractorConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseDateTimeParserConfiguration(CJKDateTimeParserConfiguration): + @property + def lunar_regex(self) -> Pattern: + return self._lunar_regex + + @property + def lunar_holiday_regex(self) -> Pattern: + return self._lunar_holiday_regex + + @property + def simple_am_regex(self) -> Pattern: + return self._simple_am_regex + + @property + def simple_pm_regex(self) -> Pattern: + return self._simple_pm_regex + + @property + def now_time_regex(self) -> Pattern: + return self._now_time_regex + + @property + def recently_time_regex(self) -> Pattern: + return self._recently_time_regex + + @property + def asap_time_regex(self) -> Pattern: + return self._asap_time_regex + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def now_regex(self) -> Pattern: + return self._now_regex + + @property + def time_of_special_day_regex(self) -> Pattern: + return self._time_of_special_day_regex + + @property + def datetime_period_unit_regex(self) -> Pattern: + return self._datetime_period_unit_regex + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def duration_relative_duration_unit_regex(self) -> Pattern: + return self._duration_relative_duration_unit_regex + + @property + def ago_later_regex(self) -> Pattern: + return self._ago_later_regex + + def __init__(self, config: CJKCommonDateTimeParserConfiguration = None): + super().__init__() + self._integer_extractor = config.integer_extractor + self._date_extractor = config.date_extractor + self._time_extractor = config.time_extractor + self._duration_extractor = config.duration_extractor + + self._date_parser = config.date_parser + self._duration_parser = config.duration_parser + self._time_parser = config.time_parser + + self._number_parser = config.number_parser + + self._unit_map = JapaneseDateTime.ParserConfigurationUnitMap + self._now_regex = JapaneseDateTimeExtractorConfiguration().now_regex + self._time_of_special_day_regex = JapaneseDateTimeExtractorConfiguration().time_of_special_day_regex + self._datetime_period_unit_regex = JapaneseDateTimeExtractorConfiguration().datetime_period_unit_regex + self._before_regex = JapaneseDateTimeExtractorConfiguration().before_regex + self._after_regex = JapaneseDateTimeExtractorConfiguration().after_regex + self._duration_relative_duration_unit_regex = \ + JapaneseDateTimeExtractorConfiguration().duration_relative_duration_unit_regex + self._ago_later_regex = JapaneseDateTimeExtractorConfiguration().ago_later_regex + + self._lunar_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LunarRegex) + self._lunar_holiday_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LunarHolidayRegex) + self._simple_am_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimeSimpleAmRegex) + self._simple_pm_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimeSimplePmRegex) + self._now_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NowTimeRegex) + self._recently_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.RecentlyTimeRegex) + self._asap_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AsapTimeRegex) + + def get_matched_now_timex(self, source: str) -> MatchedTimex: + source = source.strip().lower() + if RegExpUtility.match_end(self.now_time_regex, source, False): + timex = 'PRESENT_REF' + elif RegExpUtility.exact_match(self.recently_time_regex, source, False): + timex = 'PAST_REF' + elif RegExpUtility.exact_match(self.asap_time_regex, source, False): + timex = 'FUTURE_REF' + else: + return MatchedTimex(False, None) + + return MatchedTimex(True, timex) + + def get_swift_day(self, source: str) -> int: + source = source.strip().lower() + swift = 0 + + if ( + source == '今天' or + source == '今日' or + source == '最近' + ): + swift = 0 + elif ( + source.startswith('明') + ): + swift = 1 + elif ( + source.startswith('昨') + ): + swift = -1 + elif ( + source == '大后天' or + source == '大後天' + ): + swift = 3 + elif ( + source == '大前天' + ): + swift = -3 + elif ( + source == '后天' or + source == '後天' + ): + swift = 2 + elif ( + source == '前天' + ): + swift = -2 + + return swift + + def adjust_by_time_of_day(self, source: str, hour: int, swift: int) -> None: + # TODO: THIS DOESN'T DO ANYTHING + if source == '今晚': + if hour < Constants.HALF_DAY_HOUR_COUNT: + hour += Constants.HALF_DAY_HOUR_COUNT + elif source == '今早': + if hour >= Constants.HALF_DAY_HOUR_COUNT: + hour -= Constants.HALF_DAY_HOUR_COUNT + elif source == '明晚': + swift = 1 + if hour < Constants.HALF_DAY_HOUR_COUNT: + hour += Constants.HALF_DAY_HOUR_COUNT + elif source == '明晨': + swift = -1 + if hour >= Constants.HALF_DAY_HOUR_COUNT: + hour -= Constants.HALF_DAY_HOUR_COUNT + elif "昨晚": + swift = -1 + if hour < Constants.HALF_DAY_HOUR_COUNT: + hour += Constants.HALF_DAY_HOUR_COUNT diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetimeperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetimeperiod_extractor_config.py new file mode 100644 index 0000000000..4b7d04b694 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetimeperiod_extractor_config.py @@ -0,0 +1,196 @@ +from typing import Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.japanese.extractors import JapaneseCardinalExtractor +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.CJK import CJKDateTimePeriodExtractorConfiguration, BaseCJKDateExtractor, \ + BaseCJKTimeExtractor, BaseCJKDateTimeExtractor, BaseCJKDurationExtractor, BaseCJKTimePeriodExtractor +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.datetime_extractor_config import JapaneseDateTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.date_time.japanese.timeperiod_extractor_config import \ + JapaneseTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.utilities import MatchedIndex +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_text import Extractor + + +class JapaneseDateTimePeriodExtractorConfiguration(CJKDateTimePeriodExtractorConfiguration): + @property + def till_regex(self) -> Pattern: + return self._till_regex + + @property + def from_prefix_regex(self) -> Pattern: + return self._from_prefix_regex + + @property + def from_suffix_regex(self) -> Pattern: + return self._from_suffix_regex + + @property + def connector_regex(self) -> Pattern: + return self._connector_regex + + @property + def preposition_regex(self) -> Pattern: + return self._preposition_regex + + @property + def zhijian_regex(self) -> Pattern: + return self._zhijian_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def followed_unit(self) -> Pattern: + return self._followed_unit + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def weekday_regex(self) -> Pattern: + return self._weekday_regex + + @property + def time_period_left_regex(self) -> Pattern: + return self._time_period_left_regex + + @property + def relative_regex(self) -> Pattern: + return self._relative_regex + + @property + def rest_of_date_regex(self) -> Pattern: + return self._rest_of_date_regex + + @property + def am_pm_desc_regex(self) -> Pattern: + return self._am_pm_desc_regex + + @property + def before_after_regex(self) -> Pattern: + return self._before_after_regex + + @property + def hour_regex(self) -> Pattern: + return self._hour_regex + + @property + def hour_num_regex(self) -> Pattern: + return self._hour_num_regex + + @property + def this_regex(self) -> Pattern: + return self._this_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def number_combined_with_unit(self) -> Pattern: + return self._number_combined_with_unit + + @property + def cardinal_extractor(self) -> Extractor: + return self._cardinal_extractor + + @property + def single_date_extractor(self) -> DateTimeExtractor: + return self._single_date_extractor + + @property + def single_time_extractor(self) -> DateTimeExtractor: + return self._single_time_extractor + + @property + def single_date_time_extractor(self) -> DateTimeExtractor: + return self._single_date_time_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + def __init__(self): + super().__init__() + + self._cardinal_extractor = JapaneseCardinalExtractor() + + self._single_date_extractor = BaseCJKDateExtractor(JapaneseDateExtractorConfiguration()) + self._single_time_extractor = BaseCJKTimeExtractor(JapaneseTimeExtractorConfiguration()) + self._single_date_time_extractor = BaseCJKDateTimeExtractor(JapaneseDateTimeExtractorConfiguration()) + self._duration_extractor = BaseCJKDurationExtractor(JapaneseDurationExtractorConfiguration()) + self._time_period_extractor = BaseCJKTimePeriodExtractor(JapaneseTimePeriodExtractorConfiguration()) + + self._from_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodFromPrefixRegex) + self._from_suffix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodFromSuffixRegex) + self._till_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodTillRegex) + self._connector_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodConnectorRegex) + self._preposition_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodPrepositionRegex) + self._zhijian_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ZhijianRegex) + self._time_of_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeOfDayRegex) + self._specific_time_of_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SpecificTimeOfDayRegex) + self._unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodUnitRegex) + self._followed_unit = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodFollowedUnit) + self._past_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.PastRegex) + self._future_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.FutureRegex) + self._weekday_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekDayRegex) + self._time_period_left_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodLeftRegex) + self._relative_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.RelativeRegex) + self._rest_of_date_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.RestOfDateRegex) + self._am_pm_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AmPmDescRegex) + self._before_after_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.BeforeAfterRegex) + + self._hour_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.HourRegex) + self._hour_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.HourNumRegex) + self._this_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodThisRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodLastRegex) + self._next_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DatePeriodNextRegex) + self._number_combined_with_unit = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.NumberCombinedWithUnit) + + def get_from_token_index(self, text: str) -> MatchedIndex: + index = -1 + match = RegExpUtility.match_end(self.from_prefix_regex, text, True) + if match.success: + return MatchedIndex(True, match.index) + else: + match = RegExpUtility.match_end(self.from_suffix_regex, text, True) + if match.success: + return MatchedIndex(True, match.index) + return MatchedIndex(False, index) + + def has_connector_token(self, text: str) -> MatchedIndex: + return RegExpUtility.exact_match(self.connector_regex, text, True) + + def get_between_token_index(self, text: str) -> MatchedIndex: + index = -1 + match = RegExpUtility.get_matches(self.zhijian_regex, text) + if match and match[0].success: + return MatchedIndex(True, match.index) + return MatchedIndex(False, index) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetimeperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetimeperiod_parser_config.py new file mode 100644 index 0000000000..cba555ee0b --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/datetimeperiod_parser_config.py @@ -0,0 +1,221 @@ +from typing import Dict, Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_text import Parser, Extractor +from recognizers_number.number.japanese.extractors import JapaneseCardinalExtractor +from recognizers_number.number import AgnosticNumberParserFactory, JapaneseNumberParserConfiguration, ParserType +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.CJK import CJKDateTimePeriodParserConfiguration, \ + CJKCommonDateTimeParserConfiguration, MatchedTimeRegexAndSwift +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.japanese.datetimeperiod_extractor_config import \ + JapaneseDateTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.utilities import TimexUtil + + +class JapaneseDateTimePeriodParserConfiguration(CJKDateTimePeriodParserConfiguration): + @property + def mo_regex(self) -> Pattern: + return self._mo_regex + + @property + def mi_regex(self) -> Pattern: + return self._mi_regex + + @property + def af_regex(self) -> Pattern: + return self._af_regex + + @property + def ev_regex(self) -> Pattern: + return self._ev_regex + + @property + def ni_regex(self) -> Pattern: + return self._ni_regex + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def cardinal_extractor(self) -> Extractor: + return self._cardinal_extractor + + @property + def cardinal_parser(self) -> Parser: + return self._cardinal_parser + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def specific_time_of_day_regex(self) -> Pattern: + return self._specific_time_of_day_regex + + @property + def time_of_day_regex(self) -> Pattern: + return self._time_of_day_regex + + @property + def next_regex(self) -> Pattern: + return self._next_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def past_regex(self) -> Pattern: + return self._past_regex + + @property + def future_regex(self) -> Pattern: + return self._future_regex + + @property + def weekday_regex(self) -> Pattern: + return self._weekday_regex + + @property + def time_period_left_regex(self) -> Pattern: + return self._time_period_left_regex + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def rest_of_date_regex(self) -> Pattern: + return self._rest_of_date_regex + + @property + def am_pm_desc_regex(self) -> Pattern: + return self._am_pm_desc_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + + super().__init__() + self._cardinal_extractor = JapaneseCardinalExtractor() + self._cardinal_parser = AgnosticNumberParserFactory.get_parser( + ParserType.NUMBER, JapaneseNumberParserConfiguration()) + + self._date_extractor = config.date_extractor + self._time_extractor = config.time_extractor + self._date_time_extractor = config.date_time_extractor + self._time_period_extractor = config.time_period_extractor + self._duration_extractor = config.duration_extractor + self._duration_parser = config.duration_parser + self._date_parser = config.date_parser + self._time_parser = config.time_parser + self._date_time_parser = config.date_time_parser + self._time_period_parser = config.time_period_parser + + self._mo_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodMORegex) + self._mi_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodMIRegex) + self._af_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodAFRegex) + self._ev_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodEVRegex) + self._ni_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DateTimePeriodNIRegex) + + self._specific_time_of_day_regex = JapaneseDateTimePeriodExtractorConfiguration().specific_time_of_day_regex + self._time_of_day_regex = JapaneseDateTimePeriodExtractorConfiguration().time_of_day_regex + self._next_regex = JapaneseDateTimePeriodExtractorConfiguration().next_regex + self._last_regex = JapaneseDateTimePeriodExtractorConfiguration().last_regex + self._past_regex = JapaneseDateTimePeriodExtractorConfiguration().past_regex + self._future_regex = JapaneseDateTimePeriodExtractorConfiguration().future_regex + self._weekday_regex = JapaneseDateTimePeriodExtractorConfiguration().weekday_regex + self._time_period_left_regex = JapaneseDateTimePeriodExtractorConfiguration().time_period_left_regex + self._unit_regex = JapaneseDateTimePeriodExtractorConfiguration().unit_regex + self._rest_of_date_regex = JapaneseDateTimePeriodExtractorConfiguration().rest_of_date_regex + self._am_pm_desc_regex = JapaneseDateTimePeriodExtractorConfiguration().am_pm_desc_regex + self._unit_map = config.unit_map + + def get_matched_time_range(self, text: str) -> MatchedTimeRegexAndSwift: + trimmed_text = text.strip().lower() + + begin_hour = 0 + end_hour = 0 + end_minute = 0 + swift = 0 + + tod = "" + + if trimmed_text == "今晚": + swift = 0 + tod = Constants.EVENING + elif trimmed_text == "今早" or trimmed_text == "今晨": + swift = 0 + tod = Constants.MORNING + elif trimmed_text == "明晚": + swift = 1 + tod = Constants.EVENING + elif trimmed_text == "明早" or trimmed_text == "明晨": + swift = 1 + tod = Constants.MORNING + elif trimmed_text == "昨晚": + swift = -1 + tod = Constants.EVENING + + if RegExpUtility.get_matches(self.mo_regex, trimmed_text): + tod = Constants.MORNING + elif RegExpUtility.get_matches(self.mi_regex, trimmed_text): + tod = Constants.MIDDAY + elif RegExpUtility.get_matches(self.af_regex, trimmed_text): + tod = Constants.AFTERNOON + elif RegExpUtility.get_matches(self.ev_regex, trimmed_text): + tod = Constants.EVENING + elif RegExpUtility.get_matches(self.ni_regex, trimmed_text): + tod = Constants.NIGHT + elif not tod: + tod_symbol = None + return MatchedTimeRegexAndSwift(False, tod_symbol, begin_hour, end_hour, end_minute, swift) + + parse_result = TimexUtil.resolve_time_of_day(tod) + tod_symbol = parse_result.timex + begin_hour = parse_result.begin_hour + end_hour = parse_result.end_hour + end_minute = parse_result.end_min + + return MatchedTimeRegexAndSwift(True, tod_symbol, begin_hour, end_hour, end_minute, swift) + + def get_matched_time_range_and_swift(self, text: str) -> MatchedTimeRegexAndSwift: + return self.get_matched_time_range(text) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/duration_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/duration_extractor_config.py new file mode 100644 index 0000000000..b08f9a87b4 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/duration_extractor_config.py @@ -0,0 +1,118 @@ +from typing import Dict, Pattern, List + +from recognizers_number.culture import CultureInfo, Culture +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.CJK import CJKDurationExtractorConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_number_with_unit.number_with_unit import NumberWithUnitExtractor +from recognizers_number_with_unit.number_with_unit.japanese import JapaneseNumberWithUnitExtractorConfiguration + + +class JapaneseDurationExtractorConfiguration(CJKDurationExtractorConfiguration): + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def duration_unit_regex(self) -> Pattern: + return self._duration_unit_regex + + @property + def an_unit_regex(self) -> Pattern: + return self._an_unit_regex + + @property + def duration_connector_regex(self) -> Pattern: + return self._duration_connector_regex + + @property + def all_regex(self) -> Pattern: + return self._all_regex + + @property + def half_regex(self) -> Pattern: + return self._half_regex + + @property + def relative_duration_unit_regex(self) -> Pattern: + return self._relative_duration_unit_regex + + @property + def during_regex(self) -> Pattern: + return self._during_regex + + @property + def some_regex(self) -> Pattern: + return self._some_regex + + @property + def more_or_less_regex(self) -> Pattern: + return self._more_or_less_regex + + @property + def internal_extractor(self) -> Extractor: + return self._internal_extractor + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def unit_value_map(self) -> Dict[str, float]: + return self._unit_value_map + + @property + def ambiguity_duration_filters_dict(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_duration_filters_dict + + class DurationExtractorConfiguration(JapaneseNumberWithUnitExtractorConfiguration): + @property + def duration_suffix_list(self) -> Dict[str, str]: + return JapaneseDateTime.DurationSuffixList + + @property + def extract_type(self) -> str: + return Constants.SYS_DATETIME_DURATION + + @property + def suffix_list(self) -> Dict[str, str]: + return self.duration_suffix_list + + @property + def prefix_list(self) -> Dict[str, str]: + return {} + + @property + def ambiguous_unit_list(self) -> List[str]: + return JapaneseDateTime.DurationAmbiguousUnits + + def __init__(self, culture_info: CultureInfo = CultureInfo(Culture.Japanese)): + super().__init__(culture_info) + + def __init__(self, merge: bool = True): + super().__init__() + self.merge = merge + self._year_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationYearRegex) + self._duration_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationUnitRegex) + self._an_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.AnUnitRegex) + self._duration_connector_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationConnectorRegex) + self._all_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationAllRegex) + self._half_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationHalfRegex) + self._relative_duration_unit_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.DurationRelativeDurationUnitRegex) + self._during_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationDuringRegex) + self._some_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationSomeRegex) + self._more_or_less_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DurationMoreOrLessRegex) + + self._internal_extractor = NumberWithUnitExtractor(self.DurationExtractorConfiguration()) + + self._unit_map = JapaneseDateTime.ParserConfigurationUnitMap + self._unit_value_map = JapaneseDateTime.DurationUnitValueMap + self._ambiguity_duration_filters_dict = DefinitionLoader.load_ambiguity_filters( + JapaneseDateTime.AmbiguityDurationFiltersDict + ) + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/duration_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/duration_parser_config.py new file mode 100644 index 0000000000..682bfa00d2 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/duration_parser_config.py @@ -0,0 +1,76 @@ +from typing import Dict, Pattern + +from recognizers_date_time.date_time.CJK import CJKDurationParserConfiguration, CJKCommonDateTimeParserConfiguration, \ + BaseCJKDurationExtractor +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.date_time.utilities import DateTimeExtractor +from recognizers_number.culture import CultureInfo, Culture +from recognizers_number_with_unit.number_with_unit import NumberWithUnitParser +from recognizers_number_with_unit.number_with_unit.japanese import JapaneseNumberWithUnitParserConfiguration +from recognizers_text import Parser + + +class JapaneseDurationParserConfiguration(CJKDurationParserConfiguration): + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def internal_parser(self) -> Parser: + return self._internal_parser + + @property + def year_regex(self) -> Pattern: + return self._year_regex + + @property + def some_regex(self) -> Pattern: + return self._some_regex + + @property + def more_or_less_regex(self) -> Pattern: + return self._more_or_less_regex + + @property + def duration_unit_regex(self) -> Pattern: + return self._duration_unit_regex + + @property + def an_unit_regex(self) -> Pattern: + return self._an_unit_regex + + @property + def duration_connector_regex(self) -> Pattern: + return self._duration_connector_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def unit_value_map(self) -> Dict[str, float]: + return self._unit_value_map + + class DurationParserConfiguration(JapaneseNumberWithUnitParserConfiguration): + def __init__(self, culture_info: CultureInfo = CultureInfo(Culture.Japanese)): + super().__init__(culture_info) + self.bind_dictionary = \ + JapaneseDurationExtractorConfiguration.DurationExtractorConfiguration.duration_suffix_list + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + super().__init__() + self._internal_parser = NumberWithUnitParser(self.DurationParserConfiguration()) + + self._duration_extractor = BaseCJKDurationExtractor( + JapaneseDurationExtractorConfiguration(), False) + + self._year_regex = JapaneseDurationExtractorConfiguration().year_regex + self._some_regex = JapaneseDurationExtractorConfiguration().some_regex + self._more_or_less_regex = JapaneseDurationExtractorConfiguration().more_or_less_regex + self._duration_unit_regex = JapaneseDurationExtractorConfiguration().duration_unit_regex + self._an_unit_regex = JapaneseDurationExtractorConfiguration().an_unit_regex + self._duration_connector_regex = JapaneseDurationExtractorConfiguration().duration_connector_regex + + self._unit_map = config.unit_map + self._unit_value_map = config.unit_value_map + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/holiday_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/holiday_extractor_config.py new file mode 100644 index 0000000000..317aa3d9ea --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/holiday_extractor_config.py @@ -0,0 +1,29 @@ +from typing import List, Pattern + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.date_time.CJK import CJKHolidayExtractorConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseHolidayExtractorConfiguration(CJKHolidayExtractorConfiguration): + @property + def holiday_regexes(self) -> List[Pattern]: + return self._holiday_regexes + + @property + def lunar_holiday_regex(self) -> Pattern: + return self._lunar_holiday_regex + + @property + def holiday_regex_list(self) -> List[Pattern]: + return self._holiday_regexes + + def __init__(self): + super().__init__() + self._lunar_holiday_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LunarHolidayRegex) + self._holiday_regex_list = [ + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.HolidayRegexList1), + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.HolidayRegexList2), + self._lunar_holiday_regex + ] + self._holiday_regexes = self._holiday_regex_list diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/holiday_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/holiday_parser_config.py new file mode 100644 index 0000000000..0f7c23afa8 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/holiday_parser_config.py @@ -0,0 +1,146 @@ +from datetime import datetime +from typing import List, Pattern, Dict, Callable + +from recognizers_text.utilities import RegExpUtility +from recognizers_number import BaseNumberParser, BaseNumberExtractor +from recognizers_date_time.date_time.CJK import CJKHolidayParserConfiguration, CJKCommonDateTimeParserConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseHolidayParserConfiguration(CJKHolidayParserConfiguration): + + @property + def fixed_holidays_dict(self) -> Dict[str, Callable[[int], datetime]]: + return self._fixed_holidays_dict + + @property + def holiday_func_dict(self) -> Dict[str, Callable[[int], datetime]]: + return self._holiday_func_dictionary + + @property + def no_fixed_timex(self) -> Dict[str, str]: + return self._no_fixed_timex + + @property + def integer_extractor(self) -> BaseNumberExtractor: + return self._integer_extractor + + @property + def number_parser(self) -> BaseNumberParser: + return self._number_parser + + @property + def holiday_regex_list(self) -> List[Pattern]: + return self._holiday_regex_list + + @property + def lunar_holiday_regex(self) -> Pattern: + return self._lunar_holiday_regex + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + super().__init__() + self._no_fixed_timex = JapaneseDateTime.HolidayNoFixedTimex + self._integer_extractor = config.integer_extractor + self._number_parser = config.number_parser + + self._lunar_holiday_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.LunarHolidayRegex) + self._holiday_regex_list = self._holiday_regex_list = [ + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.HolidayRegexList1), + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.HolidayRegexList2), + self.lunar_holiday_regex + ] + + self._holiday_func_dictionary = self._init_holiday_funcs() + self._fixed_holidays_dict = self._init_fixed_holiday_funcs() + + def _init_holiday_funcs(self) -> Dict[str, Callable[[int], datetime]]: + return dict([ + ('父亲节', CJKHolidayParserConfiguration.fathers_day), + ('父の日', CJKHolidayParserConfiguration.fathers_day), + ('母亲节', CJKHolidayParserConfiguration.mothers_day), + ('母の日', CJKHolidayParserConfiguration.mothers_day), + ('感恩节', CJKHolidayParserConfiguration.thanksgiving_day), + ('感謝祭の日', CJKHolidayParserConfiguration.thanksgiving_day), + ('感謝祭', CJKHolidayParserConfiguration.thanksgiving_day), + ('キング牧師記念日', CJKHolidayParserConfiguration.martin_luther_king_day), + ]) + + def _init_fixed_holiday_funcs(self) -> Dict[str, Callable[[int], datetime]]: + return dict([ + ("元旦", CJKHolidayParserConfiguration.new_year), + ("旧正月", CJKHolidayParserConfiguration.new_year), + ("元旦节", CJKHolidayParserConfiguration.new_year), + ("お正月", CJKHolidayParserConfiguration.new_year), + ("独立記念日", CJKHolidayParserConfiguration.usa_independence_day), + ("旧暦の正月初一", CJKHolidayParserConfiguration.spring_day), + ("教师节", CJKHolidayParserConfiguration.teacher_day), + ("教師の日", CJKHolidayParserConfiguration.teacher_day), + ("青年节", CJKHolidayParserConfiguration.youth_day), + ("青年の日", CJKHolidayParserConfiguration.youth_day), + ("儿童节", CJKHolidayParserConfiguration.children_day), + ("子供の日", CJKHolidayParserConfiguration.children_day), + ("妇女节", CJKHolidayParserConfiguration.female_day), + ("国際婦人デー", CJKHolidayParserConfiguration.female_day), + ("植树节", CJKHolidayParserConfiguration.tree_plant_day), + ("植樹祭", CJKHolidayParserConfiguration.tree_plant_day), + ("情人节", CJKHolidayParserConfiguration.lover_day), + ("バレンタインデー", CJKHolidayParserConfiguration.lover_day), + ("圣诞节", CJKHolidayParserConfiguration.christmas_day), + ("クリスマスの日", CJKHolidayParserConfiguration.christmas_day), + ("クリスマス", CJKHolidayParserConfiguration.christmas_day), + ("クリスマスイブ", CJKHolidayParserConfiguration.christmas_eve), + ("新年", CJKHolidayParserConfiguration.new_year), + ("復活祭", CJKHolidayParserConfiguration.easter_day), + ("愚人节", CJKHolidayParserConfiguration.fool_day), + ("エイプリルフール", CJKHolidayParserConfiguration.fool_day), + ("五一", CJKHolidayParserConfiguration.labor_day), + ("劳动节", CJKHolidayParserConfiguration.labor_day), + ("メーデー", CJKHolidayParserConfiguration.labor_day), + ("国際的な労働者の日", CJKHolidayParserConfiguration.labor_day), + ("万圣节", CJKHolidayParserConfiguration.halloween_day), + ("ハロウィン", CJKHolidayParserConfiguration.halloween_day), + ("中秋节", CJKHolidayParserConfiguration.mid_autumn_day), + ("中秋", CJKHolidayParserConfiguration.mid_autumn_day), + ("中秋節", CJKHolidayParserConfiguration.mid_autumn_day), + ("春节", CJKHolidayParserConfiguration.spring_day), + ("除夕", CJKHolidayParserConfiguration.new_year_eve), + ("大晦日", CJKHolidayParserConfiguration.new_year_eve), + ("元宵节", CJKHolidayParserConfiguration.lantern_day), + ("元宵節", CJKHolidayParserConfiguration.lantern_day), + ("清明节", CJKHolidayParserConfiguration.qing_ming_day), + ("清明節", CJKHolidayParserConfiguration.qing_ming_day), + ("清明", CJKHolidayParserConfiguration.qing_ming_day), + ("端午节", CJKHolidayParserConfiguration.dragon_boat_day), + ("端午の節句", CJKHolidayParserConfiguration.boys_festival), + ("端午", CJKHolidayParserConfiguration.dragon_boat_day), + ("国庆节", CJKHolidayParserConfiguration.jap_national_day), + ("国慶節", CJKHolidayParserConfiguration.jap_national_day), + ("建军节", CJKHolidayParserConfiguration.jap_mil_build_day), + ("建軍節", CJKHolidayParserConfiguration.jap_mil_build_day), + ("女生节", CJKHolidayParserConfiguration.girls_day), + ("ガールズデー", CJKHolidayParserConfiguration.girls_day), + ("光棍节", CJKHolidayParserConfiguration.singles_day), + ("双十一", CJKHolidayParserConfiguration.singles_day), + ("ダブル十一", CJKHolidayParserConfiguration.singles_day), + ("シングルデー", CJKHolidayParserConfiguration.singles_day), + ("重阳节", CJKHolidayParserConfiguration.chong_yang_day), + ("重陽節", CJKHolidayParserConfiguration.chong_yang_day), + ]) + + def get_swift_year(self, source: str) -> int: + # TODO move hardcoded values to resource file + trimmed_text = source.strip().lower() + swift = -10 + + if trimmed_text.endswith('前年') or trimmed_text.endswith('先年'): + swift = -1 + if trimmed_text.endswith('来年'): + swift = +1 + + return swift + + def sanitize_year_token(self, source: str) -> str: + # TODO move hardcoded values to resource file + if source.endswith('年'): + return source[0:-1] + return source diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/merged_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/merged_extractor_config.py new file mode 100644 index 0000000000..4c9c2b25ef --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/merged_extractor_config.py @@ -0,0 +1,148 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.CJK import CJKMergedExtractorConfiguration, BaseCJKTimeExtractor, \ + BaseCJKTimePeriodExtractor, BaseCJKDateTimeExtractor, BaseCJKDateTimePeriodExtractor, BaseCJKDurationExtractor,\ + BaseCJKHolidayExtractor, BaseCJKSetExtractor + +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.timeperiod_extractor_config import \ + JapaneseTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.datetime_extractor_config import JapaneseDateTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.datetimeperiod_extractor_config import \ + JapaneseDateTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.date_time.japanese.set_extractor_config import JapaneseSetExtractorConfiguration +from recognizers_date_time.date_time.japanese.holiday_extractor_config import JapaneseHolidayExtractorConfiguration +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.japanese.dateperiod_extractor_config import \ + JapaneseDatePeriodExtractorConfiguration +from recognizers_date_time.date_time.CJK.base_dateperiod import BaseCJKDatePeriodExtractor +from recognizers_date_time.date_time.CJK.base_date import BaseCJKDateExtractor + +from recognizers_date_time.resources.base_date_time import BaseDateTime +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseMergedExtractorConfiguration(CJKMergedExtractorConfiguration): + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def unspecified_date_period_regex(self) -> Pattern: + return self._unspecified_date_period_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def until_regex(self) -> Pattern: + return self._until_regex + + @property + def since_prefix_regex(self) -> Pattern: + return self._since_prefix_regex + + @property + def since_suffix_regex(self) -> Pattern: + return self._since_suffix_regex + + @property + def around_prefix_regex(self) -> Pattern: + return self._around_prefix_regex + + @property + def around_suffix_regex(self) -> Pattern: + return self._around_suffix_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def potential_ambiguous_range_regex(self) -> Pattern: + return self._potential_ambiguous_range_regex + + @property + def ambiguous_range_modifier_prefix(self) -> Pattern: + return self._ambiguous_range_modifier_prefix + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def set_extractor(self) -> DateTimeExtractor: + return self._set_extractor + + @property + def holiday_extractor(self) -> DateTimeExtractor: + return self._holiday_extractor + + @property + def ambiguous_range_modifier_regex(self) -> Pattern: + return self._ambiguous_range_modifier_regex + + @property + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_filters_dict + + def __init__(self): + super().__init__() + self._ambiguity_filters_dict = DefinitionLoader.load_ambiguity_filters(JapaneseDateTime.AmbiguityFiltersDict) + self._potential_ambiguous_range_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.FromToRegex + ) + self._equal_regex = RegExpUtility.get_safe_reg_exp(BaseDateTime.EqualRegex) + self._around_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationAroundPrefix) + self._since_suffix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationSinceSuffix) + self._since_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationSincePrefix) + self._until_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationUntil) + self._after_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationAfter) + self._unspecified_date_period_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.UnspecificDatePeriodRegex) + self._before_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationBefore) + self._around_suffix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.ParserConfigurationAroundSuffix) + self._ambiguous_range_modifier_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.AmbiguousRangeModifierPrefix + ) + self._ambiguity_filters_dict = DefinitionLoader.load_ambiguity_filters( + JapaneseDateTime.AmbiguityTimeFiltersDict + ) + + self._time_period_extractor = BaseCJKTimePeriodExtractor(JapaneseTimePeriodExtractorConfiguration()) + self._time_extractor = BaseCJKTimeExtractor(JapaneseTimeExtractorConfiguration()) + self._holiday_extractor = BaseCJKHolidayExtractor(JapaneseHolidayExtractorConfiguration()) + self._set_extractor = BaseCJKSetExtractor(JapaneseSetExtractorConfiguration()) + self._duration_extractor = BaseCJKDurationExtractor(JapaneseDurationExtractorConfiguration()) + self._date_time_period_extractor = BaseCJKDateTimePeriodExtractor( + JapaneseDateTimePeriodExtractorConfiguration()) + self._date_period_extractor = BaseCJKDatePeriodExtractor(JapaneseDatePeriodExtractorConfiguration()) + self._date_time_extractor = BaseCJKDateTimeExtractor(JapaneseDateTimeExtractorConfiguration()) + self._date_extractor = BaseCJKDateExtractor(JapaneseDateExtractorConfiguration()) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/merged_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/merged_parser_config.py new file mode 100644 index 0000000000..5408dd84be --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/merged_parser_config.py @@ -0,0 +1,51 @@ +from typing import Pattern + +from .common_configs import JapaneseCommonDateTimeParserConfiguration +from recognizers_date_time.date_time.CJK.base_merged import CJKMergedParserConfiguration +from recognizers_date_time.date_time.japanese import JapaneseMergedExtractorConfiguration + + +class JapaneseMergedParserConfiguration(JapaneseCommonDateTimeParserConfiguration, CJKMergedParserConfiguration): + + @property + def before_regex(self) -> Pattern: + return self._before_regex + + @property + def after_regex(self) -> Pattern: + return self._after_regex + + @property + def since_prefix_regex(self) -> Pattern: + return self._since_prefix_regex + + @property + def since_suffix_regex(self) -> Pattern: + return self._since_suffix_regex + + @property + def around_prefix_regex(self) -> Pattern: + return self._around_prefix_regex + + @property + def around_suffix_regex(self) -> Pattern: + return self._around_suffix_regex + + @property + def equal_regex(self) -> Pattern: + return self._equal_regex + + @property + def until_regex(self) -> Pattern: + return self._until_regex + + def __init__(self, config): + JapaneseCommonDateTimeParserConfiguration.__init__(self) + self._before_regex = JapaneseMergedExtractorConfiguration().before_regex + self._after_regex = JapaneseMergedExtractorConfiguration().after_regex + self._since_prefix_regex = JapaneseMergedExtractorConfiguration().since_prefix_regex + self._since_suffix_regex = JapaneseMergedExtractorConfiguration().since_suffix_regex + self._around_prefix_regex = JapaneseMergedExtractorConfiguration().around_prefix_regex + self._around_suffix_regex = JapaneseMergedExtractorConfiguration().around_suffix_regex + self._equal_regex = JapaneseMergedExtractorConfiguration().equal_regex + self._until_regex = JapaneseMergedExtractorConfiguration().until_regex diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/set_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/set_extractor_config.py new file mode 100644 index 0000000000..a1e4d90341 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/set_extractor_config.py @@ -0,0 +1,97 @@ +from typing import Pattern + +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.CJK import BaseCJKDurationExtractor, BaseCJKTimeExtractor, BaseCJKDateExtractor, \ + BaseCJKDateTimeExtractor, BaseCJKDatePeriodExtractor, BaseCJKTimePeriodExtractor, BaseCJKDateTimePeriodExtractor, \ + CJKSetExtractorConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.timeperiod_extractor_config import \ + JapaneseTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.date_extractor_config import JapaneseDateExtractorConfiguration +from recognizers_date_time.date_time.japanese.dateperiod_extractor_config import \ + JapaneseDatePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.duration_extractor_config import JapaneseDurationExtractorConfiguration +from recognizers_date_time.date_time.japanese.datetime_extractor_config import JapaneseDateTimeExtractorConfiguration +from recognizers_date_time.date_time.japanese.datetimeperiod_extractor_config import \ + JapaneseDateTimePeriodExtractorConfiguration +from recognizers_text import RegExpUtility + + +class JapaneseSetExtractorConfiguration(CJKSetExtractorConfiguration): + + @property + def unit_regex(self) -> Pattern: + return self._unit_regex + + @property + def each_unit_regex(self) -> Pattern: + return self._each_unit_regex + + @property + def each_prefix_regex(self) -> Pattern: + return self._each_prefix_regex + + @property + def each_suffix_regex(self) -> Pattern: + return self._each_suffix_regex + + @property + def last_regex(self) -> Pattern: + return self._last_regex + + @property + def each_day_regex(self) -> Pattern: + return self._each_day_regex + + @property + def each_date_unit_regex(self) -> Pattern: + return self._each_date_unit_regex + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_period_extractor(self) -> DateTimeExtractor: + return self._date_period_extractor + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def date_time_period_extractor(self) -> DateTimeExtractor: + return self._date_time_period_extractor + + def __init__(self): + super().__init__() + self._unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetUnitRegex) + self._each_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetEachUnitRegex) + self._each_prefix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetEachPrefixRegex) + self._each_suffix_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetEachSuffixRegex) + self._last_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetLastRegex) + self._each_day_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetEachDayRegex) + self._each_date_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.SetEachDateUnitRegex) + self._duration_extractor = BaseCJKDurationExtractor(JapaneseDurationExtractorConfiguration()) + self._time_extractor = BaseCJKTimeExtractor(JapaneseTimeExtractorConfiguration()) + self._date_extractor = BaseCJKDateExtractor(JapaneseDateExtractorConfiguration()) + self._date_time_extractor = BaseCJKDateTimeExtractor(JapaneseDateTimeExtractorConfiguration()) + self._date_period_extractor = BaseCJKDatePeriodExtractor(JapaneseDatePeriodExtractorConfiguration()) + self._time_period_extractor = BaseCJKTimePeriodExtractor(JapaneseTimePeriodExtractorConfiguration()) + self._date_time_period_extractor = BaseCJKDateTimePeriodExtractor( + JapaneseDateTimePeriodExtractorConfiguration()) + + \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/set_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/set_parser_config.py new file mode 100644 index 0000000000..2a06da2092 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/set_parser_config.py @@ -0,0 +1,136 @@ +from typing import Pattern, Dict + +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.base_datetime import MatchedTimex +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.CJK import CJKSetParserConfiguration, CJKCommonDateTimeParserConfiguration +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.japanese.set_extractor_config import JapaneseSetExtractorConfiguration +from recognizers_text import RegExpUtility + + +class JapaneseSetParserConfiguration(CJKSetParserConfiguration): + + @property + def day_type_regex(self) -> Pattern: + return self._day_type_regex + + @property + def week_type_regex(self) -> Pattern: + return self._week_type_regex + + @property + def bi_week_type_regex(self) -> Pattern: + return self._bi_week_type_regex + + @property + def month_type_regex(self) -> Pattern: + return self._month_type_regex + + @property + def year_type_regex(self) -> Pattern: + return self._year_type_regex + + @property + def unit_map(self) -> Dict[str, str]: + return self._unit_map + + @property + def each_prefix_regex(self) -> Pattern: + return self._each_prefix_regex + + @property + def each_unit_regex(self) -> Pattern: + return self._each_unit_regex + + @property + def each_day_regex(self) -> Pattern: + return self._each_day_regex + + @property + def each_date_unit_regex(self) -> Pattern: + return self._each_date_unit_regex + + @property + def duration_extractor(self) -> DateTimeExtractor: + return self._duration_extractor + + @property + def duration_parser(self) -> DateTimeParser: + return self._duration_parser + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def time_period_extractor(self) -> DateTimeExtractor: + return self._time_period_extractor + + @property + def time_period_parser(self) -> DateTimeParser: + return self._time_period_parser + + @property + def date_extractor(self) -> DateTimeExtractor: + return self._date_extractor + + @property + def date_parser(self) -> DateTimeParser: + return self._date_parser + + @property + def date_time_extractor(self) -> DateTimeExtractor: + return self._date_time_extractor + + @property + def date_time_parser(self) -> DateTimeParser: + return self._date_time_parser + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + super().__init__() + self._day_type_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.DayTypeRegex) + self._week_type_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.WeekTypeRegex) + self._bi_week_type_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.BiWeekTypeRegex) + self._month_type_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.MonthTypeRegex) + self._year_type_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.YearTypeRegex) + + self._duration_parser = config.duration_parser + self._time_parser = config.time_parser + self._time_period_parser = config.time_period_parser + self._date_parser = config.date_parser + self._date_time_parser = config.date_time_parser + + self._duration_extractor = config.duration_extractor + self._time_extractor = config.time_extractor + self._time_period_extractor = config.time_period_extractor + self._date_extractor = config.date_extractor + self._date_time_extractor = config.date_time_extractor + + self._each_prefix_regex = JapaneseSetExtractorConfiguration().each_prefix_regex + self._each_unit_regex = JapaneseSetExtractorConfiguration().each_unit_regex + self._each_day_regex = JapaneseSetExtractorConfiguration().each_day_regex + self._each_date_unit_regex = JapaneseSetExtractorConfiguration().each_date_unit_regex + self._unit_map = config.unit_map + + def get_matched_unit_timex(self, text: str) -> MatchedTimex: + trimmed_text = text.strip().lower() + + if RegExpUtility.get_matches(self._day_type_regex, trimmed_text): + timex = 'P1D' + elif RegExpUtility.get_matches(self._week_type_regex, trimmed_text): + timex = 'P1W' + elif RegExpUtility.get_matches(self._bi_week_type_regex, trimmed_text): + timex = 'P2W' + elif RegExpUtility.get_matches(self._month_type_regex, trimmed_text): + timex = 'P1M' + elif RegExpUtility.get_matches(self._year_type_regex, trimmed_text): + timex = 'P1Y' + else: + return MatchedTimex(False, None) + + return MatchedTimex(True, timex) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/time_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/time_extractor_config.py new file mode 100644 index 0000000000..2ee9fae125 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/time_extractor_config.py @@ -0,0 +1,145 @@ +from typing import Pattern, Dict + +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.data_structures import TimeType +from recognizers_date_time.date_time.CJK.base_time import CJKTimeExtractorConfiguration +from recognizers_date_time.date_time.utilities import DateTimeOptionsConfiguration + + +class JapaneseTimeExtractorConfiguration(CJKTimeExtractorConfiguration): + + @property + def ambiguity_time_filters_dict(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_time_filters_dict + + @property + def regexes(self) -> Dict[Pattern, TimeType]: + return self._regexes + + @property + def hour_num_regex(self) -> Pattern: + return self._hour_num_regex + + @property + def minute_num_regex(self) -> Pattern: + return self._minute_num_regex + + @property + def second_num_regex(self) -> Pattern: + return self._second_num_regex + + @property + def hour_CJK_regex(self) -> Pattern: + return self._hour_CJK_regex + + @property + def minute_CJK_regex(self) -> Pattern: + return self._minute_CJK_regex + + @property + def second_CJK_regex(self) -> Pattern: + return self._second_CJK_regex + + @property + def clock_desc_regex(self) -> Pattern: + return self._clock_desc_regex + + @property + def minute_desc_regex(self) -> Pattern: + return self._minute_desc_regex + + @property + def second_desc_regex(self) -> Pattern: + return self._second_desc_regex + + @property + def ban_hour_prefix_range(self) -> Pattern: + return self._ban_hour_prefix_range + + # e.g: 12時 + @property + def hour_regex(self) -> Pattern: + return self._hour_regex + + @property + def minute_regex(self) -> Pattern: + return self._minute_regex + + @property + def second_regex(self) -> Pattern: + return self._second_regex + + @property + def half_regex(self) -> Pattern: + return self._half_regex + + @property + def quarter_regex(self) -> Pattern: + return self._quarter_regex + + # e.g: 十二五十から八|半分|瞬間 + @property + def CJK_time_regex(self) -> Pattern: + return self._CJK_time_regex + + # e.g: 12:23 + @property + def digit_time_regex(self) -> Pattern: + return self._digit_time_regex + + # e.g: 朝の9時 + @property + def day_desc_regex(self) -> Pattern: + return self._day_desc_regex + + @property + def approximate_desc_prefix_regex(self) -> Pattern: + return self._approximate_desc_prefix_regex + + @property + def approximate_desc_suffix_regex(self) -> Pattern: + return self._approximate_desc_suffix_regex + + def __init__(self): + super().__init__() + self._hour_CJK_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeHourCJKRegex) + self._minute_CJK_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeMinuteCJKRegex) + self._second_CJK_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeSecondCJKRegex) + + self._second_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeSecondNumRegex) + self._minute_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeMinuteNumRegex) + self._hour_num_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeHourNumRegex) + + self._clock_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeClockDescRegex) + self._minute_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeMinuteDescRegex) + self._second_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeSecondDescRegex) + + self._ban_hour_prefix_range = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeBanHourPrefixRegex) + self._hour_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeHourRegex) + self._minute_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeMinuteRegex) + self._second_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeSecondRegex) + + self._approximate_desc_suffix_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.TimeApproximateDescSuffixRegex + ) + self._approximate_desc_prefix_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.TimeApproximateDescPreffixRegex + ) + + self._day_desc_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeDayDescRegex) + self._digit_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeDigitTimeRegex) + self._CJK_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeCJKTimeRegex) + self._quarter_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeQuarterRegex) + self._half_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeHalfRegex) + + self._regexes: Dict[Pattern, TimeType] = { + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeRegexes1): TimeType.CJKTime, + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeRegexes2): TimeType.DigitTime, + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeRegexes3): TimeType.LessTime + } + self._ambiguity_time_filters_dict = DefinitionLoader.load_ambiguity_filters( + JapaneseDateTime.AmbiguityTimeFiltersDict + ) + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/time_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/time_parser_config.py new file mode 100644 index 0000000000..d2b9da797c --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/time_parser_config.py @@ -0,0 +1,38 @@ +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.data_structures import TimeType +from recognizers_date_time.date_time.CJK.base_time import CJKTimeParserConfiguration +from recognizers_date_time.date_time.CJK.base_configs import CJKCommonDateTimeParserConfiguration +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.utilities import TimeFunctions +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseTimeParserConfiguration(CJKTimeParserConfiguration): + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_func(self) -> TimeFunctions: + return self._time_func + + @property + def function_map(self): + return self._function_map + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + super().__init__() + self._time_func = TimeFunctions( + number_dictionary=JapaneseDateTime.TimeNumberDictionary, + low_bound_desc=JapaneseDateTime.TimeLowBoundDesc, + day_desc_regex=JapaneseTimeExtractorConfiguration().day_desc_regex + ) + self._function_map = { + TimeType.DigitTime: self.time_func.handle_digit, + TimeType.CJKTime: self.time_func.handle_kanji, + TimeType.LessTime: self.time_func.handle_less + } + + self._time_extractor = config.time_extractor + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/timeperiod_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/timeperiod_extractor_config.py new file mode 100644 index 0000000000..1e03e98953 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/timeperiod_extractor_config.py @@ -0,0 +1,83 @@ +from typing import Pattern, Dict + +from recognizers_date_time.date_time.data_structures import PeriodType +from recognizers_text.utilities import RegExpUtility, DefinitionLoader +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime +from recognizers_date_time.date_time.CJK.base_timeperiod import CJKTimePeriodExtractorConfiguration +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration + + +class JapaneseTimePeriodExtractorConfiguration(CJKTimePeriodExtractorConfiguration): + + @property + def regexes(self) -> Dict[Pattern, PeriodType]: + return self._regexes + + @property + def ambiguity_time_period_filters_dict(self) -> Dict[Pattern, Pattern]: + return self._ambiguity_time_period_filters_dict + + @property + def time_period_connect_words(self) -> Pattern: + return self._time_period_connect_words + + @property + def CJK_time_regex(self) -> Pattern: + return self._CJK_time_regex + + @property + def left_CJK_time_regex(self) -> Pattern: + return self._left_CJK_time_regex + + @property + def right_CJK_time_regex(self) -> Pattern: + return self._right_CJK_time_regex + + @property + def digit_time_regex(self) -> Pattern: + return self._digit_time_regex + + @property + def left_digit_time_regex(self) -> Pattern: + return self._left_digit_time_regex + + @property + def right_digit_time_regex(self) -> Pattern: + return self._right_digit_time_regex + + @property + def short_left_CJK_time_regex(self) -> Pattern: + return self._short_left_CJK_time_regex + + @property + def short_left_digit_time_regex(self) -> Pattern: + return self._short_left_digit_time_regex + + def __init__(self): + super().__init__() + self._short_left_digit_time_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.TimePeriodShortLeftDigitTimeRegex + ) + self._short_left_CJK_time_regex = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.TimePeriodShortLeftCJKTimeRegex + ) + self._right_digit_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodRightDigitTimeRegex) + self._left_digit_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodLeftDigitTimeRegex) + self._digit_time_regex = JapaneseTimeExtractorConfiguration.digit_time_regex + self._right_CJK_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodRightCJKTimeRegex) + self._left_CJK_time_regex = RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodShortLeftCJKTimeRegex) + self._CJK_time_regex = JapaneseTimeExtractorConfiguration.CJK_time_regex + self._time_period_connect_words = RegExpUtility.get_safe_reg_exp( + JapaneseDateTime.TimePeriodTimePeriodConnectWords + ) + self._ambiguity_time_period_filters_dict = DefinitionLoader.load_ambiguity_filters( + JapaneseDateTime.AmbiguityTimePeriodFiltersDict + ) + self._regexes: Dict[Pattern, PeriodType] = { + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodRegexes1): PeriodType.FullTime, + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimePeriodRegexes2): PeriodType.ShortTime, + RegExpUtility.get_safe_reg_exp(JapaneseDateTime.TimeOfDayRegex): PeriodType.ShortTime + } + + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/timeperiod_parser_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/timeperiod_parser_config.py new file mode 100644 index 0000000000..4bdd1ec4a7 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/japanese/timeperiod_parser_config.py @@ -0,0 +1,80 @@ +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.CJK.base_timeperiod import CJKTimePeriodParserConfiguration +from recognizers_date_time.date_time.CJK.base_configs import CJKCommonDateTimeParserConfiguration +from recognizers_date_time.date_time.japanese.time_extractor_config import JapaneseTimeExtractorConfiguration +from recognizers_date_time.date_time.utilities import TimeFunctions, TimexUtil +from recognizers_date_time.resources.japanese_date_time import JapaneseDateTime + + +class JapaneseTimePeriodParserConfiguration(CJKTimePeriodParserConfiguration): + + @property + def time_extractor(self) -> DateTimeExtractor: + return self._time_extractor + + @property + def time_parser(self) -> DateTimeParser: + return self._time_parser + + @property + def time_func(self) -> TimeFunctions: + return self._time_func + + def __init__(self, config: CJKCommonDateTimeParserConfiguration): + super().__init__() + self._time_parser = config.time_parser + self._time_extractor = config.time_extractor + self._time_func = TimeFunctions( + number_dictionary=JapaneseDateTime.TimeNumberDictionary, + low_bound_desc=JapaneseDateTime.TimeLowBoundDesc, + day_desc_regex=JapaneseTimeExtractorConfiguration().day_desc_regex + ) + + def get_matched_timex_range(self, text: str) -> dict: + trimmed_text = text.strip() + begin_hour = 0 + end_hour = 0 + end_min = 0 + + if any(trimmed_text.endswith(o) for o in JapaneseDateTime.MorningTermList): + time_of_day = Constants.MORNING + elif any(trimmed_text.endswith(o) for o in JapaneseDateTime.MidDayTermList): + time_of_day = Constants.MID_DAY + elif any(trimmed_text.endswith(o) for o in JapaneseDateTime.AfternoonTermList): + time_of_day = Constants.AFTERNOON + elif any(trimmed_text.endswith(o) for o in JapaneseDateTime.EveningTermList): + time_of_day = Constants.EVENING + elif any(trimmed_text == o for o in JapaneseDateTime.DaytimeTermList): + time_of_day = Constants.DAYTIME + elif any(trimmed_text.endswith(o) for o in JapaneseDateTime.NightTermList): + time_of_day = Constants.NIGHT + elif any(trimmed_text.endswith(o) for o in JapaneseDateTime.BusinessHourTermList): + time_of_day = Constants.BUSINESS_HOUR + else: + timex = None + matched = False + + return {'matched': matched, 'timex': timex, 'begin_hour': begin_hour, + 'end_hour': end_hour, 'end_min': end_min} + + parse_result = TimexUtil.parse_time_of_day(time_of_day) + timex = parse_result.timex + begin_hour = parse_result.begin_hour + end_hour = parse_result.end_hour + end_min = parse_result.end_min + + # Modify time period if "early"/"late" is present + if any(trimmed_text.endswith(o) for o in JapaneseDateTime.EarlyHourTermList): + end_hour = begin_hour + Constants.HALF_MID_DAY_DURATION_HOUR_COUNT + # Handling special case: night ends with 23:59. + if end_min == 59: + end_min = 0 + + if any(trimmed_text.endswith(o) for o in JapaneseDateTime.LateHourTermList): + begin_hour = begin_hour + Constants.HALF_MID_DAY_DURATION_HOUR_COUNT + + matched = True + return {'matched': matched, 'timex': timex, 'begin_hour': begin_hour, + 'end_hour': end_hour, 'end_min': end_min} diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/date_extractor_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/date_extractor_config.py index 0316d02ef8..9dafd1a4d4 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/date_extractor_config.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/spanish/date_extractor_config.py @@ -137,17 +137,17 @@ def __init__(self): self._check_both_before_after = False 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_5 = SpanishDateTime.DateExtractor8 + date_extractor_6 = SpanishDateTime.DateExtractor9 + date_extractor_8 = SpanishDateTime.DateExtractor4 + date_extractor_7 = SpanishDateTime.DateExtractor6 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_5 = SpanishDateTime.DateExtractor6 + date_extractor_6 = SpanishDateTime.DateExtractor7 + date_extractor_8 = SpanishDateTime.DateExtractor5 + date_extractor_7 = SpanishDateTime.DateExtractor8 date_extractor_9 = SpanishDateTime.DateExtractor9 self._date_regex_list = [ diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities.py deleted file mode 100644 index e93d620357..0000000000 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities.py +++ /dev/null @@ -1,1195 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -from enum import Enum, IntEnum, IntFlag -from abc import ABC, abstractmethod -from typing import List, Dict, Pattern, Union, Match -from datetime import datetime, timedelta -import calendar - -from datedelta import datedelta -import regex - -from recognizers_text.matcher.number_with_unit_tokenizer import NumberWithUnitTokenizer -from recognizers_text.matcher.match_strategy import MatchStrategy -from recognizers_text.extractor import ExtractResult, Metadata -from recognizers_text.utilities import RegExpUtility -from recognizers_date_time.date_time.constants import TimeTypeConstants, Constants -from recognizers_date_time.date_time.extractors import DateTimeExtractor -from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult -from recognizers_text.matcher.string_matcher import StringMatcher, MatchResult -from ..resources.base_date_time import BaseDateTime - - -class TimeZoneUtility: - - @staticmethod - def merge_time_zones(original_extract_results: [ExtractResult], time_zone_ers: [ExtractResult], text: str): - - for extract_result in original_extract_results: - for time_zone_er in time_zone_ers: - - begin = extract_result.start + extract_result.length - end = time_zone_er.start - - if begin < end: - gap_text = text[begin: begin + (end - begin)] - - if gap_text.isspace() or gap_text is None: - new_length = time_zone_er.start + time_zone_er.length - extract_result.start - - extract_result.text = text[extract_result.start:new_length] - extract_result.length = new_length - extract_result.data = {Constants.SYS_DATETIME_TIMEZONE, time_zone_er} - - if extract_result.overlap(time_zone_er): - extract_result.data = {Constants.SYS_DATETIME_TIMEZONE, time_zone_er} - - return original_extract_results - - @staticmethod - def should_resolve_time_zone(extract_result: ExtractResult, options): - enable_preview = (options & DateTimeOptions.ENABLE_PREVIEW) != 0 - - if not enable_preview: - return False - - has_time_zone_data = False - - if isinstance(extract_result.data, {}): - meta_data = extract_result.data - if meta_data is not None and Constants.SYS_DATETIME_TIMEZONE in meta_data.keys(): - has_time_zone_data = True - - return has_time_zone_data - - @staticmethod - def build_matcher_from_lists(*collections: List[str]) -> StringMatcher: - matcher = StringMatcher(MatchStrategy.TrieTree, NumberWithUnitTokenizer()) - - matcher_list = [] - for collection in collections: - list(map(lambda x: matcher_list.append(x.strip().lower()), collection)) - - matcher_list = TimeZoneUtility.distinct(matcher_list) - - matcher.init(matcher_list) - - return matcher - - @staticmethod - def distinct(list1): - - unique_list = [] - for x in list1: - - if x not in unique_list: - unique_list.append(x) - - return unique_list - - -class DateTimeOptions(IntFlag): - NONE = 0 - SKIP_FROM_TO_MERGE = 1 - SPLIT_DATE_AND_TIME = 2 - CALENDAR = 4 - EXTENDED_TYPES = 8 - FAIL_FAST = 2097152 - EXPERIMENTAL_MODE = 4194304 - ENABLE_PREVIEW = 8388608 - - -class DateTimeOptionsConfiguration: - @property - def options(self): - return self._options - - @property - def dmy_date_format(self) -> bool: - return self._dmy_date_format - - def __init__(self, options=DateTimeOptions.NONE, dmy_date_format=False): - self._options = options - self._dmy_date_format = dmy_date_format - - -class DurationParsingUtil: - - @staticmethod - def is_time_duration_unit(uni_str: str): - - if uni_str == Constants.UNIT_H: - result = True - elif uni_str == Constants.UNIT_M: - result = True - elif uni_str == Constants.UNIT_S: - result = True - else: - result = False - - return result - - -class Token: - def __init__(self, start: int, end: int, metadata: Metadata = None): - self._start: int = start - self._end: int = end - self._metadata = metadata - - @property - def length(self) -> int: - if self._start > self._end: - return 0 - return self._end - self._start - - @property - def start(self) -> int: - return self._start - - @start.setter - def start(self, value) -> int: - self._start = value - - @property - def end(self) -> int: - return self._end - - @end.setter - def end(self, value) -> int: - self._end = value - - @property - def metadata(self): - return self._metadata - - @metadata.setter - def metadata(self, value): - self._metadata = value - - -def merge_all_tokens(tokens: List[Token], source: str, extractor_name: str) -> List[ExtractResult]: - result = [] - - merged_tokens: List[Token] = list() - tokens_ = sorted(filter(None, tokens), key=lambda x: x.start) - - for token in tokens_: - add = True - - for index, m_token in enumerate(merged_tokens): - if not add: - break - - if token.start >= m_token.start and token.end <= m_token.end: - add = False - - if m_token.start < token.start < m_token.end: - add = False - - if token.start <= m_token.start and token.end >= m_token.end: - add = False - merged_tokens[index] = token - - if add: - merged_tokens.append(token) - - for token in merged_tokens: - start = token.start - length = token.length - sub_str = source[start: start + length] - - extracted_result = ExtractResult() - extracted_result.start = start - extracted_result.length = length - extracted_result.text = sub_str - extracted_result.type = extractor_name - extracted_result.data = None - extracted_result.meta_data = token.metadata - - result.append(extracted_result) - - return result - - -def __token_to_result(token: Token, source: str, name: str) -> ExtractResult: - result: ExtractResult = ExtractResult() - result.start = token.start - result.length = token.length - result.text = source[token.start:token.end] - result.type = name - return result - - -def get_tokens_from_regex(pattern: Pattern, source: str) -> List[Token]: - return list(map(lambda x: Token(x.start(), x.end()), regex.finditer(pattern, source))) - - -class ResolutionStartEnd: - def __init__(self, _start=None, _end=None): - self.start = _start - self.end = _end - - @property - def _start(self): - return self.start - - @property - def _end(self): - return self.end - - -class DateTimeResolutionResult: - def __init__(self): - self.success: bool = False - self.timex: str = '' - self.is_lunar: bool = False - self.mod: str = '' - self.has_range_changing_mod: bool = False - self.comment: str = '' - self.future_resolution: Dict[str, str] = dict() - self.past_resolution: Dict[str, str] = dict() - self.future_value: object = None - self.past_value: object = None - self.sub_date_time_entities: List[object] = list() - self.timezone_resolution: TimeZoneResolutionResult() - self.list: List[object] = list() - - -class TimeOfDayResolution: - def __init__(self): - self.timex: str = None - self.begin_hour: int = 0 - self.end_hour: int = 0 - self.end_min: int = 0 - - -class DateTimeFormatUtil: - HourTimeRegex = RegExpUtility.get_safe_reg_exp(r'(? str: - format_ = f'{{0:0{size}d}}' - return str.format(format_, num) - - @staticmethod - def luis_date(year: int, month: int, day: int) -> str: - if year == -1: - if month == -1: - return f'XXXX-XX-{day:02d}' - return f'XXXX-{month:02d}-{day:02d}' - return f'{year:04d}-{month:02d}-{day:02d}' - - @staticmethod - def luis_date_from_datetime(date: datetime) -> str: - return DateTimeFormatUtil.luis_date(date.year, date.month, date.day) - - @staticmethod - def luis_time(hour: int, minute: int, second: int = Constants.INVALID_SECOND) -> str: - if second == Constants.INVALID_SECOND: - return f'{hour:02d}:{minute:02d}' - else: - return f'{hour:02d}:{minute:02d}:{second:02d}' - - @staticmethod - def luis_time_from_datetime(time: datetime) -> str: - return DateTimeFormatUtil.luis_time(time.hour, time.minute, time.second) - - @staticmethod - def luis_date_time(time: datetime) -> str: - return DateTimeFormatUtil.luis_date_from_datetime(time) + 'T' + DateTimeFormatUtil.luis_time_from_datetime(time) - - @staticmethod - def luis_date_short_time(time: datetime, timex: str = None) -> str: - has_min = False if timex is None else Constants.TIME_TIMEX_CONNECTOR in timex - has_sec = False if timex is None else len(timex.split(Constants.TIME_TIMEX_CONNECTOR)) > 2 - - return DateTimeFormatUtil.luis_date_from_datetime(time) + DateTimeFormatUtil.format_short_time(time, has_min, has_sec) - - @staticmethod - def format_short_time(time: datetime, has_min: bool = False, has_sec: bool = False) -> str: - hour = time.hour - min = time.minute if has_min or time.minute > 0 else Constants.INVALID_MINUTE - sec = time.second if has_sec or time.second > 0 else Constants.INVALID_SECOND - return DateTimeFormatUtil.short_time(hour, min, sec) - - @staticmethod - def short_time(hour: int, minute: int = Constants.INVALID_MINUTE, second: int = Constants.INVALID_SECOND) -> str: - if minute == Constants.INVALID_MINUTE and second == Constants.INVALID_SECOND: - return f'{Constants.TIME_TIMEX_PREFIX}{hour:02d}' - else: - return f'{Constants.TIME_TIMEX_PREFIX}{DateTimeFormatUtil.luis_time(hour, minute, second)}' - - @staticmethod - def luis_time_span(begin_time: datetime, end_time: datetime) -> str: - timex_builder = f'{Constants.GENERAL_PERIOD_PREFIX}{Constants.TIME_TIMEX_PREFIX}' - span = end_time - begin_time - total_days = span.days - total_seconds = span.seconds - total_hours, total_seconds = divmod(total_seconds, Constants.HOUR_SECOND_COUNT) - total_minutes, total_seconds = divmod(total_seconds, Constants.MINUTE_SECOND_COUNT) - - if total_days > 0 or total_hours > 0: - timex_builder += f'{total_days * Constants.DAY_HOUR_COUNT + total_hours}H' - if total_minutes > 0: - timex_builder += f'{total_minutes}M' - if total_seconds > 0: - timex_builder += f'{total_seconds}S' - - return str(timex_builder) - - @staticmethod - def format_date(date: datetime) -> str: - return f'{date.year:04d}-{date.month:02d}-{date.day:02d}' - - @staticmethod - def format_time(time: datetime) -> str: - return f'{time.hour:02d}:{time.minute:02d}:{time.second:02d}' - - @staticmethod - def format_date_time(date_time: datetime) -> str: - return DateTimeFormatUtil.format_date(date_time) + ' ' + DateTimeFormatUtil.format_time(date_time) - - @staticmethod - def all_str_to_pm(source: str) -> str: - matches = list(regex.finditer( - DateTimeFormatUtil.HourTimeRegex, source)) - split: List[str] = list() - last_position = 0 - - for match in matches: - if last_position != match.start(): - split.append(source[last_position:match.start()]) - - split.append(source[match.start():match.end()]) - last_position = match.end() - - if source[:last_position]: - split.append(source[last_position:]) - - for index, value in enumerate(split): - if regex.search(DateTimeFormatUtil.HourTimeRegex, value): - split[index] = DateTimeFormatUtil.to_pm(value) - - return ''.join(split) - - @staticmethod - def to_pm(source: str) -> str: - result = '' - - if source.startswith(Constants.UNIT_T): - result = Constants.UNIT_T - source = source[1:] - - split = source.split(':') - hour = int(split[0]) - hour = 0 if hour == 12 else hour + 12 - split[0] = f'{hour:02d}' - return result + ':'.join(split) - -# ISO weekday - - -class DayOfWeek(IntEnum): - MONDAY = 1 - TUESDAY = 2 - WEDNESDAY = 3 - THURSDAY = 4 - FRIDAY = 5 - SATURDAY = 6 - SUNDAY = 7 - - -class DateUtils: - min_value = datetime(1, 1, 1, 0, 0, 0, 0) - - # Generate future/past date for cases without specific year like "Feb 29th" - @staticmethod - def generate_dates(no_year: bool, reference: datetime, year: int, month: int, day: int) -> list: - future_date = DateUtils.safe_create_from_min_value(year, month, day) - past_date = DateUtils.safe_create_from_min_value(year, month, day) - future_year = year - past_year = year - if no_year: - if DateUtils.is_Feb_29th(year, month, day): - if DateUtils.is_leap_year(year): - if future_date < reference: - future_date = DateUtils.safe_create_from_min_value(future_year + 4, month, day) - else: - past_date = DateUtils.safe_create_from_min_value(past_year - 4, month, day) - else: - past_year = past_year >> 2 << 2 - if not DateUtils.is_leap_year(past_year): - past_year -= 4 - - future_year = past_year + 4 - if not DateUtils.is_leap_year(future_year): - future_year += 4 - - future_date = DateUtils.safe_create_from_min_value(future_year, month, day) - past_date = DateUtils.safe_create_from_min_value(past_year, month, day) - else: - if future_date < reference and DateUtils.is_valid_date(year, month, day): - future_date = DateUtils.safe_create_from_min_value(year + 1, month, day) - - if past_date >= reference and DateUtils.is_valid_date(year, month, day): - past_date = DateUtils.safe_create_from_min_value(year - 1, month, day) - return future_date, past_date - - @staticmethod - def int_try_parse(value): - try: - return int(value), True - except ValueError: - return value, False - - @staticmethod - def safe_create_from_value(seed: datetime, year: int, month: int, day: int, - hour: int = 0, minute: int = 0, second: int = 0) -> datetime: - if DateUtils.is_valid_date(year, month, day) and DateUtils.is_valid_time(hour, minute, second): - return datetime(year, month, day, hour, minute, second) - - return seed - - @staticmethod - def safe_create_from_min_value(year: int, month: int, day: int, - hour: int = 0, minute: int = 0, second: int = 0) -> datetime: - return DateUtils.safe_create_from_value(DateUtils.min_value, year, month, day, hour, minute, second) - - @staticmethod - def safe_create_from_min_value_date_time(date: datetime, time: datetime = None) -> datetime: - return DateUtils.safe_create_from_value(DateUtils.min_value, date.year, date.month, date.day, - time.hour if time else 0, time.minute if time else 0, - time.second if time else 0) - - @staticmethod - def is_valid_date(year: int, month: int, day: int) -> bool: - try: - datetime(year, month, day) - return True - except ValueError: - return False - - @staticmethod - def is_valid_datetime(date: datetime) -> bool: - return date != DateUtils.min_value - - @staticmethod - def is_valid_time(hour: int, minute: int, second: int) -> bool: - return 0 <= hour < 24 and 0 <= minute < 60 and second >= 0 and minute < 60 - - @staticmethod - def this(from_date: datetime, day_of_week: DayOfWeek) -> datetime: - start = from_date.isoweekday() - target = day_of_week if day_of_week >= int( - DayOfWeek.MONDAY) else int(DayOfWeek.SUNDAY) - result = from_date + timedelta(days=target-start) - return result - - @staticmethod - def next(from_date: datetime, day_of_week: DayOfWeek) -> datetime: - return DateUtils.this(from_date, day_of_week) + timedelta(weeks=1) - - @staticmethod - def last(from_date: datetime, day_of_week: DayOfWeek) -> datetime: - return DateUtils.this(from_date, day_of_week) - timedelta(weeks=1) - - @staticmethod - def safe_create_date_resolve_overflow(year: int, month: int, day: int) -> datetime: - if month > 12: - year = year + month // 12 - month = month % 12 - return DateUtils.safe_create_from_min_value(year, month, day) - - @staticmethod - def total_hours(from_date: datetime, to_date: datetime) -> int: - return round((to_date - from_date).total_seconds() / 3600) - - @staticmethod - def day_of_year(seed: datetime) -> int: - return seed.timetuple().tm_yday - - @staticmethod - def last_day_of_month(year: int, month: int) -> int: - return calendar.monthrange(year, month)[1] - - @staticmethod - def week_of_year(date: datetime) -> int: - return date.isocalendar()[1] - - @staticmethod - def is_leap_year(year) -> bool: - return (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0) - - @staticmethod - def is_Feb_29th(year, month, day): - return month == 2 and day == 29 - - @staticmethod - def is_Feb_29th_datetime(date: datetime): - return date.month == 2 and date.day == 29 - - @staticmethod - def day_of_week(day): - dayOfWeek = { - 'sunday': 0, - 'monday': 1, - 'tuesday': 2, - 'wednesday': 3, - 'thursday': 4, - 'friday': 5, - 'saturday': 6, - } - return dayOfWeek.get(day) - - -class HolidayFunctions: - - @staticmethod - def calculate_holiday_by_easter(year: int, days: int = 0) -> datetime: - - day = 0 - month = 3 - - g = year % 19 - c = year / 100 - - h = (c - int(c / 4) - int(((8 * c) + 13) / 25) + (19 * g) + 15) % 30 - i = h - (int(h / 28) * (1 - (int(h / 28) * int(29 / (h + 1)) * int((21 - g) / 11)))) - day = i - ((year + int(year / 4) + i + 2 - c + int(c / 4)) % 7) + 28 - - if day > 31: - month += 1 - day -= 31 - - return DateUtils.safe_create_from_min_value(year, month, int(day)) + timedelta(days=days) - - -class DateTimeUtilityConfiguration(ABC): - @property - @abstractmethod - def since_year_suffix_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def date_unit_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def range_prefix_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def ago_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def later_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def in_connector_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def range_unit_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def am_desc_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def pm_desc__regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def am_pm_desc_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def time_unit_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def within_next_prefix_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def common_date_prefix_regex(self) -> Pattern: - raise NotImplementedError - - @property - @abstractmethod - def check_both_before_after(self) -> Pattern: - raise NotImplementedError - - -class MatchedIndex: - def __init__(self, matched: bool, index: int): - self.matched = matched - self.index = index - - -class MatchingUtil: - - invalid_day_number_prefix = RegExpUtility.get_safe_reg_exp( - BaseDateTime.InvalidDayNumberPrefix) - - @staticmethod - def is_invalid_day_number_prefix(prefix: str) -> bool: - return MatchingUtil.invalid_day_number_prefix.search(prefix) - - @staticmethod - def pre_process_text_remove_superfluous_words(text: str, matcher: Pattern): - superfluous_word_matches = MatchingUtil.remove_sub_matches(matcher.find(text)) - - bias = 0[0] - - for match in superfluous_word_matches: - text = text[match.start - bias: match.length] - - bias += match.length - - return text, superfluous_word_matches - - @staticmethod - def post_process_recover_superfluous_words(extract_results: List[ExtractResult], superfluous_word_matches, - origin_text: str): - for match in superfluous_word_matches: - for extract_result in extract_results: - - extract_result_end = extract_result.start + extract_result.length - if extract_result.start < match.start <= extract_result_end: - extract_result.length += len(match) - - if match.start <= extract_result.start: - extract_result.start += len(match) - - for extract_result in extract_results: - extract_result.text = origin_text[extract_result.start: extract_result.start + extract_result.length] - - return extract_results - - @staticmethod - def remove_sub_matches(match_results: List[MatchResult]): - match_list = list(match_results) - - match_list = (list(filter(lambda item: not any(list(filter( - lambda ritem: (ritem.start < item.start and ritem.end >= item.end) or ( - ritem.start <= item.start and ritem.end > item.end), match_list))), match_list))) - - return match_list - - @staticmethod - def get_ago_later_index(source: str, regexp: Pattern, in_suffix) -> MatchedIndex: - result = MatchedIndex(matched=False, index=-1) - trimmed_source = source.strip().lower() - match = RegExpUtility.match_begin(regexp, trimmed_source, True) if in_suffix else\ - RegExpUtility.match_end(regexp, trimmed_source, True) - - if match and match.success: - result.index = source.lower().find(match.group()) + (match.length if in_suffix else 0) - result.matched = True - - return result - - @staticmethod - def contains_ago_later_index(source: str, regexp: Pattern, in_suffix) -> bool: - return MatchingUtil.get_ago_later_index(source, regexp, in_suffix).matched - - @staticmethod - def get_term_index(source: str, regexp: Pattern) -> MatchedIndex: - result = MatchedIndex(matched=False, index=-1) - referenced_match = regex.search( - regexp, source.strip().lower().split(' ').pop()) - - if referenced_match: - result = MatchedIndex(matched=True, index=len( - source) - source.lower().rfind(referenced_match.group())) - - return result - - @staticmethod - def contains_term_index(source: str, regexp: Pattern) -> bool: - return MatchingUtil.get_term_index(source, regexp).matched - - -class AgoLaterMode(Enum): - DATE = 0 - DATETIME = 1 - - -class AgoLaterUtil: - @staticmethod - def extractor_duration_with_before_and_after(source: str, extract_result: ExtractResult, - ret: List[Token], config: DateTimeUtilityConfiguration) -> List[Token]: - pos = extract_result.start + extract_result.length - index = 0 - if pos <= len(source): - after_string = source[pos:] - before_string = source[0: extract_result.start] - is_time_duration = config.time_unit_regex.search(extract_result.text) - ago_later_regexes = [config.ago_regex, config.later_regex] - is_match = False - - for regexp in ago_later_regexes: - token_after = token_before = None - is_day_match = False - # Check after_string - if MatchingUtil.get_ago_later_index(after_string, regexp, True).matched: - # We don't support cases like "5 minutes from today" for now - # Cases like "5 minutes ago" or "5 minutes from now" are supported - # Cases like "2 days before today" or "2 weeks from today" are also supported - - is_day_match = RegExpUtility.get_group( - regexp.match(after_string), Constants.DAY_GROUP_NAME) - - index = MatchingUtil.get_ago_later_index( - after_string, regexp, True).index - - if not(is_time_duration and is_day_match): - token_after = Token(extract_result.start, extract_result.start + - extract_result.length + index) - is_match = True - - if config.check_both_before_after: - before_after_str = before_string + after_string - is_range_match = RegExpUtility.match_begin(config.range_prefix_regex, after_string[:index], True) - index_start = MatchingUtil.get_ago_later_index(before_after_str, regexp, False) - if not is_range_match and index_start.matched: - is_day_match = regexp.match(before_after_str) - - if is_day_match and not (is_time_duration and is_day_match): - ret.append(Token(index_start.index, (extract_result.start + extract_result.length or 0) + index)) - is_match = True - index = MatchingUtil.get_ago_later_index(before_string, regexp, False).index - if MatchingUtil.get_ago_later_index(before_string, regexp, False).matched: - is_day_match = RegExpUtility.get_group(regexp.match(before_string), 'day') - - if not (is_day_match and is_time_duration): - token_before = Token(index, extract_result.start + extract_result.length or 0) - is_match = True - - if token_after is not None and token_before is not None and token_before.start + token_before.length > token_after.start: - ret.append(Token(token_before.start, token_after.start + token_after.length - token_before.start)) - elif token_after is not None: - ret.append(token_after) - elif token_before is not None: - ret.append(token_before) - if is_match: - break - - if not is_match: - in_within_regex_tuples = [ - (config.in_connector_regex, [config.range_unit_regex]), - (config.within_next_prefix_regex, [config.date_unit_regex, config.time_unit_regex]) - ] - - for regexp in in_within_regex_tuples: - is_match_after = False - index = MatchingUtil.get_term_index(before_string, regexp[0]).index - if index > 0: - is_match = True - elif config.check_both_before_after and\ - MatchingUtil.get_ago_later_index(after_string, regexp[0], True).matched: - is_match = is_match_after = True - - if is_match: - is_unit_match = False - for unit_regex in regexp[1]: - is_unit_match = is_unit_match or unit_regex.match(extract_result.text) - - if not is_unit_match: - if extract_result.start is not None and extract_result.length is not None and\ - extract_result.start >= index or is_match_after: - start = extract_result.start - (index if not is_match_after else 0) - end = extract_result.start + extract_result.length + (index if is_match_after else 0) - ret.append(Token(start, end)) - break - return ret - - @staticmethod - def parse_duration_with_ago_and_later(source: str, reference: datetime, - duration_extractor: DateTimeExtractor, - duration_parser: DateTimeParser, - unit_map: Dict[str, str], - unit_regex: Pattern, - utility_configuration: DateTimeUtilityConfiguration)\ - -> DateTimeResolutionResult: - result = DateTimeResolutionResult() - - if duration_extractor: - duration_extract = duration_extractor.extract(source, reference) - else: - return result - - if not duration_extract: - return result - - duration = next(iter(duration_extract)) - pr = duration_parser.parse(duration, reference) - - if not pr: - return result - - match = regex.search(unit_regex, source) - if not match: - return result - - after_str = source[duration.start + duration.length:] - before_str = source[0:duration.start] - src_unit = match.group(Constants.UNIT) - duration_result: DateTimeResolutionResult = pr.value - num_str = duration_result.timex[0:len( - duration_result.timex) - 1].replace(Constants.UNIT_P, '').replace(Constants.UNIT_T, '') - num = int(num_str) - - mode = AgoLaterMode.DATE - if pr.timex_str.__contains__("T"): - mode = AgoLaterMode.DATETIME - - if pr.value: - return AgoLaterUtil.get_ago_later_result( - pr, num, unit_map, src_unit, after_str, before_str, reference, - utility_configuration, mode) - - return result - - @staticmethod - def __matched_string(regexp, string): - is_match = True - match = regexp.match(string) - day_str = match.group('day') - - return is_match, match, day_str - - @staticmethod - def get_ago_later_result( - duration_parse_result: DateTimeParseResult, num: int, - unit_map: Dict[str, str], src_unit: str, after_str: str, - before_str: str, reference: datetime, - utility_configuration: DateTimeUtilityConfiguration, mode: AgoLaterMode): - - result = DateTimeResolutionResult() - unit_str = unit_map.get(src_unit) - - if not unit_str: - return result - - contains_ago = MatchingUtil.contains_ago_later_index( - after_str, utility_configuration.ago_regex, True) - contains_later_or_in = MatchingUtil.contains_ago_later_index( - after_str, utility_configuration.later_regex, False) or\ - MatchingUtil.contains_term_index(before_str, utility_configuration.in_connector_regex) - - if contains_ago: - result = AgoLaterUtil.get_date_result( - unit_str, num, reference, False, mode) - duration_parse_result.value.mod = TimeTypeConstants.BEFORE_MOD - result.sub_date_time_entities = [duration_parse_result] - return result - - if contains_later_or_in: - result = AgoLaterUtil.get_date_result( - unit_str, num, reference, True, mode) - duration_parse_result.value.mod = TimeTypeConstants.AFTER_MOD - result.sub_date_time_entities = [duration_parse_result] - return result - - return result - - @staticmethod - def get_date_result( - unit_str: str, num: int, reference: datetime, is_future: bool, - mode: AgoLaterMode) -> DateTimeResolutionResult: - value = reference - result = DateTimeResolutionResult() - swift = 1 if is_future else -1 - - if unit_str == Constants.UNIT_D: - value += timedelta(days=num * swift) - elif unit_str == Constants.UNIT_W: - value += timedelta(days=num * swift * 7) - elif unit_str == Constants.UNIT_MON: - value += datedelta(months=num * swift) - elif unit_str == Constants.UNIT_Y: - value += datedelta(years=num * swift) - elif unit_str == Constants.UNIT_H: - value += timedelta(hours=num * swift) - elif unit_str == Constants.UNIT_M: - value += timedelta(minutes=num * swift) - elif unit_str == Constants.UNIT_S: - value += timedelta(seconds=num * swift) - else: - return result - - result.timex = DateTimeFormatUtil.luis_date_from_datetime( - value) if mode == AgoLaterMode.DATE else DateTimeFormatUtil.luis_date_time(value) - result.future_value = value - result.past_value = value - result.success = True - return result - - -class DateContext: - year: int = Constants.INVALID_YEAR - - # This method is to ensure the begin date is less than the end date. As DateContext only supports common Year as - # context, so it subtracts one year from beginDate. - # @TODO problematic in other usages. - @staticmethod - def swift_date_object(begin_date: datetime, end_date: datetime) -> datetime: - if begin_date > end_date: - begin_date = begin_date - datedelta(years=1) - return begin_date - - def process_date_entity_parsing_result(self, original_result: DateTimeParseResult) -> DateTimeParseResult: - if not self.is_empty(): - original_result.timex_str = TimexUtil.set_timex_with_context(original_result.timex_str, self) - original_result.value = self.process_date_entity_resolution(original_result.value) - - return original_result - - def process_date_entity_resolution(self, resolution_result: DateTimeResolutionResult) -> DateTimeResolutionResult: - if not self.is_empty(): - resolution_result.timex = TimexUtil.set_timex_with_context(resolution_result.timex, self) - resolution_result.future_value = self.__set_date_with_context(resolution_result.future_value) - resolution_result.past_value = self.__set_date_with_context(resolution_result.past_value) - return resolution_result - - def process_date_period_entity_resolution(self, resolution_result: DateTimeResolutionResult) -> DateTimeResolutionResult: - if not self.is_empty(): - resolution_result.timex = TimexUtil.set_timex_with_context(resolution_result.timex, self) - resolution_result.future_value = self.__set_date_range_with_context(resolution_result.future_value) - resolution_result.past_value = self.__set_date_range_with_context(resolution_result.past_value) - return resolution_result - - def is_empty(self) -> bool: - return self.year == Constants.INVALID_YEAR - - def __set_date_with_context(self, original_date, year=-1) -> datetime: - if not DateUtils.is_valid_datetime(original_date): - return original_date - value = DateUtils.safe_create_from_min_value(year=self.year if year == -1 else year, month=original_date.month, day=original_date.day) - return value - - def __set_date_range_with_context(self, original_date_range): - start_date = self.__set_date_with_context(original_date_range[0]) - end_date = self.__set_date_with_context(original_date_range[1]) - result = { - TimeTypeConstants.START_DATE: start_date, - TimeTypeConstants.END_DATE: end_date - } - - return result - - # This method is to ensure the year of begin date is same with the end date in no year situation. - def sync_year(self, pr1, pr2): - if self.is_empty(): - if DateUtils.is_Feb_29th_datetime(pr1.value.future_value): - future_year = pr1.value.future_value.year - past_year = pr1.value.past_value.year - pr2.value = self.sync_year_resolution(pr2.value, future_year, past_year) - elif DateUtils.is_Feb_29th_datetime(pr2.value.future_value): - future_year = pr2.value.future_value.year - past_year = pr2.value.past_value.year - pr1.value = self.sync_year_resolution(pr1.value, future_year, past_year) - return pr1, pr2 - - def sync_year_resolution(self, resolution_result, future_year, past_year): - resolution_result.future_value = self.__set_date_with_context(resolution_result.future_value, future_year) - resolution_result.past_value = self.__set_date_with_context(resolution_result.past_value, past_year) - return resolution_result - - -date_period_timex_type_to_suffix = { - 0: Constants.TIMEX_DAY, - 1: Constants.TIMEX_WEEK, - 2: Constants.TIMEX_MONTH, - 3: Constants.TIMEX_YEAR, -} - - -class RangeTimexComponents: - def __init__(self): - self.begin_timex = '' - self.end_timex = '' - self.duration_timex = '' - self.is_valid = False - - -class TimexUtil: - - @staticmethod - def merge_timex_alternatives(timex1: str, timex2: str) -> str: - if timex1 == timex2: - return timex1 - return f"{timex1}{Constants.COMPOSTIE_TIMEX_DELIMITER}{timex2}" - - @staticmethod - def parse_time_of_day(tod: str) -> TimeOfDayResolution: - result = TimeOfDayResolution() - - if tod == Constants.EARLY_MORNING: - result.timex = Constants.EARLY_MORNING - result.begin_hour = 4 - result.end_hour = 8 - elif tod == Constants.MORNING: - result.timex = Constants.MORNING - result.begin_hour = 8 - result.end_hour = 12 - elif tod == Constants.MID_DAY: - result.timex = Constants.MID_DAY - result.begin_hour = 11 - result.end_hour = 13 - elif tod == Constants.AFTERNOON: - result.timex = Constants.AFTERNOON - result.begin_hour = 12 - result.end_hour = 16 - elif tod == Constants.EVENING: - result.timex = Constants.EVENING - result.begin_hour = 16 - result.end_hour = 20 - elif tod == Constants.DAYTIME: - result.timex = Constants.DAYTIME - result.begin_hour = 8 - result.end_hour = 18 - elif tod == Constants.BUSINESS_HOUR: - result.timex = Constants.BUSINESS_HOUR - result.begin_hour = 8 - result.end_hour = 18 - elif tod == Constants.NIGHT: - result.timex = Constants.NIGHT - result.begin_hour = 20 - result.end_hour = 23 - result.end_min = 59 - elif tod == Constants.MEALTIME_BREAKFAST: - result.timex = Constants.MEALTIME_BREAKFAST - result.begin_hour = 8 - result.end_hour = 12 - elif tod == Constants.MEALTIME_BRUNCH: - result.timex = Constants.MEALTIME_BRUNCH - result.begin_hour = 8 - result.end_hour = 12 - elif tod == Constants.MEALTIME_LUNCH: - result.timex = Constants.MEALTIME_LUNCH - result.begin_hour = 11 - result.end_hour = 13 - elif tod == Constants.MEALTIME_DINNER: - result.timex = Constants.MEALTIME_DINNER - result.begin_hour = 16 - result.end_hour = 20 - - return result - - @staticmethod - def set_timex_with_context(timex: str, context: DateContext) -> str: - result = timex.replace(Constants.TIMEX_FUZZY_YEAR, str(context.year)) - return result - - @staticmethod - def generate_date_period_timex_unit_count(begin, end, timex_type, equal_duration_length=True): - unit_count = 'XX' - - if equal_duration_length: - if timex_type == 0: - unit_count = (end - begin).days - - if timex_type == 1: - unit_count = (end - begin).days/7 - if timex_type == 2: - unit_count = ((end.year - begin.year) * 12) + (end.month - begin.month) - if timex_type == 3: - unit_count = (end.year - begin.year) + ((end.mont - begin.month) / 12.0) - return unit_count - - @staticmethod - def generate_date_period_timex_str(begin, end, timex_type, timex1, timex2): - boundary_valid = DateUtils.is_valid_datetime(begin) and DateUtils.is_valid_datetime(end) - unit_count = TimexUtil.generate_date_period_timex_unit_count(begin, end, timex_type) if boundary_valid else "X" - return f"({timex1},{timex2},P{unit_count}{date_period_timex_type_to_suffix[timex_type]})" - - @staticmethod - def generate_date_period_timex(begin, end, timex_type, alternative_begin=datetime.now(), alternative_end=datetime.now()): - equal_duration_length = (end - begin).days == (alternative_end - alternative_begin).days or datetime.now() == alternative_end == alternative_begin - unit_count = TimexUtil.generate_date_period_timex_unit_count(begin, end, timex_type, equal_duration_length) - date_period_timex = f'P{unit_count}{date_period_timex_type_to_suffix[timex_type]}' - - return f'({DateTimeFormatUtil.luis_date(begin.year, begin.month, begin.day)},' \ - f'{DateTimeFormatUtil.luis_date(end.year, end.month, end.day)},{date_period_timex})' - - @staticmethod - def _process_double_timex(resolution_dic: Dict[str, object], future_key: str, past_key: str, origin_timex: str): - timexes = origin_timex.split(Constants.COMPOSTIE_TIMEX_DELIMITER) - if not future_key in resolution_dic or not past_key in resolution_dic or len(timexes) != 2: - return - future_resolution = resolution_dic[future_key] - past_resolution = resolution_dic[past_key] - future_resolution[Constants.TIMEX_KEY] = timexes[0] - past_resolution[Constants.TIMEX_KEY] = timexes[1] - - @staticmethod - def _has_double_timex(comment: str): - return comment == Constants.COMMENT_DOUBLETIMEX - - @staticmethod - def is_range_timex(timex: str) -> bool: - return timex and timex.startswith("(") - - @staticmethod - def get_range_timex_components(range_timex: str) -> RangeTimexComponents: - range_timex = range_timex.replace('(', '').replace(')', '') - components = range_timex.split(',') - result = RangeTimexComponents() - if len(components) == 3: - result.begin_timex = components[0] - result.end_timex = components[1] - result.duration_timex = components[2] - result.is_valid = True - - return result - - @staticmethod - def combine_date_and_time_timex(date_timex: str, time_timex: str): - return f'{date_timex}{time_timex}' - - @staticmethod - def generate_date_time_period_timex(begin_timex: str, end_timex: str, duration_timex: str): - return f'({begin_timex},{end_timex},{duration_timex})' - - -class TimeZoneResolutionResult: - def __init__(self): - self.value: str = '' - self.utc_offset_mins: int = 0 - self.time_zone_text: str = '' - - -def parse_chinese_dynasty_year(year_str: str, dynasty_year_regex: Pattern, dynasty_start_year: str, dynasty_year_map: dict, integer_extractor, number_parser): - dynasty_year_match = regex.search(dynasty_year_regex, year_str) - if dynasty_year_match and dynasty_year_match.start() == 0 and len(dynasty_year_match.group()) == len(year_str): - # handle "康熙元年" refer to https://zh.wikipedia.org/wiki/%E5%B9%B4%E5%8F%B7 - dynasty_str = RegExpUtility.get_group(dynasty_year_match, "dynasty") - bias_year_str = RegExpUtility.get_group(dynasty_year_match, "biasYear") - basic_year = dynasty_year_map[dynasty_str] - if bias_year_str == dynasty_start_year: - bias_year = 1 - else: - er = next(iter(integer_extractor.extract(bias_year_str)), None) - bias_year = int(number_parser.parse(er).value) - year = int(basic_year + bias_year - 1) - return year - return None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/__init__.py new file mode 100644 index 0000000000..f71b41f813 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/__init__.py @@ -0,0 +1,27 @@ +from .token_utils import * +from .datetime_utility_config import * +from .matching_util import * +from .time_zone_resolution_result import * +from .datetime_resolution_result import * +from .datetime_format_utils import * +from .ago_later_util import * +from .time_of_day_resolution import * +from .date_utils import * +from .range_timex_components import * +from .datetime_resolution_key import * +from .timex_utility import * +from .date_context import * +from .datetime_options import * +from .datetime_utility_config import * +from .duration_parsing_util import * +from .holiday_functions import * +from .time_zone_utility import * +from .resolution_start_end import * +from .extract_results_extension import * +from .datetime_extra import * +from .time_result import * +from .time_functions import * +from .time_period_functions import * +from .merged_parser_util import * +from .set_handler import * +from .mod_and_date_result import * diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/ago_later_util.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/ago_later_util.py new file mode 100644 index 0000000000..50413e350b --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/ago_later_util.py @@ -0,0 +1,231 @@ +from enum import Enum +from typing import List, Dict, Pattern +from datetime import datetime, timedelta + +from datedelta import datedelta +import regex + +from recognizers_text.extractor import ExtractResult +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.date_time.constants import TimeTypeConstants, Constants +from recognizers_date_time.date_time.extractors import DateTimeExtractor +from recognizers_date_time.date_time.parsers import DateTimeParser, DateTimeParseResult +from recognizers_date_time.date_time.utilities import Token, DateTimeUtilityConfiguration, MatchingUtil, \ + DateTimeResolutionResult, DateTimeFormatUtil + + +class AgoLaterMode(Enum): + DATE = 0 + DATETIME = 1 + + +class AgoLaterUtil: + @staticmethod + def extractor_duration_with_before_and_after(source: str, extract_result: ExtractResult, + ret: List[Token], config: DateTimeUtilityConfiguration) -> List[Token]: + pos = extract_result.start + extract_result.length + index = 0 + if pos <= len(source): + after_string = source[pos:] + before_string = source[0: extract_result.start] + is_time_duration = config.time_unit_regex.search(extract_result.text) + ago_later_regexes = [config.ago_regex, config.later_regex] + is_match = False + + for regexp in ago_later_regexes: + token_after = token_before = None + is_day_match = False + # Check after_string + if MatchingUtil.get_ago_later_index(after_string, regexp, True).matched: + # We don't support cases like "5 minutes from today" for now + # Cases like "5 minutes ago" or "5 minutes from now" are supported + # Cases like "2 days before today" or "2 weeks from today" are also supported + + is_day_match = RegExpUtility.get_group( + regexp.match(after_string), Constants.DAY_GROUP_NAME) + + index = MatchingUtil.get_ago_later_index( + after_string, regexp, True).index + + if not(is_time_duration and is_day_match): + token_after = Token(extract_result.start, extract_result.start + + extract_result.length + index) + is_match = True + + if config.check_both_before_after: + before_after_str = before_string + after_string + is_range_match = RegExpUtility.match_begin(config.range_prefix_regex, after_string[:index], True) + index_start = MatchingUtil.get_ago_later_index(before_after_str, regexp, False) + if not is_range_match and index_start.matched: + is_day_match = regexp.match(before_after_str) + + if is_day_match and not (is_time_duration and is_day_match): + ret.append(Token(index_start.index, (extract_result.start + extract_result.length or 0) + index)) + is_match = True + index = MatchingUtil.get_ago_later_index(before_string, regexp, False).index + if MatchingUtil.get_ago_later_index(before_string, regexp, False).matched: + is_day_match = RegExpUtility.get_group(regexp.match(before_string), 'day') + + if not (is_day_match and is_time_duration): + token_before = Token(index, extract_result.start + extract_result.length or 0) + is_match = True + + if token_after is not None and token_before is not None and token_before.start + token_before.length > token_after.start: + ret.append(Token(token_before.start, token_after.start + token_after.length - token_before.start)) + elif token_after is not None: + ret.append(token_after) + elif token_before is not None: + ret.append(token_before) + if is_match: + break + + if not is_match: + in_within_regex_tuples = [ + (config.in_connector_regex, [config.range_unit_regex]), + (config.within_next_prefix_regex, [config.date_unit_regex, config.time_unit_regex]) + ] + + for regexp in in_within_regex_tuples: + is_match_after = False + index = MatchingUtil.get_term_index(before_string, regexp[0]).index + if index > 0: + is_match = True + elif config.check_both_before_after and\ + MatchingUtil.get_ago_later_index(after_string, regexp[0], True).matched: + is_match = is_match_after = True + + if is_match: + is_unit_match = False + for unit_regex in regexp[1]: + is_unit_match = is_unit_match or unit_regex.match(extract_result.text) + + if not is_unit_match: + if extract_result.start is not None and extract_result.length is not None and\ + extract_result.start >= index or is_match_after: + start = extract_result.start - (index if not is_match_after else 0) + end = extract_result.start + extract_result.length + (index if is_match_after else 0) + ret.append(Token(start, end)) + break + return ret + + @staticmethod + def parse_duration_with_ago_and_later(source: str, reference: datetime, + duration_extractor: DateTimeExtractor, + duration_parser: DateTimeParser, + unit_map: Dict[str, str], + unit_regex: Pattern, + utility_configuration: DateTimeUtilityConfiguration)\ + -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + if duration_extractor: + duration_extract = duration_extractor.extract(source, reference) + else: + return result + + if not duration_extract: + return result + + duration = next(iter(duration_extract)) + pr = duration_parser.parse(duration, reference) + + if not pr: + return result + + match = regex.search(unit_regex, source) + if not match: + return result + + after_str = source[duration.start + duration.length:] + before_str = source[0:duration.start] + src_unit = match.group(Constants.UNIT) + duration_result: DateTimeResolutionResult = pr.value + num_str = duration_result.timex[0:len( + duration_result.timex) - 1].replace(Constants.UNIT_P, '').replace(Constants.UNIT_T, '') + num = int(num_str) + + mode = AgoLaterMode.DATE + if pr.timex_str.__contains__("T"): + mode = AgoLaterMode.DATETIME + + if pr.value: + return AgoLaterUtil.get_ago_later_result( + pr, num, unit_map, src_unit, after_str, before_str, reference, + utility_configuration, mode) + + return result + + @staticmethod + def __matched_string(regexp, string): + is_match = True + match = regexp.match(string) + day_str = match.group('day') + + return is_match, match, day_str + + @staticmethod + def get_ago_later_result( + duration_parse_result: DateTimeParseResult, num: int, + unit_map: Dict[str, str], src_unit: str, after_str: str, + before_str: str, reference: datetime, + utility_configuration: DateTimeUtilityConfiguration, mode: AgoLaterMode): + + result = DateTimeResolutionResult() + unit_str = unit_map.get(src_unit) + + if not unit_str: + return result + + contains_ago = MatchingUtil.contains_ago_later_index( + after_str, utility_configuration.ago_regex, True) + contains_later_or_in = MatchingUtil.contains_ago_later_index( + after_str, utility_configuration.later_regex, False) or\ + MatchingUtil.contains_term_index(before_str, utility_configuration.in_connector_regex) + + if contains_ago: + result = AgoLaterUtil.get_date_result( + unit_str, num, reference, False, mode) + duration_parse_result.value.mod = TimeTypeConstants.BEFORE_MOD + result.sub_date_time_entities = [duration_parse_result] + return result + + if contains_later_or_in: + result = AgoLaterUtil.get_date_result( + unit_str, num, reference, True, mode) + duration_parse_result.value.mod = TimeTypeConstants.AFTER_MOD + result.sub_date_time_entities = [duration_parse_result] + return result + + return result + + @staticmethod + def get_date_result( + unit_str: str, num: int, reference: datetime, is_future: bool, + mode: AgoLaterMode) -> DateTimeResolutionResult: + value = reference + result = DateTimeResolutionResult() + swift = 1 if is_future else -1 + + if unit_str == Constants.UNIT_D: + value += timedelta(days=num * swift) + elif unit_str == Constants.UNIT_W: + value += timedelta(days=num * swift * 7) + elif unit_str == Constants.UNIT_MON: + value += datedelta(months=num * swift) + elif unit_str == Constants.UNIT_Y: + value += datedelta(years=num * swift) + elif unit_str == Constants.UNIT_H: + value += timedelta(hours=num * swift) + elif unit_str == Constants.UNIT_M: + value += timedelta(minutes=num * swift) + elif unit_str == Constants.UNIT_S: + value += timedelta(seconds=num * swift) + else: + return result + + result.timex = DateTimeFormatUtil.luis_date_from_datetime( + value) if mode == AgoLaterMode.DATE else DateTimeFormatUtil.luis_date_time(value) + result.future_value = value + result.past_value = value + result.success = True + return result \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/date_context.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/date_context.py new file mode 100644 index 0000000000..60f8aa989e --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/date_context.py @@ -0,0 +1,77 @@ +from datetime import datetime + +from datedelta import datedelta +from recognizers_date_time.date_time.constants import TimeTypeConstants, Constants +from recognizers_date_time.date_time.parsers import DateTimeParseResult +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, TimexUtil, DateUtils + + +class DateContext: + year: int = Constants.INVALID_YEAR + + # This method is to ensure the begin date is less than the end date. As DateContext only supports common Year as + # context, so it subtracts one year from beginDate. + # @TODO problematic in other usages. + @staticmethod + def swift_date_object(begin_date: datetime, end_date: datetime) -> datetime: + if begin_date > end_date: + begin_date = begin_date - datedelta(years=1) + return begin_date + + def process_date_entity_parsing_result(self, original_result: DateTimeParseResult) -> DateTimeParseResult: + if not self.is_empty(): + original_result.timex_str = TimexUtil.set_timex_with_context(original_result.timex_str, self) + original_result.value = self.process_date_entity_resolution(original_result.value) + + return original_result + + def process_date_entity_resolution(self, resolution_result: DateTimeResolutionResult) -> DateTimeResolutionResult: + if not self.is_empty(): + resolution_result.timex = TimexUtil.set_timex_with_context(resolution_result.timex, self) + resolution_result.future_value = self.__set_date_with_context(resolution_result.future_value) + resolution_result.past_value = self.__set_date_with_context(resolution_result.past_value) + return resolution_result + + def process_date_period_entity_resolution(self, resolution_result: DateTimeResolutionResult) -> DateTimeResolutionResult: + if not self.is_empty(): + resolution_result.timex = TimexUtil.set_timex_with_context(resolution_result.timex, self) + resolution_result.future_value = self.__set_date_range_with_context(resolution_result.future_value) + resolution_result.past_value = self.__set_date_range_with_context(resolution_result.past_value) + return resolution_result + + def is_empty(self) -> bool: + return self.year == Constants.INVALID_YEAR + + def __set_date_with_context(self, original_date, year=-1) -> datetime: + if not DateUtils.is_valid_datetime(original_date): + return original_date + value = DateUtils.safe_create_from_min_value(year=self.year if year == -1 else year, month=original_date.month, day=original_date.day) + return value + + def __set_date_range_with_context(self, original_date_range): + start_date = self.__set_date_with_context(original_date_range[0]) + end_date = self.__set_date_with_context(original_date_range[1]) + result = { + TimeTypeConstants.START_DATE: start_date, + TimeTypeConstants.END_DATE: end_date + } + + return result + + # This method is to ensure the year of begin date is same with the end date in no year situation. + def sync_year(self, pr1, pr2): + if self.is_empty(): + if DateUtils.is_Feb_29th_datetime(pr1.value.future_value): + future_year = pr1.value.future_value.year + past_year = pr1.value.past_value.year + pr2.value = self.sync_year_resolution(pr2.value, future_year, past_year) + elif DateUtils.is_Feb_29th_datetime(pr2.value.future_value): + future_year = pr2.value.future_value.year + past_year = pr2.value.past_value.year + pr1.value = self.sync_year_resolution(pr1.value, future_year, past_year) + return pr1, pr2 + + def sync_year_resolution(self, resolution_result, future_year, past_year): + resolution_result.future_value = self.__set_date_with_context(resolution_result.future_value, future_year) + resolution_result.past_value = self.__set_date_with_context(resolution_result.past_value, past_year) + return resolution_result \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/date_utils.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/date_utils.py new file mode 100644 index 0000000000..e4f48557e5 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/date_utils.py @@ -0,0 +1,203 @@ +from enum import IntEnum +from datetime import datetime, timedelta +import calendar + +from datedelta import datedelta + +from recognizers_date_time.date_time.constants import Constants + + +class DayOfWeek(IntEnum): + MONDAY = 1 + TUESDAY = 2 + WEDNESDAY = 3 + THURSDAY = 4 + FRIDAY = 5 + SATURDAY = 6 + SUNDAY = 7 + + +class DateUtils: + min_value = datetime(1, 1, 1, 0, 0, 0, 0) + + # Generate future/past date for cases without specific year like "Feb 29th" + @staticmethod + def generate_dates(no_year: bool, reference: datetime, year: int, month: int, day: int) -> list: + future_date = DateUtils.safe_create_from_min_value(year, month, day) + past_date = DateUtils.safe_create_from_min_value(year, month, day) + future_year = year + past_year = year + if no_year: + if DateUtils.is_Feb_29th(year, month, day): + if DateUtils.is_leap_year(year): + if future_date < reference: + future_date = DateUtils.safe_create_from_min_value(future_year + 4, month, day) + else: + past_date = DateUtils.safe_create_from_min_value(past_year - 4, month, day) + else: + past_year = past_year >> 2 << 2 + if not DateUtils.is_leap_year(past_year): + past_year -= 4 + + future_year = past_year + 4 + if not DateUtils.is_leap_year(future_year): + future_year += 4 + + future_date = DateUtils.safe_create_from_min_value(future_year, month, day) + past_date = DateUtils.safe_create_from_min_value(past_year, month, day) + else: + if future_date < reference and DateUtils.is_valid_date(year, month, day): + future_date = DateUtils.safe_create_from_min_value(year + 1, month, day) + + if past_date >= reference and DateUtils.is_valid_date(year, month, day): + past_date = DateUtils.safe_create_from_min_value(year - 1, month, day) + return [future_date, past_date] + + @staticmethod + def int_try_parse(value): + try: + return int(value), True + except ValueError: + return value, False + + @staticmethod + def safe_create_from_value(seed: datetime, year: int, month: int, day: int, + hour: int = 0, minute: int = 0, second: int = 0) -> datetime: + if DateUtils.is_valid_date(year, month, day) and DateUtils.is_valid_time(hour, minute, second): + return datetime(year, month, day, hour, minute, second) + + return seed + + @staticmethod + def safe_create_from_min_value(year: int, month: int, day: int, + hour: int = 0, minute: int = 0, second: int = 0) -> datetime: + return DateUtils.safe_create_from_value(DateUtils.min_value, year, month, day, hour, minute, second) + + @staticmethod + def safe_create_from_min_value_date_time(date: datetime, time: datetime = None) -> datetime: + return DateUtils.safe_create_from_value(DateUtils.min_value, date.year, date.month, date.day, + time.hour if time else 0, time.minute if time else 0, + time.second if time else 0) + + @staticmethod + def is_valid_date(year: int, month: int, day: int) -> bool: + try: + datetime(year, month, day) + return True + except ValueError: + return False + + @staticmethod + def is_valid_datetime(date: datetime) -> bool: + return date != DateUtils.min_value + + @staticmethod + def is_valid_time(hour: int, minute: int, second: int) -> bool: + return 0 <= hour < 24 and 0 <= minute < 60 and second >= 0 and minute < 60 + + @staticmethod + def this(from_date: datetime, day_of_week: DayOfWeek) -> datetime: + start = from_date.isoweekday() + target = day_of_week if day_of_week >= int( + DayOfWeek.MONDAY) else int(DayOfWeek.SUNDAY) + result = from_date + timedelta(days=target - start) + return result + + @staticmethod + def next(from_date: datetime, day_of_week: DayOfWeek) -> datetime: + return DateUtils.this(from_date, day_of_week) + timedelta(weeks=1) + + @staticmethod + def last(from_date: datetime, day_of_week: DayOfWeek) -> datetime: + return DateUtils.this(from_date, day_of_week) - timedelta(weeks=1) + + @staticmethod + def safe_create_date_resolve_overflow(year: int, month: int, day: int) -> datetime: + if month > 12: + year = year + month // 12 + month = month % 12 + return DateUtils.safe_create_from_min_value(year, month, day) + + @staticmethod + def total_hours(from_date: datetime, to_date: datetime) -> int: + return round((to_date - from_date).total_seconds() / 3600) + + @staticmethod + def day_of_year(seed: datetime) -> int: + return seed.timetuple().tm_yday + + @staticmethod + def last_day_of_month(year: int, month: int) -> int: + return calendar.monthrange(year, month)[1] + + @staticmethod + def week_of_year(date: datetime) -> int: + return date.isocalendar()[1] + + @staticmethod + def is_leap_year(year) -> bool: + return (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0) + + @staticmethod + def is_Feb_29th(year, month, day): + return month == 2 and day == 29 + + @staticmethod + def is_Feb_29th_datetime(date: datetime): + return date.month == 2 and date.day == 29 + + @staticmethod + def get_last_day(year: int, month: int) -> datetime: + month += 1 + + if month == 13: + year += 1 + month = 1 + first_day_of_next_month = DateUtils.safe_create_from_min_value(year, month, 1) + + return first_day_of_next_month - datedelta(days=1) + + @staticmethod + def day_of_week(day): + dayOfWeek = { + 'sunday': 0, + 'monday': 1, + 'tuesday': 2, + 'wednesday': 3, + 'thursday': 4, + 'friday': 5, + 'saturday': 6, + } + return dayOfWeek.get(day) + + @staticmethod + def get_first_thursday(year: int, month: int = Constants.INVALID_MONTH) -> datetime: + target_month = month + + if month == Constants.INVALID_MONTH: + target_month = 1 + + first_day = DateUtils.safe_create_from_min_value(year, target_month, 1) + first_thursday = DateUtils.this(first_day, DayOfWeek.THURSDAY) + + # Thursday falls into previous year or previous month + if first_thursday.month != target_month: + first_thursday = first_day + datedelta(days=Constants.WEEK_DAY_COUNT) + + return first_thursday + + @staticmethod + def get_last_thursday(year: int, month: int = Constants.INVALID_MONTH) -> datetime: + target_month = month + + if month == Constants.INVALID_MONTH: + target_month = 12 + + last_day = DateUtils.get_last_day(year, target_month) + last_thursday = DateUtils.this(last_day, DayOfWeek.THURSDAY) + + # Thursday falls into next year or next month + if last_thursday.month != target_month: + last_thursday = last_thursday - datedelta(days=Constants.WEEK_DAY_COUNT) + + return last_thursday diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_extra.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_extra.py new file mode 100644 index 0000000000..609c8722b8 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_extra.py @@ -0,0 +1,8 @@ +from typing import List, Dict, Match + + +class DateTimeExtra: + def __init__(self): + self.data_type: any = None + self.named_entity: Dict[str, List[str]] = dict() + self.match: Match = None diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_format_utils.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_format_utils.py new file mode 100644 index 0000000000..9c99c056c4 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_format_utils.py @@ -0,0 +1,180 @@ +from typing import List, Pattern, Union +from datetime import datetime +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult + + +class DateTimeFormatUtil: + HourTimeRegex = RegExpUtility.get_safe_reg_exp(r'(? str: + format_ = f'{{0:0{size}d}}' + return str.format(format_, num) + + @staticmethod + def luis_date(year: int, month: int, day: int) -> str: + if year == -1: + if month == -1: + return f'XXXX-XX-{day:02d}' + return f'XXXX-{month:02d}-{day:02d}' + return f'{year:04d}-{month:02d}-{day:02d}' + + @staticmethod + def luis_date_from_datetime(date: datetime) -> str: + return DateTimeFormatUtil.luis_date(date.year, date.month, date.day) + + @staticmethod + def luis_date_from_datetime_with_alternative(date: datetime, alternative_date: datetime = None) -> str: + year = date.year + month = date.month + day = date.day + + if alternative_date: + if alternative_date.year != year: + year = -1 + if alternative_date.month != month: + month = -1 + if alternative_date.day != day: + day = -1 + + return DateTimeFormatUtil.luis_date(year, month, day) + + @staticmethod + def luis_time(hour: int, minute: int, second: int = Constants.INVALID_SECOND) -> str: + if second == Constants.INVALID_SECOND: + return f'{hour:02d}:{minute:02d}' + else: + return f'{hour:02d}:{minute:02d}:{second:02d}' + + @staticmethod + def luis_time_from_datetime(time: datetime) -> str: + return DateTimeFormatUtil.luis_time(time.hour, time.minute, time.second) + + @staticmethod + def luis_date_time(time: datetime) -> str: + return DateTimeFormatUtil.luis_date_from_datetime(time) + 'T' + DateTimeFormatUtil.luis_time_from_datetime(time) + + @staticmethod + def luis_date_short_time(time: datetime, timex: str = None) -> str: + has_min = False if timex is None else Constants.TIME_TIMEX_CONNECTOR in timex + has_sec = False if timex is None else len(timex.split(Constants.TIME_TIMEX_CONNECTOR)) > 2 + + return DateTimeFormatUtil.luis_date_from_datetime(time) + DateTimeFormatUtil.format_short_time(time, has_min, + has_sec) + + @staticmethod + def format_short_time(time: datetime, has_min: bool = False, has_sec: bool = False) -> str: + hour = time.hour + min = time.minute if has_min or time.minute > 0 else Constants.INVALID_MINUTE + sec = time.second if has_sec or time.second > 0 else Constants.INVALID_SECOND + return DateTimeFormatUtil.short_time(hour, min, sec) + + @staticmethod + def short_time(hour: int, minute: int = Constants.INVALID_MINUTE, second: int = Constants.INVALID_SECOND) -> str: + if minute == Constants.INVALID_MINUTE and second == Constants.INVALID_SECOND: + return f'{Constants.TIME_TIMEX_PREFIX}{hour:02d}' + else: + return f'{Constants.TIME_TIMEX_PREFIX}{DateTimeFormatUtil.luis_time(hour, minute, second)}' + + @staticmethod + def luis_time_span(begin_time: datetime, end_time: datetime) -> str: + timex_builder = f'{Constants.GENERAL_PERIOD_PREFIX}{Constants.TIME_TIMEX_PREFIX}' + span = end_time - begin_time + total_days = span.days + total_seconds = span.seconds + total_hours, total_seconds = divmod(total_seconds, Constants.HOUR_SECOND_COUNT) + total_minutes, total_seconds = divmod(total_seconds, Constants.MINUTE_SECOND_COUNT) + + if total_days > 0 or total_hours > 0: + timex_builder += f'{total_days * Constants.DAY_HOUR_COUNT + total_hours}H' + if total_minutes > 0: + timex_builder += f'{total_minutes}M' + if total_seconds > 0: + timex_builder += f'{total_seconds}S' + + return str(timex_builder) + + @staticmethod + def format_date(date: datetime) -> str: + return f'{date.year:04d}-{date.month:02d}-{date.day:02d}' + + @staticmethod + def format_time(time: datetime) -> str: + return f'{time.hour:02d}:{time.minute:02d}:{time.second:02d}' + + @staticmethod + def format_date_time(date_time: datetime) -> str: + return DateTimeFormatUtil.format_date(date_time) + ' ' + DateTimeFormatUtil.format_time(date_time) + + @staticmethod + def all_str_to_pm(source: str) -> str: + matches = list(regex.finditer( + DateTimeFormatUtil.HourTimeRegex, source)) + split: List[str] = list() + last_position = 0 + + for match in matches: + if last_position != match.start(): + split.append(source[last_position:match.start()]) + + split.append(source[match.start():match.end()]) + last_position = match.end() + + if source[:last_position]: + split.append(source[last_position:]) + + for index, value in enumerate(split): + if regex.search(DateTimeFormatUtil.HourTimeRegex, value): + split[index] = DateTimeFormatUtil.to_pm(value) + + return ''.join(split) + + @staticmethod + def to_pm(source: str) -> str: + result = '' + + if source.startswith(Constants.UNIT_T): + result = Constants.UNIT_T + source = source[1:] + + split = source.split(':') + hour = int(split[0]) + hour = 0 if hour == 12 else hour + 12 + split[0] = f'{hour:02d}' + return result + ':'.join(split) + + @staticmethod + def parse_dynasty_year(year_str: str, dynasty_year_regex: Pattern, dynasty_start_year: str, + dynasty_year_map: dict, integer_extractor, number_parser): + dynasty_year_match = regex.search(dynasty_year_regex, year_str) + if dynasty_year_match and dynasty_year_match.start() == 0 and len(dynasty_year_match.group()) == len(year_str): + # handle "康熙元年" refer to https://zh.wikipedia.org/wiki/%E5%B9%B4%E5%8F%B7 + dynasty_str = RegExpUtility.get_group(dynasty_year_match, "dynasty") + bias_year_str = RegExpUtility.get_group(dynasty_year_match, "biasYear") + basic_year = dynasty_year_map[dynasty_str] + if bias_year_str == dynasty_start_year: + bias_year = 1 + else: + er = next(iter(integer_extractor.extract(bias_year_str)), None) + bias_year = int(number_parser.parse(er).value) + year = int(basic_year + bias_year - 1) + return year + return None + + @staticmethod + def resolve_end_of_day(timex_prefix: str, future_date: datetime, past_date: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + result.timex = timex_prefix + "T23:59:59" + result.future_value = future_date + result.past_value = past_date + + return result + + @staticmethod + def to_iso_week_timex(date: datetime) -> str: + year, week_num = date.isocalendar()[:2] + return f"{year}-W{week_num:02}" diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_options.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_options.py new file mode 100644 index 0000000000..21dbed3593 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_options.py @@ -0,0 +1,26 @@ +from enum import IntFlag + + +class DateTimeOptions(IntFlag): + NONE = 0 + SKIP_FROM_TO_MERGE = 1 + SPLIT_DATE_AND_TIME = 2 + CALENDAR = 4 + EXTENDED_TYPES = 8 + FAIL_FAST = 2097152 + EXPERIMENTAL_MODE = 4194304 + ENABLE_PREVIEW = 8388608 + + +class DateTimeOptionsConfiguration: + @property + def options(self): + return self._options + + @property + def dmy_date_format(self) -> bool: + return self._dmy_date_format + + def __init__(self, options=DateTimeOptions.NONE, dmy_date_format=False): + self._options = options + self._dmy_date_format = dmy_date_format diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_resolution_key.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_resolution_key.py new file mode 100644 index 0000000000..cd0dfe9d1d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_resolution_key.py @@ -0,0 +1,10 @@ +class DateTimeResolutionKey: + timex: str = "timex" + mod: str = 'Mod' + is_lunar: str = 'isLunar' + value: str = 'value' + start: str = 'start' + end: str = 'end' + list: str = 'list' + source_entity: str = 'sourceEntity' + \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_resolution_result.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_resolution_result.py new file mode 100644 index 0000000000..4c24345a9f --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_resolution_result.py @@ -0,0 +1,19 @@ +from typing import List, Dict +from recognizers_date_time.date_time.utilities import TimeZoneResolutionResult + + +class DateTimeResolutionResult: + def __init__(self): + self.success: bool = False + self.timex: str = '' + self.is_lunar: bool = False + self.mod: str = '' + self.has_range_changing_mod: bool = False + self.comment: str = '' + self.future_resolution: Dict[str, str] = dict() + self.past_resolution: Dict[str, str] = dict() + self.future_value: object = None + self.past_value: object = None + self.sub_date_time_entities: List[object] = list() + self.timezone_resolution: TimeZoneResolutionResult() + self.list: List[object] = list() diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_utility_config.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_utility_config.py new file mode 100644 index 0000000000..fbfa234c15 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/datetime_utility_config.py @@ -0,0 +1,74 @@ +from abc import ABC, abstractmethod +from typing import Pattern + + +class DateTimeUtilityConfiguration(ABC): + @property + @abstractmethod + def since_year_suffix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def date_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def range_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def ago_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def later_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def in_connector_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def range_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def am_desc_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def pm_desc__regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def am_pm_desc_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def time_unit_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def within_next_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def common_date_prefix_regex(self) -> Pattern: + raise NotImplementedError + + @property + @abstractmethod + def check_both_before_after(self) -> Pattern: + raise NotImplementedError \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/duration_parsing_util.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/duration_parsing_util.py new file mode 100644 index 0000000000..109991a8fc --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/duration_parsing_util.py @@ -0,0 +1,169 @@ +from typing import Dict, List, Pattern +from datetime import datetime, timedelta + +from regex import regex +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, RegExpUtility, TimexUtil + + +class DurationParsingUtil: + + @staticmethod + def is_time_duration_unit(uni_str: str): + + if uni_str == Constants.UNIT_H: + result = True + elif uni_str == Constants.UNIT_M: + result = True + elif uni_str == Constants.UNIT_S: + result = True + else: + result = False + + return result + + @staticmethod + def shift_date_time(timex: str, reference: datetime, future: bool) -> datetime: + + timex_unit_map = DurationParsingUtil.resolve_duration_timex(timex) + result = DurationParsingUtil.get_shift_result(timex_unit_map, reference, future) + + return result + + @staticmethod + def resolve_duration_timex(timex_str: str) -> Dict[str, float]: + result = {} + + # Resolve duration timex, such as P21DT2H (21 days 2 hours) + duration_str = timex_str.replace(Constants.GENERAL_PERIOD_PREFIX, "") + number_start = 0 + is_time = False + + # Resolve business days + if duration_str.endswith(Constants.TIMEX_BUSINESS_DAY): + try: + num_val = float(duration_str[0:-2]) + result[Constants.TIMEX_BUSINESS_DAY] = num_val + return result + except ValueError: + pass + + for idx, char in enumerate(duration_str): + if char.isalpha(): + if char == Constants.TIME_TIMEX_PREFIX: + is_time = True + else: + num_str = duration_str[number_start:idx] + try: + number = float(num_str) + src_timex_unit = duration_str[idx:idx+1] + if not is_time and src_timex_unit == Constants.TIMEX_MONTH: + src_timex_unit = Constants.TIMEX_MONTH_FULL + result[src_timex_unit] = number + except ValueError: + return {} + number_start = idx + 1 + return result + + @staticmethod + def get_shift_result(timex_unit_map: Dict[str, float], reference: datetime, future: bool) -> datetime: + result = reference + future_or_past = 1 if future else -1 + + # timexUnitMap needs to be an ordered collection because the result depends on the order of the shifts. + # For example "1 month 21 days later" produces different results depending on whether the day or month shift is applied first + # (when the reference month and the following month have different numbers of days). + for unit_str, number in timex_unit_map.items(): + if unit_str == "H": + result += timedelta(hours=number*future_or_past) + elif unit_str == "M": + result += timedelta(minutes=number*future_or_past) + elif unit_str == "S": + result += timedelta(seconds=number*future_or_past) + elif unit_str == "H": + result += timedelta(hours=number*future_or_past) + elif unit_str == Constants.TIMEX_DAY: + result += timedelta(days=number*future_or_past) + elif unit_str == Constants.TIMEX_WEEK: + result += timedelta(days=7*number * future_or_past) + elif unit_str == Constants.TIMEX_MONTH_FULL: + result.replace(month=int(number*future_or_past)) + elif unit_str == Constants.TIMEX_YEAR: + result.replace(year=int(number*future_or_past)) + elif unit_str == Constants.TIMEX_BUSINESS_DAY: + result = DurationParsingUtil.get_nth_business_day(result, int(number), future) + return result + + @staticmethod + def get_nth_business_day(start_date: datetime, n: int, is_future: bool) -> List[datetime]: + date_list = [] + date = start_date + for i in range(n): + date = DurationParsingUtil.get_next_business_day(date, is_future) + date_list.append(date) + + if not is_future: + date_list.reverse() + return date_list + + @staticmethod + def get_next_business_day(start_date: datetime, is_future: bool) -> datetime: + date_increment = 1 if is_future else -1 + date = start_date + timedelta(days=date_increment) + + # if Saturday or Sunday + while date.weekday() == 5 or date.weekday() == 6: + date += timedelta(days=date_increment) + return date + + @staticmethod + def is_date_duration(timex: str) -> bool: + resolved_timex = DurationParsingUtil.resolve_duration_timex(timex) + return len(resolved_timex) > 1 + + @staticmethod + def parse_inexact_number_with_unit(text: str, inexact_number_unit_regex: Pattern, + unit_map: Dict[str, str], unit_value_map: Dict[str, float], + is_cjk: bool = False) -> DateTimeResolutionResult: + ret = DateTimeResolutionResult() + match = RegExpUtility.get_matches(inexact_number_unit_regex, text) + if match: + # set the inexact number "few", "some" to 3 for now + if RegExpUtility.get_group(match, "NumTwoTerm"): + num_val = 2 + else: + num_val = 3 + src_unit = RegExpUtility.get_group(match, "unit") + if src_unit in unit_map: + unit_str = unit_map[src_unit] + + if num_val > 1000 and (unit_str == Constants.TIMEX_YEAR or + unit_str == Constants.TIMEX_MONTH_FULL or + unit_str == Constants.TIMEX_WEEK): + return ret + + ret.timex = TimexUtil.generate_duration_timex(num_val, unit_str, + DurationParsingUtil.is_less_than_day(unit_str)) + + # In CJK implementation unitValueMap uses the unitMap values as keys while + # in standard implementation unitMap and unitValueMap have the same keys. + if is_cjk: + unit_value = unit_value_map[unit_str] + else: + unit_value = unit_value_map[src_unit] + ret.future_value = ret.past_value = num_val * unit_value + ret.success = True + + elif RegExpUtility.get_group(match, Constants.BUSINESS_DAY_GROUP_NAME): + ret.timex = TimexUtil.generate_duration_timex(num_val, Constants.TIMEX_BUSINESS_DAY, False) + + # TODO figure out this line + ret.future_value = ret.past_value = num_val * unit_value_map[src_unit.split()] + ret.success = True + + return ret + + @staticmethod + def is_less_than_day(unit: str) -> bool: + return unit == "S" or unit == "M" or unit == "H" + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/extract_results_extension.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/extract_results_extension.py new file mode 100644 index 0000000000..1bf530355f --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/extract_results_extension.py @@ -0,0 +1,66 @@ +from typing import List, Dict, Pattern + +from regex import regex + +from recognizers_text.extractor import ExtractResult +from recognizers_text.utilities import RegExpUtility + + +class ExtractResultExtension: + @staticmethod + def is_overlap(er1: ExtractResult, er2: ExtractResult) -> bool: + return not (er1.start >= er2.start + er2.length) and not (er2.start >= er1.start + er1.length) + + @staticmethod + def is_cover(er1: ExtractResult, er2: ExtractResult) -> bool: + return (er2.start < er1.start and er2.start + er2.length >= er1.start + er1.length) or \ + (er2.start <= er1.start and er2.start+ er2.length > er1.start + er1.length) + + @staticmethod + def merge_all_tokens(results: List[ExtractResult]) -> List[ExtractResult]: + + results = sorted(filter(None, results), key=lambda x: x.start) + merged_results: List[ExtractResult] = list() + for result in results: + should_add = True + + for index, m_token in enumerate(merged_results): + if not should_add: + break + + # It is included in one of the current results + if result.start >= m_token.start and result.end <= m_token.end: + should_add = False + + # If it contains overlaps + if m_token.start < result.start < m_token.end: + should_add = False + + # It includes one of the results and should replace the included one + if result.start <= m_token.start and result.end >= m_token.end: + should_add = False + merged_results[index] = result + + if should_add: + merged_results.append(result) + + return merged_results + + @staticmethod + def filter_ambiguity(extract_results: List[ExtractResult], text: str, + ambiguity_filters_dict: Dict[Pattern, Pattern]) -> List[ExtractResult]: + if ambiguity_filters_dict: + for key, value in ambiguity_filters_dict.items(): + for er in reversed(extract_results): + + if regex.match(key, er.text): + matches = RegExpUtility.get_matches(value, text) + + if any(text.index(m) < er.start + er.length and text.index(m) + len(m) > er.start + for m in matches): + extract_results.remove(er) + + return extract_results + + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/holiday_functions.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/holiday_functions.py new file mode 100644 index 0000000000..c2e114f942 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/holiday_functions.py @@ -0,0 +1,23 @@ +from datetime import datetime, timedelta +from recognizers_date_time.date_time.utilities import DateUtils + + +class HolidayFunctions: + + @staticmethod + def calculate_holiday_by_easter(year: int, days: int = 0) -> datetime: + + month = 3 + + g = year % 19 + c = year / 100 + + h = (c - int(c / 4) - int(((8 * c) + 13) / 25) + (19 * g) + 15) % 30 + i = h - (int(h / 28) * (1 - (int(h / 28) * int(29 / (h + 1)) * int((21 - g) / 11)))) + day = i - ((year + int(year / 4) + i + 2 - c + int(c / 4)) % 7) + 28 + + if day > 31: + month += 1 + day -= 31 + + return DateUtils.safe_create_from_min_value(year, month, int(day)) + timedelta(days=days) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/matching_util.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/matching_util.py new file mode 100644 index 0000000000..1db57a427d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/matching_util.py @@ -0,0 +1,97 @@ +from typing import List, Pattern +import regex + +from recognizers_text.extractor import ExtractResult +from recognizers_text.utilities import RegExpUtility +from recognizers_text.matcher.string_matcher import MatchResult +from recognizers_date_time.resources.base_date_time import BaseDateTime + + +class MatchedIndex: + def __init__(self, matched: bool, index: int): + self.matched = matched + self.index = index + + +class MatchingUtil: + + invalid_day_number_prefix = RegExpUtility.get_safe_reg_exp( + BaseDateTime.InvalidDayNumberPrefix) + + @staticmethod + def is_invalid_day_number_prefix(prefix: str) -> bool: + return MatchingUtil.invalid_day_number_prefix.search(prefix) + + @staticmethod + def pre_process_text_remove_superfluous_words(text: str, matcher: Pattern): + superfluous_word_matches = MatchingUtil.remove_sub_matches(matcher.find(text)) + + bias = 0 + + for match in superfluous_word_matches: + text = text[match.start - bias: match.length] + + bias += match.length + + return text, superfluous_word_matches + + @staticmethod + def post_process_recover_superfluous_words(extract_results: List[ExtractResult], superfluous_word_matches, + origin_text: str): + for match in superfluous_word_matches: + for extract_result in extract_results: + + extract_result_end = extract_result.start + extract_result.length + if extract_result.start < match.start <= extract_result_end: + extract_result.length += len(match) + + if match.start <= extract_result.start: + extract_result.start += len(match) + + for extract_result in extract_results: + extract_result.text = origin_text[extract_result.start: extract_result.start + extract_result.length] + + return extract_results + + @staticmethod + def remove_sub_matches(match_results: List[MatchResult]): + match_list = list(match_results) + + match_list = (list(filter(lambda item: not any(list(filter( + lambda ritem: (ritem.start < item.start and ritem.end >= item.end) or ( + ritem.start <= item.start and ritem.end > item.end), match_list))), match_list))) + + return match_list + + @staticmethod + def get_ago_later_index(source: str, regexp: Pattern, in_suffix) -> MatchedIndex: + result = MatchedIndex(matched=False, index=-1) + trimmed_source = source.strip().lower() + match = RegExpUtility.match_begin(regexp, trimmed_source, True) if in_suffix else\ + RegExpUtility.match_end(regexp, trimmed_source, True) + + if match and match.success: + result.index = source.lower().find(match.group()) + (match.length if in_suffix else 0) + result.matched = True + + return result + + @staticmethod + def contains_ago_later_index(source: str, regexp: Pattern, in_suffix) -> bool: + return MatchingUtil.get_ago_later_index(source, regexp, in_suffix).matched + + @staticmethod + def get_term_index(source: str, regexp: Pattern) -> MatchedIndex: + result = MatchedIndex(matched=False, index=-1) + referenced_match = regex.search( + regexp, source.strip().lower().split(' ').pop()) + + if referenced_match: + result = MatchedIndex(matched=True, index=len( + source) - source.lower().rfind(referenced_match.group())) + + return result + + @staticmethod + def contains_term_index(source: str, regexp: Pattern) -> bool: + return MatchingUtil.get_term_index(source, regexp).matched \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/merged_parser_util.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/merged_parser_util.py new file mode 100644 index 0000000000..9b1b346d59 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/merged_parser_util.py @@ -0,0 +1,411 @@ +import datetime +from typing import Dict, Optional, List +from recognizers_text import ExtractResult, ResolutionKey +from recognizers_date_time.date_time.parsers import DateTimeParseResult +from recognizers_date_time.date_time import Constants +from recognizers_date_time.date_time.utilities import DateTimeFormatUtil, DateTimeOptionsConfiguration, \ + DateTimeResolutionResult, TimexUtil, DateTimeResolutionKey, DateTimeOptions, TimeTypeConstants + + +class MergedParserUtil: + parser_type_name = "datetimeV2" + @staticmethod + def is_duration_with_ago_and_later(er: ExtractResult) -> bool: + return er.meta_data and er.meta_data.is_duration_with_ago_and_later + + @staticmethod + def combined_mod(original_mod: str, new_mod: str) -> str: + combined_mod = new_mod + if original_mod and original_mod == new_mod: + combined_mod = f'{new_mod}-{original_mod}' + return combined_mod + + @staticmethod + def set_parse_result(slot: DateTimeParseResult, has_mod: bool, config: DateTimeOptionsConfiguration): + slot.value = MergedParserUtil.date_time_resolution(slot, config) + + # Change the type at last for the after or before modes + slot.type = f"{MergedParserUtil.parser_type_name}." \ + f"{MergedParserUtil.determine_datetime_type(slot.type, has_mod, config)}" + return slot + + @staticmethod + def date_time_resolution(slot: DateTimeParseResult, config: DateTimeOptionsConfiguration) -> \ + Optional[Dict[str, object]]: + if not slot: + return None + + resolutions: List[Dict[str, str]] = list() + res: Dict[str, object] = dict() + + slot_type = slot.type + timex = slot.timex_str + val: DateTimeResolutionResult = slot.value + + val_success = getattr(val, 'success', None) + + if not val or not val_success: + return None + + is_lunar = val.is_lunar + mod = val.mod + lst = [] + + # Resolve dates list for date periods + if slot.type == Constants.SYS_DATETIME_DATEPERIOD and val.list: + for o in val.list: + lst.append(DateTimeFormatUtil.luis_date_from_datetime(o)) + lst = ",".join(lst) + + # With modifier, output Type might not be the same with type in resolution result + # For example, if the resolution type is "date", with modifier the output type should be "daterange" + type_output = MergedParserUtil.determine_datetime_type(slot_type, True if mod else False, config) + source_entity = MergedParserUtil.determine_source_entity(slot_type, type_output, val.has_range_changing_mod) + comment = val.comment + + # The following should be added to res first, since ResolveAmPm requires these fields. + res[DateTimeResolutionKey.timex] = timex + res[Constants.COMMENT_KEY] = comment + res[DateTimeResolutionKey.mod] = mod + res[ResolutionKey.type] = type_output + res[DateTimeResolutionKey.is_lunar] = is_lunar + + has_time_zone = False + if hasattr(val, 'timezone_resolution'): + if slot_type == Constants.SYS_DATETIME_TIMEZONE: + # single timezone + res[Constants.RESOLVE_TIMEZONE] = { + ResolutionKey.value: val.timezone_resolution.value, + Constants.UTC_OFFSET_MINS_KEY: str(val.timezone_resolution.utc_offset_mins) + } + else: + # timezone as clarification of datetime + has_time_zone = True + res[Constants.SYS_DATETIME_TIMEZONE] = val.timezone_resolution.value + res[Constants.TIMEZONE_TEXT] = val.timezone_resolution.timezone_text + res[Constants.UTC_OFFSET_MINS_KEY] = str(val.timezone_resolution.utc_offset_mins) + + past_resolution_str = slot.value.past_resolution + future_resolution_str = slot.value.future_resolution + + if type_output == Constants.SYS_DATETIME_DATETIMEALT and len(past_resolution_str) > 0: + type_output = MergedParserUtil.determine_resolution_datetime_type(past_resolution_str) + + resolution_past = MergedParserUtil.generate_resolution(slot_type, past_resolution_str, mod) + resolution_future = MergedParserUtil.generate_resolution(slot_type, future_resolution_str, mod) + + # If past and future are same, keep only one + if resolution_future == resolution_past: + if len(resolution_past) > 0: + res[Constants.RESOLVE_KEY] = resolution_past + else: + if len(resolution_past) > 0: + res[Constants.RESOLVE_TO_PAST_KEY] = resolution_past + if len(resolution_future) > 0: + res[Constants.RESOLVE_TO_FUTURE_KEY] = resolution_future + + # If 'ampm', double our resolution accordingly + if comment and comment == Constants.COMMENT_AMPM: + if res[Constants.RESOLVE_KEY]: + res = MergedParserUtil.resolve_ampm(res, Constants.RESOLVE_KEY) + else: + res = MergedParserUtil.resolve_ampm(res, Constants.RESOLVE_TO_PAST_KEY) + res = MergedParserUtil.resolve_ampm(res, Constants.RESOLVE_TO_FUTURE_KEY) + + # If WeekOf and in CalendarMode, modify the past part of our resolution + if (config.options and DateTimeOptions.CALENDAR) != 0 and comment and comment == Constants.COMMENT_WEEK_OF: + res = MergedParserUtil.resolve_week_of(res, Constants.RESOLVE_TO_PAST_KEY) + + if comment and TimexUtil.has_double_timex(comment): + res = TimexUtil.process_double_timex(res, Constants.RESOLVE_TO_FUTURE_KEY, + Constants.RESOLVE_TO_PAST_KEY, timex) + + for p in res.values(): + if isinstance(p, dict): + value = {} + value[DateTimeResolutionKey.timex] = timex + value[DateTimeResolutionKey.mod] = mod + value[ResolutionKey.type] = type_output + value[DateTimeResolutionKey.is_lunar] = is_lunar + value[DateTimeResolutionKey.list] = lst + value[DateTimeResolutionKey.source_entity] = source_entity + + if has_time_zone: + value[Constants.SYS_DATETIME_TIMEZONE] = val.timezone_resolution.value + value[Constants.TIMEZONE_TEXT] = val.timezone_resolution.timezone_text + value[Constants.UTC_OFFSET_MINS_KEY] = str(val.timezone_resolutions.utc_offset_mins) + + value.update(p) + resolutions.append(value) + + if resolution_past and resolution_future and len(resolution_past) == 0 and len(resolution_future) == 0 \ + and not val.timezone_resolution: + not_resolved = { + DateTimeResolutionKey.timex: timex, + ResolutionKey.type: type_output, + ResolutionKey.value: "not resolved" + } + resolutions.append(not_resolved) + return {ResolutionKey.value_set: resolutions} + + @staticmethod + def determine_datetime_type(dt_type: str, has_mod: bool, config: DateTimeOptionsConfiguration) -> str: + if (config.options and DateTimeOptions.SPLIT_DATE_AND_TIME) != 0: + if dt_type == Constants.SYS_DATETIME_DATETIME: + return Constants.SYS_DATETIME_TIME + else: + if has_mod: + if dt_type == Constants.SYS_DATETIME_DATE: + return Constants.SYS_DATETIME_DATEPERIOD + if dt_type == Constants.SYS_DATETIME_TIME: + return Constants.SYS_DATETIME_TIMEPERIOD + if dt_type == Constants.SYS_DATETIME_DATETIME: + return Constants.SYS_DATETIME_DATETIMEPERIOD + return dt_type + + @staticmethod + def determine_source_entity(source_type: str, new_type: str, has_mod: bool) -> Optional[str]: + if not has_mod: + return None + if new_type != source_type: + return Constants.SYS_DATETIME_DATETIMEPOINT + if new_type == Constants.SYS_DATETIME_DATEPERIOD: + return Constants.SYS_DATETIME_DATEPERIOD + return None + + @staticmethod + def determine_resolution_datetime_type(past_resolutions: Dict[str, str]) -> str: + if list(past_resolutions.keys())[0] == TimeTypeConstants.START_DATE: + return Constants.SYS_DATETIME_DATEPERIOD + elif list(past_resolutions.keys())[0] == TimeTypeConstants.START_DATETIME: + return Constants.SYS_DATETIME_DATETIMEPERIOD + elif list(past_resolutions.keys())[0] == TimeTypeConstants.START_TIME: + return Constants.SYS_DATETIME_TIMEPERIOD + else: + return list(past_resolutions.keys())[0].lower() + + @staticmethod + def generate_resolution(dt_type: str, resolution_dict: Dict[str, str], mod: str) -> Dict[str, str]: + res: Dict[str, str] = {} + if dt_type == Constants.SYS_DATETIME_DATETIME: + res = MergedParserUtil.add_single_datetime_to_resolution(resolution_dict, + TimeTypeConstants.DATETIME, mod, res) + elif dt_type == Constants.SYS_DATETIME_TIME: + res = MergedParserUtil.add_single_datetime_to_resolution(resolution_dict, TimeTypeConstants.TIME, mod, res) + elif dt_type == Constants.SYS_DATETIME_DATE: + res = MergedParserUtil.add_single_datetime_to_resolution(resolution_dict, TimeTypeConstants.DATE, mod, res) + elif dt_type == Constants.SYS_DATETIME_DURATION: + if TimeTypeConstants.DURATION in resolution_dict: + res[ResolutionKey.value] = resolution_dict[TimeTypeConstants.DURATION] + elif dt_type == Constants.SYS_DATETIME_TIMEPERIOD: + res = MergedParserUtil.add_period_to_resolution(resolution_dict, TimeTypeConstants.START_TIME, + TimeTypeConstants.END_TIME, mod, res) + elif dt_type == Constants.SYS_DATETIME_DATEPERIOD: + res = MergedParserUtil.add_period_to_resolution(resolution_dict, TimeTypeConstants.START_DATE, + TimeTypeConstants.END_DATE, mod, res) + elif dt_type == Constants.SYS_DATETIME_DATETIMEPERIOD: + res = MergedParserUtil.add_period_to_resolution(resolution_dict, TimeTypeConstants.START_TIME, + TimeTypeConstants.END_TIME, mod, res) + elif dt_type == Constants.SYS_DATETIME_DATETIMEALT: + # for a period + if len(resolution_dict) > 2 or mod: + res = MergedParserUtil.add_alt_period_to_resolution(resolution_dict, mod, res) + else: + # Fot a datetime point + res = MergedParserUtil.add_alt_single_datetime_to_resolution(resolution_dict, mod, res) + return res + + @staticmethod + def add_single_datetime_to_resolution(resolution_dict: Dict[str, str], dt_type: str, mod: str, + res: Dict[str, str]) -> Dict[str, str]: + # If an "invalid" Date or DateTime is extracted, it should not have an assigned resolution. + # Only valid entities should pass this condition. + if dt_type in resolution_dict: + if mod: + if mod.startswith(Constants.BEFORE_MOD): + res[DateTimeResolutionKey.end] = resolution_dict[dt_type] + return res + if mod.startswith(Constants.AFTER_MOD): + res[DateTimeResolutionKey.start] = resolution_dict[dt_type] + return res + if mod.startswith(Constants.SINCE_MOD): + res[DateTimeResolutionKey.start] = resolution_dict[dt_type] + return res + if mod.startswith(Constants.UNTIL_MOD): + res[DateTimeResolutionKey.end] = resolution_dict[dt_type] + return res + res[ResolutionKey.value] = resolution_dict[dt_type] + return res + + @staticmethod + def add_period_to_resolution(resolution_dict: Dict[str, str], start_type: str, end_type: str, mod: str, + res: Dict[str, str]): + start = "" + end = "" + if start_type in resolution_dict: + start = resolution_dict[start_type] + if start == Constants.INVALID_DATE_STRING: + return res + if end_type in resolution_dict: + end = resolution_dict[end_type] + if end == Constants.INVALID_DATE_STRING: + return res + if mod: + # For the 'before' mod + # 1. Cases like "Before December", the start of the period should be the end of the new period, not the start + # (but not for cases like "Before the end of December") + # 2. Cases like "More than 3 days before today", the date point should be the end of the new period + if mod.startswith(Constants.BEFORE_MOD): + if start and end and mod.endswith(TimeTypeConstants.LATE_MOD): + res[DateTimeResolutionKey.end] = start + else: + res[DateTimeResolutionKey.end] = end + return res + # For the 'after' mod + # 1. Cases like "After January", the end of the period should be the start of the new period, not the end + # (but not for cases like "After the beginning of January") + # 2. Cases like "More than 3 days after today", the date point should be the start of the new period + if mod.startswith(Constants.AFTER_MOD): + if start and end and mod.endswith(TimeTypeConstants.EARLY_MOD): + res[DateTimeResolutionKey.start] = end + else: + res[DateTimeResolutionKey.start] = start + return res + # For the 'since' mod, the start of the period should be the start of the new period, not the end + if mod.startswith(Constants.SINCE_MOD): + res[DateTimeResolutionKey.start] = start + return res + # For the 'until' mod, the end of the period should be the end of the new period, not the start + if mod.startswith(Constants.UNTIL_MOD): + res[DateTimeResolutionKey.end] = end + return res + + return res + + if not MergedParserUtil.are_unresolved_dates(start, end): + res[DateTimeResolutionKey.start] = start + res[DateTimeResolutionKey.end] = end + # Preserving any present timex values. Useful for Holiday weekend where the timex is known during parsing. + if DateTimeResolutionKey.timex in resolution_dict: + res[DateTimeResolutionKey.timex] = resolution_dict[DateTimeResolutionKey.timex] + + return res + + @staticmethod + def are_unresolved_dates(start_date: str, end_date: str) -> bool: + if not start_date or not end_date: + return True + return False + + @staticmethod + def add_alt_period_to_resolution(resolution_dict: Dict[str, str], mod: str, res: Dict[str, str]) -> Dict[str, str]: + if TimeTypeConstants.START_DATETIME in resolution_dict or TimeTypeConstants.END_DATETIME in resolution_dict: + return MergedParserUtil.add_period_to_resolution(resolution_dict, TimeTypeConstants.START_DATETIME, + TimeTypeConstants.END_DATETIME, mod, res) + elif TimeTypeConstants.START_DATE in resolution_dict or TimeTypeConstants.END_DATE in resolution_dict: + return MergedParserUtil.add_period_to_resolution(resolution_dict, TimeTypeConstants.START_DATE, + TimeTypeConstants.END_DATE, mod, res) + elif TimeTypeConstants.START_TIME in resolution_dict or TimeTypeConstants.END_TIME in resolution_dict: + return MergedParserUtil.add_period_to_resolution(resolution_dict, TimeTypeConstants.START_TIME, + TimeTypeConstants.END_TIME, mod, res) + return res + + @staticmethod + def add_alt_single_datetime_to_resolution(resolution_dict: Dict[str, str], mod: str, + res: Dict[str, str]) -> Dict[str, str]: + if TimeTypeConstants.DATE in resolution_dict: + return MergedParserUtil.add_single_datetime_to_resolution(resolution_dict, TimeTypeConstants.DATE, mod, res) + elif TimeTypeConstants.DATETIME in resolution_dict: + return MergedParserUtil.add_single_datetime_to_resolution(resolution_dict, TimeTypeConstants.DATETIME, mod, res) + elif TimeTypeConstants.TIME in resolution_dict: + return MergedParserUtil.add_single_datetime_to_resolution(resolution_dict, TimeTypeConstants.TIME, mod, res) + return res + + @staticmethod + def resolve_ampm(resolution_dict: Dict, key_name: str) -> Dict: + if key_name in resolution_dict: + resolution: Dict[str, str] = resolution_dict[key_name] + resolution_pm: Dict[str, str] = dict() + + if DateTimeResolutionKey.timex not in resolution_dict: + return resolution_dict + timex = resolution_dict[DateTimeResolutionKey.timex] + resolution_dict.pop(key_name) + resolution_dict[key_name + 'Am'] = resolution + + if resolution_dict[ResolutionKey.type] == Constants.SYS_DATETIME_TIME: + + resolution_pm[ResolutionKey.value] = DateTimeFormatUtil.to_pm(resolution[ResolutionKey.value]) + resolution_pm[DateTimeResolutionKey.timex] = DateTimeFormatUtil.to_pm(timex) + + elif resolution_dict[ResolutionKey.type] == Constants.SYS_DATETIME_DATETIME: + split = resolution[ResolutionKey.value].split(' ') + resolution_pm[ResolutionKey.value] = split[0] + ' ' + DateTimeFormatUtil.to_pm((split[1])) + resolution_pm[DateTimeResolutionKey.timex] = DateTimeFormatUtil.all_str_to_pm(timex) + + elif resolution_dict[ResolutionKey.type] == Constants.SYS_DATETIME_TIMEPERIOD: + if DateTimeResolutionKey.start in resolution: + resolution_pm[DateTimeResolutionKey.start] = DateTimeFormatUtil.to_pm( + resolution[DateTimeResolutionKey.start]) + if DateTimeResolutionKey.end in resolution: + resolution_pm[DateTimeResolutionKey.end] = DateTimeFormatUtil.to_pm( + resolution[DateTimeResolutionKey.end]) + if DateTimeResolutionKey.value in resolution: + resolution_pm[ResolutionKey.value] = DateTimeFormatUtil.to_pm(resolution[ResolutionKey.value]) + resolution_pm[DateTimeResolutionKey.timex] = DateTimeFormatUtil.all_str_to_pm(timex) + + elif resolution_dict[ResolutionKey.type] == Constants.SYS_DATETIME_DATETIMEPERIOD: + if DateTimeResolutionKey.start in resolution: + if datetime.datetime.strptime(resolution[DateTimeResolutionKey.start], "%Y-%m-%d %H:%M:%S" + ).strftime('%Y-%m-%d %H:%M:%S'): + start = datetime.datetime.strptime(resolution[DateTimeResolutionKey.start], + "%Y-%m-%d %H:%M:%S").time() + else: + start = datetime.datetime.strptime(resolution[DateTimeResolutionKey.start], '%H') + + if start.hour == Constants.HALF_DAY_HOUR_COUNT: + start = (datetime.datetime.combine(datetime.datetime.now().date(), start) - + datetime.timedelta(hours=Constants.HALF_DAY_HOUR_COUNT)).time() + else: + start = (datetime.datetime.combine(datetime.datetime.now().date(), start) + + datetime.timedelta(hours=Constants.HALF_DAY_HOUR_COUNT)).time() + + resolution_pm[DateTimeResolutionKey.start] = DateTimeFormatUtil.format_time(start) + + if DateTimeResolutionKey.end in resolution: + if datetime.datetime.strptime(resolution[DateTimeResolutionKey.end], "%Y-%m-%d %H:%M:%S" + ).strftime('%Y-%m-%d %H:%M:%S'): + end = datetime.datetime.strptime(resolution[DateTimeResolutionKey.end], + "%Y-%m-%d %H:%M:%S").time() + else: + end = datetime.datetime.strptime(resolution[DateTimeResolutionKey.end], '%H') + + if end.hour == Constants.HALF_DAY_HOUR_COUNT: + end = (datetime.datetime.combine(datetime.datetime.now().date(), end) - + datetime.timedelta(hours=Constants.HALF_DAY_HOUR_COUNT)).time() + else: + end = (datetime.datetime.combine(datetime.datetime.now().date(), end) + + datetime.timedelta(hours=Constants.HALF_DAY_HOUR_COUNT)).time() + + resolution_pm[DateTimeResolutionKey.end] = DateTimeFormatUtil.format_time(end) + + resolution_dict[key_name + "Pm"] = resolution_pm + return resolution_dict + + @staticmethod + def resolve_week_of(resolution_dict: Dict, key_name: str) -> Dict: + if key_name in resolution_dict: + resolution: Dict[str, str] = resolution_dict[key_name] + + monday = datetime.datetime.strptime(resolution[DateTimeResolutionKey.start], '%A') + resolution[DateTimeResolutionKey.timex] = DateTimeFormatUtil.to_iso_week_timex(monday) + + resolution_dict.pop(key_name) + resolution_dict[key_name] = resolution + return resolution_dict + + + + + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/mod_and_date_result.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/mod_and_date_result.py new file mode 100644 index 0000000000..a6316a75f3 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/mod_and_date_result.py @@ -0,0 +1,61 @@ +import datetime +from typing import List + +from datedelta import datedelta + +from recognizers_date_time.date_time.utilities import DurationParsingUtil +from recognizers_date_time.date_time import Constants + + +class ModAndDateResult: + + def __init__(self): + self.date_list = None + self.end_date = None + self.begin_date = None + self.mod = None + + def mod_and_date_result(self, begin_date: datetime, end_date: datetime, mod: str = '', + date_list: [datetime] = None): + self.begin_date = begin_date + self.end_date = end_date + self.mod = mod + self.date_list = date_list + + def get_mod_and_date(self, begin_date: datetime, end_date: datetime, reference: datetime, timex: str, future: bool): + begin_date_result = begin_date + end_date_result = end_date + + is_business_day = timex.endswith(Constants.TIMEX_BUSINESS_DAY) + business_day_count = 0 + date_list: List[datetime] = None + + if is_business_day: + business_day_count = timex[1: len(timex) - 3] + + if future: + mod = Constants.AFTER_MOD + + # For future the beginDate should add 1 first + if is_business_day: + begin_date_result = DurationParsingUtil.get_next_business_day(reference, future) + end_date_result = DurationParsingUtil.get_nth_business_day(begin_date_result, business_day_count - 1, + future) + end_date_result = end_date_result + datedelta(days=1) + return self.mod_and_date_result(begin_date_result, end_date_result, mod, date_list) + else: + begin_date_result = reference + datedelta(days=1) + end_date_result = DurationParsingUtil.shift_date_time(timex, begin_date_result, future) + return self.mod_and_date_result(begin_date_result, end_date_result, mod, None) + else: + mod = Constants.BEFORE_MOD + + if is_business_day: + begin_date_result = DurationParsingUtil.get_nth_business_day(end_date_result, business_day_count - 1, + future) + end_date_result = DurationParsingUtil.get_next_business_day(end_date_result, future) + end_date_result = end_date_result + datedelta(days=1) + return self.mod_and_date_result(begin_date_result, end_date_result, mod, date_list) + else: + begin_date_result = DurationParsingUtil.shift_date_time(timex, end_date_result, future) + return self.mod_and_date_result(begin_date_result, end_date_result, mod, None) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/range_timex_components.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/range_timex_components.py new file mode 100644 index 0000000000..eeb8bd4b7d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/range_timex_components.py @@ -0,0 +1,6 @@ +class RangeTimexComponents: + def __init__(self): + self.begin_timex = '' + self.end_timex = '' + self.duration_timex = '' + self.is_valid = False diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/resolution_start_end.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/resolution_start_end.py new file mode 100644 index 0000000000..3cc92f6650 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/resolution_start_end.py @@ -0,0 +1,12 @@ +class ResolutionStartEnd: + def __init__(self, _start=None, _end=None): + self.start = _start + self.end = _end + + @property + def _start(self): + return self.start + + @property + def _end(self): + return self.end diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/set_handler.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/set_handler.py new file mode 100644 index 0000000000..328042f73a --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/set_handler.py @@ -0,0 +1,24 @@ +from typing import Pattern, Tuple +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, RegExpUtility, Constants + + +class SetHandler: + @staticmethod + def weekday_group_match_tuple(match: Pattern) -> Tuple[str, int]: + weekday = RegExpUtility.get_group(match, Constants.WEEKDAY_GROUP_NAME) + d = 1 + tup = (weekday, d) + return tup + + @staticmethod + def weekday_group_match_string(match: Pattern) -> str: + weekday = RegExpUtility.get_group(match, Constants.WEEKDAY_GROUP_NAME) + return weekday + + @staticmethod + def resolve_set(result: DateTimeResolutionResult, inner_timex: str) -> DateTimeResolutionResult: + result.timex = inner_timex + result.future_value = result.past_value = f"Set: {inner_timex}" + result.success = True + + return result diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_functions.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_functions.py new file mode 100644 index 0000000000..3b1cbe2e82 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_functions.py @@ -0,0 +1,167 @@ +from datetime import datetime +from typing import Dict, Pattern +import regex + +from recognizers_text import RegExpUtility +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, DateUtils, TimeResult, DateTimeExtra +from recognizers_date_time.date_time.constants import Constants + + +class TimeFunctions: + def __init__(self, number_dictionary: Dict[str,int], low_bound_desc: Dict[str, int], day_desc_regex: Pattern): + self.number_dictionary = number_dictionary + self.low_bound_desc = low_bound_desc + self.day_desc_regex = day_desc_regex + self.only_digit_match = RegExpUtility.get_safe_reg_exp('\\d+') + + def handle_less(self, extra: DateTimeExtra) -> TimeResult: + hour = self.match_to_value(next(iter(extra.named_entity['hour']), '')) + quarter = self.match_to_value( + next(iter(extra.named_entity['quarter']), '')) + has_half = next(iter(extra.named_entity['half']), '') == '' + minute = 30 if not has_half else quarter * 15 if quarter != -1 else 0 + second = self.match_to_value(next(iter(extra.named_entity['sec']), '')) + less = self.match_to_value(next(iter(extra.named_entity['min']), '')) + + _all = hour * 60 + minute - less + if _all < 0: + _all = _all + 1440 + + return TimeResult(int(_all / 60), _all % 60, second) + + def handle_kanji(self, extra: DateTimeExtra) -> TimeResult: + hour = self.match_to_value(next(iter(extra.named_entity['hour']), '')) + quarter = self.match_to_value(next(iter(extra.named_entity['quarter']), '')) + has_half = next(iter(extra.named_entity['half']), '') == '' + minute = 30 if not has_half else quarter * 15 if quarter != - \ + 1 else self.match_to_value(next(iter(extra.named_entity['min']), '')) + second = self.match_to_value(next(iter(extra.named_entity['sec']), '')) + + return TimeResult(hour, minute, second) + + def handle_digit(self, extra: DateTimeExtra) -> TimeResult: + hour = self.match_to_value(next(iter(extra.named_entity['hour']), '')) + minute = self.match_to_value(next(iter(extra.named_entity['min']), '')) + second = self.match_to_value(next(iter(extra.named_entity['sec']), '')) + + return TimeResult(hour, minute, second) + + def pack_time_result(self, extra: DateTimeExtra, time_result: TimeResult, + reference: datetime) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + # Find if there is a description + day_desc = next(iter(extra.named_entity['daydesc']), '') + no_desc = True + + if day_desc: + self.add_desc(time_result, day_desc) + no_desc = False + + # Hours > 24 (e.g. 25時 which resolves to the next day) are kept unnormalized in the timex + # to avoid ambiguity in other entities. For example, "on the 30th at 25" is resolved to + # "XXXX-XX-30T25" because with "XXXX-XX-30+1T01" it is not known if the day should be "31" or "01". + hour = self._min_with_floor(time_result.hour) + if hour == Constants.DAY_HOUR_COUNT: + hour = 0 + + minute = self._min_with_floor(time_result.minute) + second = self._min_with_floor(time_result.second) + + day = reference.day + month = reference.month + year = reference.year + + timex = 'T' + if time_result.hour >= 0: + timex = f'{timex}{hour:02d}' + if time_result.minute >= 0: + timex = f'{timex}:{minute:02d}' + if time_result.second >= 0: + if time_result.minute < 0: + timex = f'{timex}:{minute:02d}' + timex = f'{timex}:{second:02d}' + + # handle cases with time like 25時 (the hour is normalized in the past/future values) + if hour > Constants.DAY_HOUR_COUNT: + hour = time_result.hour - Constants.DAY_HOUR_COUNT + if no_desc: + result.comment = Constants.COMMENT_AM + no_desc = False + + if no_desc and hour <= Constants.HALF_DAY_HOUR_COUNT and hour > Constants.DAY_HOUR_START: + result.comment = Constants.COMMENT_AMPM + + result.future_value = DateUtils.safe_create_from_min_value( + year, month, day, hour, minute, second) + result.past_value = DateUtils.safe_create_from_min_value( + year, month, day, hour, minute, second) + result.timex = timex + result.success = True + + return result + + # Handle am/pm modifiers (e.g. "1 in the afternoon") and time of day (e.g. "mid-morning") + def add_desc(self, result: TimeResult, day_desc: str): + if not day_desc: + return + day_desc = self.normalise_day_desc(day_desc) + + if result.hour >= 0 and day_desc in self.low_bound_desc: + if result.hour < self.low_bound_desc[day_desc] or ( + result.hour == Constants.HALF_DAY_HOUR_COUNT and + self.low_bound_desc[day_desc] == Constants.DAY_HOUR_START): + # cases like "1 in the afternoon", "12 midnight" + result.hour += Constants.HALF_DAY_HOUR_COUNT + result.low_bound = self.low_bound_desc[day_desc] + + elif result.hour < 0 and day_desc in self.low_bound_desc: + # cases like "mid-morning", "mid-afternoon" + result.low_bound = self.low_bound_desc[day_desc] + result.hour = result.low_bound + else: + result.low_bound = 0 + + def get_short_left(self, text: str) -> TimeResult: + des = "" + if regex.match(self.day_desc_regex, text): + des = text[:-1] + if text: + hour = self.match_to_value(text[-1]) + else: + hour = self.match_to_value(text) + time_result = TimeResult(hour, -1, -1) + self.add_desc(time_result, des) + + return time_result + + # Normalize cases like "p.m.", "p m" to canonical form "pm" + def normalise_day_desc(self, day_desc: str): + return day_desc.replace(" ", "").replace(".", "") + + def _min_with_floor(self, source: int) -> int: + return source if source > 0 else 0 + + def match_to_value(self, text: str) -> int: + if not text.strip(): + return -1 + + if regex.match(self.only_digit_match, text): + return int(text) + + if len(text) == 1: + return self.number_dictionary[text] + + value = 1 + for index, char in enumerate(text): + if char == '十': + value = value * 10 + elif index == 0: + value = value * self.number_dictionary[char] + else: + value = value + self.number_dictionary[char] + + return value + + + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_of_day_resolution.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_of_day_resolution.py new file mode 100644 index 0000000000..46255d4da0 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_of_day_resolution.py @@ -0,0 +1,6 @@ +class TimeOfDayResolution: + def __init__(self): + self.timex: str = None + self.begin_hour: int = 0 + self.end_hour: int = 0 + self.end_min: int = 0 diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_period_functions.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_period_functions.py new file mode 100644 index 0000000000..678e37447b --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_period_functions.py @@ -0,0 +1,178 @@ +from typing import Match +from datetime import datetime, timedelta + +from recognizers_text import ExtractResult + +from ..constants import Constants +from recognizers_date_time.date_time.utilities import DateTimeResolutionResult, DateUtils, TimeFunctions, \ + DateTimeExtra, TimeResult +from recognizers_date_time.date_time.parsers import DateTimeParser +from recognizers_date_time.date_time.data_structures import PeriodType + + +class TimePeriodFunctions: + + @staticmethod + def handle(time_parser: DateTimeParser, extra: DateTimeExtra, reference: datetime, + time_func: TimeFunctions) -> DateTimeResolutionResult: + result = DateTimeResolutionResult() + + # Left is a time + left_entity = next(iter(extra.named_entity.get('left', [])), '') + + # 下午四点十分到五点十分 + if extra.data_type == PeriodType.FullTime: + left_result = TimePeriodFunctions.get_parse_time_result( + left_entity, extra.match, reference, time_parser) + else: + # 下午四到五点 + left_result = time_func.get_short_left(left_entity) + + # Right is a time + right_entity = next(iter(extra.named_entity.get('right', [])), '') + right_result = TimePeriodFunctions.get_parse_time_result( + right_entity, extra.match, reference, time_parser) + + span_hour = right_result.hour - left_result.hour + if span_hour < 0 or (span_hour == 0 and left_result.minute > right_result.minute): + span_hour += Constants.DAY_HOUR_COUNT + + # the right side doesn't contain desc while the left side does + if right_result.low_bound == -1 and \ + left_result.low_bound != -1 and \ + right_result.hour <= Constants.HALF_DAY_HOUR_COUNT and \ + span_hour > Constants.HALF_DAY_HOUR_COUNT: + right_result.hour += Constants.HALF_DAY_HOUR_COUNT + + # the left side doesn't contain desc while the right side does + if left_result.low_bound == -1 and \ + right_result.low_bound != -1 and \ + left_result.hour <= Constants.HALF_DAY_HOUR_COUNT and \ + span_hour > Constants.HALF_DAY_HOUR_COUNT: + left_result.hour += Constants.HALF_DAY_HOUR_COUNT + + # No 'am' or 'pm' indicator + if left_result.low_bound == right_result.low_bound == -1 and \ + left_result.hour <= Constants.HALF_DAY_HOUR_COUNT and \ + right_result.hour <= Constants.HALF_DAY_HOUR_COUNT: + + if span_hour > Constants.HALF_DAY_HOUR_COUNT: + if left_result.hour > right_result.hour: + if left_result.hour == Constants.HALF_DAY_HOUR_COUNT: + left_result.hour -= Constants.HALF_DAY_HOUR_COUNT + else: + right_result.hour += Constants.HALF_DAY_HOUR_COUNT + result.comment = Constants.COMMENT_AMPM + + day = reference.day + month = reference.month + year = reference.year + right_swift_day = 0 + left_swift_day = 0 + + # determine if the left side time is smaller than the right side, if yes, add one day + hour = left_result.hour if left_result.hour > 0 else 0 + minute = left_result.minute if left_result.minute > 0 else 0 + second = left_result.second if left_result.second > 0 else 0 + + # handle cases with time like 25時 which resolve to the next day + if hour > Constants.DAY_HOUR_COUNT: + hour -= Constants.DAY_HOUR_COUNT + left_swift_day += 1 + + left_time = DateUtils.safe_create_from_min_value(year, month, day, hour, minute, second) + + hour = right_result.hour if right_result.hour > 0 else 0 + minute = right_result.minute if right_result.minute > 0 else 0 + second = right_result.second if right_result.second > 0 else 0 + + # handle cases with time like 25時 which resolve to the next day + if hour > Constants.DAY_HOUR_COUNT: + hour -= Constants.DAY_HOUR_COUNT + right_swift_day += 1 + + right_time = DateUtils.safe_create_from_min_value(reference.year, reference.month, reference.day, + hour, minute, second) + + if right_result.hour < left_result.hour: + right_time += timedelta(days=1) + + left_timex = TimePeriodFunctions.build_timex(left_result) + right_timex = TimePeriodFunctions.build_timex(right_result) + span_timex = TimePeriodFunctions.build_span(left_result, right_result) + + result.timex = f'({left_timex},{right_timex},{span_timex})' + + right_time += timedelta(days=right_swift_day) + left_time += timedelta(days=left_swift_day) + + result.future_value = [left_time, right_time] + result.past_value = [left_time, right_time] + result.success = True + + return result + + @staticmethod + def build_timex(time_result: TimeResult) -> str: + timex = 'T' + if time_result.hour >= 0: + timex = f'{timex}{time_result.hour:02d}' + if time_result.minute >= 0: + timex = f'{timex}:{time_result.minute:02d}' + if time_result.second >= 0: + timex = f'{timex}:{time_result.second:02d}' + + return timex + + @staticmethod + def build_span(left: TimeResult, right: TimeResult) -> str: + left = TimePeriodFunctions.sanitize_time_result(left) + right = TimePeriodFunctions.sanitize_time_result(right) + + span_hour = right.hour - left.hour + span_min = right.minute - left.minute + span_sec = right.second - left.second + + if span_sec < 0: + span_sec += 60 + span_min -= 1 + + if span_min < 0: + span_min += 60 + span_hour -= 1 + + if span_hour < 0: + span_hour += 24 + + span_timex = f'PT' + if span_hour > 0: + span_timex += f'{span_hour}H' + if span_min > 0: + span_timex += f'{span_min}M' + if span_sec > 0: + span_timex += f'{span_sec}S' + + return span_timex + + @staticmethod + def sanitize_time_result(source: TimeResult) -> TimeResult: + return TimeResult( + source.hour, + 0 if source.minute == -1 else source.minute, + 0 if source.second == -1 else source.second) + + @staticmethod + def get_parse_time_result(entity: str, match: Match, reference: datetime, + time_parser: DateTimeParser) -> TimeResult: + match_str: str = match.group() + + extract_result = ExtractResult() + extract_result.start = match.start() + match_str.find(entity) + extract_result.length = len(entity) + extract_result.text = entity + extract_result.type = Constants.SYS_DATETIME_TIME + + result = time_parser.parse(extract_result, reference) + if not result: + return TimeResult(-1, -1, -1) + return result.data diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_result.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_result.py new file mode 100644 index 0000000000..ab6f859e0f --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_result.py @@ -0,0 +1,6 @@ +class TimeResult: + def __init__(self, hour: int, minute: int, second: int, low_bound: int = -1): + self.hour = hour + self.minute = minute + self.second = second + self.low_bound = low_bound diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_zone_resolution_result.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_zone_resolution_result.py new file mode 100644 index 0000000000..725c1463a4 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_zone_resolution_result.py @@ -0,0 +1,5 @@ +class TimeZoneResolutionResult: + def __init__(self): + self.value: str = '' + self.utc_offset_mins: int = 0 + self.time_zone_text: str = '' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_zone_utility.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_zone_utility.py new file mode 100644 index 0000000000..9d2d5b21cf --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/time_zone_utility.py @@ -0,0 +1,76 @@ +from typing import List + +from recognizers_text.matcher.number_with_unit_tokenizer import NumberWithUnitTokenizer +from recognizers_text.matcher.match_strategy import MatchStrategy +from recognizers_text.extractor import ExtractResult +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.utilities.datetime_options import DateTimeOptions +from recognizers_text.matcher.string_matcher import StringMatcher + + +class TimeZoneUtility: + + @staticmethod + def merge_time_zones(original_extract_results: [ExtractResult], time_zone_ers: [ExtractResult], text: str): + + for extract_result in original_extract_results: + for time_zone_er in time_zone_ers: + + begin = extract_result.start + extract_result.length + end = time_zone_er.start + + if begin < end: + gap_text = text[begin: begin + (end - begin)] + + if gap_text.isspace() or gap_text is None: + new_length = time_zone_er.start + time_zone_er.length - extract_result.start + + extract_result.text = text[extract_result.start:new_length] + extract_result.length = new_length + extract_result.data = {Constants.SYS_DATETIME_TIMEZONE, time_zone_er} + + if extract_result.overlap(time_zone_er): + extract_result.data = {Constants.SYS_DATETIME_TIMEZONE, time_zone_er} + + return original_extract_results + + @staticmethod + def should_resolve_time_zone(extract_result: ExtractResult, options): + enable_preview = (options & DateTimeOptions.ENABLE_PREVIEW) != 0 + + if not enable_preview: + return False + + has_time_zone_data = False + + if isinstance(extract_result.data, {}): + meta_data = extract_result.data + if meta_data is not None and Constants.SYS_DATETIME_TIMEZONE in meta_data.keys(): + has_time_zone_data = True + + return has_time_zone_data + + @staticmethod + def build_matcher_from_lists(*collections: List[str]) -> StringMatcher: + matcher = StringMatcher(MatchStrategy.TrieTree, NumberWithUnitTokenizer()) + + matcher_list = [] + for collection in collections: + list(map(lambda x: matcher_list.append(x.strip().lower()), collection)) + + matcher_list = TimeZoneUtility.distinct(matcher_list) + + matcher.init(matcher_list) + + return matcher + + @staticmethod + def distinct(list1): + + unique_list = [] + for x in list1: + + if x not in unique_list: + unique_list.append(x) + + return unique_list \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/timex_utility.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/timex_utility.py new file mode 100644 index 0000000000..98c1c52bf6 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/timex_utility.py @@ -0,0 +1,485 @@ +from enum import IntEnum +from typing import Dict, List, Tuple +from datetime import datetime, timedelta + +from datedelta import datedelta + +from recognizers_date_time.date_time.constants import Constants +from recognizers_date_time.date_time.utilities import TimeOfDayResolution, DateUtils, \ + DateTimeFormatUtil, RangeTimexComponents, DateTimeResolutionKey +from recognizers_date_time.date_time.data_structures import DatePeriodTimexType +from datatypes_timex_expression.timex_helpers import TimexHelpers + +date_period_timex_type_to_suffix = { + 0: Constants.TIMEX_DAY, + 1: Constants.TIMEX_WEEK, + 2: Constants.TIMEX_MONTH, + 3: Constants.TIMEX_YEAR, +} + + +class UnspecificDateTimeTerms(IntEnum): + NONE = 0, + NonSpecificYear = 1 + NonSpecificMonth = 2 + NonSpecificDay = 3 + + +class TimexUtil: + + @staticmethod + def merge_timex_alternatives(timex1: str, timex2: str) -> str: + if timex1 == timex2: + return timex1 + return f"{timex1}{Constants.COMPOSTIE_TIMEX_DELIMITER}{timex2}" + + @staticmethod + def parse_time_of_day(tod: str) -> TimeOfDayResolution: + result = TimeOfDayResolution() + + if tod == Constants.EARLY_MORNING: + result.timex = Constants.EARLY_MORNING + result.begin_hour = 4 + result.end_hour = 8 + elif tod == Constants.MORNING: + result.timex = Constants.MORNING + result.begin_hour = 8 + result.end_hour = 12 + elif tod == Constants.MID_DAY: + result.timex = Constants.MID_DAY + result.begin_hour = 11 + result.end_hour = 13 + elif tod == Constants.AFTERNOON: + result.timex = Constants.AFTERNOON + result.begin_hour = 12 + result.end_hour = 16 + elif tod == Constants.EVENING: + result.timex = Constants.EVENING + result.begin_hour = 16 + result.end_hour = 20 + elif tod == Constants.DAYTIME: + result.timex = Constants.DAYTIME + result.begin_hour = 8 + result.end_hour = 18 + elif tod == Constants.BUSINESS_HOUR: + result.timex = Constants.BUSINESS_HOUR + result.begin_hour = 8 + result.end_hour = 18 + elif tod == Constants.NIGHT: + result.timex = Constants.NIGHT + result.begin_hour = 20 + result.end_hour = 23 + result.end_min = 59 + elif tod == Constants.MEALTIME_BREAKFAST: + result.timex = Constants.MEALTIME_BREAKFAST + result.begin_hour = 8 + result.end_hour = 12 + elif tod == Constants.MEALTIME_BRUNCH: + result.timex = Constants.MEALTIME_BRUNCH + result.begin_hour = 8 + result.end_hour = 12 + elif tod == Constants.MEALTIME_LUNCH: + result.timex = Constants.MEALTIME_LUNCH + result.begin_hour = 11 + result.end_hour = 13 + elif tod == Constants.MEALTIME_DINNER: + result.timex = Constants.MEALTIME_DINNER + result.begin_hour = 16 + result.end_hour = 20 + + return result + + @staticmethod + def set_timex_with_context(timex: str, context) -> str: + result = timex.replace(Constants.TIMEX_FUZZY_YEAR, str(context.year)) + return result + + @staticmethod + def generate_date_period_timex_unit_count(begin, end, timex_type, equal_duration_length=True) -> str: + unit_count = 'XX' + + if equal_duration_length: + if timex_type == 0: + unit_count = int((end - begin).days) + + if timex_type == 1: + unit_count = int((end - begin).days / 7) + if timex_type == 2: + unit_count = int(((end.year - begin.year) * 12) + (end.month - begin.month)) + if timex_type == 3: + unit_count = int((end.year - begin.year) + ((end.month - begin.month) / 12.0)) + return str(unit_count) + + @staticmethod + def generate_date_period_timex_str(begin, end, timex_type, timex1, timex2): + boundary_valid = DateUtils.is_valid_datetime(begin) and DateUtils.is_valid_datetime(end) + unit_count = TimexUtil.generate_date_period_timex_unit_count(begin, end, timex_type) if boundary_valid else "X" + return f"({timex1},{timex2},P{unit_count}{date_period_timex_type_to_suffix[timex_type]})" + + @staticmethod + def generate_date_period_timex_with_diff(begin: datetime, end_date: datetime, duration_unit): + + diff = 0 + if duration_unit == Constants.TIMEX_WEEK: + diff = Constants.WEEK_DAY_COUNT - (Constants.WEEK_DAY_COUNT if begin.day == 0 else begin.isoweekday()) + end_date = begin + datedelta(days=diff) + + if duration_unit == Constants.TIMEX_MONTH_FULL: + end_date = DateUtils.safe_create_from_min_value(begin.year, begin.month, 1) + end_date = end_date + datedelta(months=1) - datedelta(days=1) + diff - end_date.day - begin.day + 1 + + if duration_unit == Constants.TIMEX_YEAR: + end_date = DateUtils.safe_create_from_min_value(begin.year, 12, 1) + end_date = end_date + datedelta(months=1) - datedelta(days=1) + diff = DateUtils.day_of_year(end_date) - DateUtils.day_of_year(begin) + 1 + + duration_timex = Constants.GENERAL_PERIOD_PREFIX + diff + Constants.TIMEX_DAY + + return f'({DateTimeFormatUtil.luis_date(begin.year, begin.month, begin.day)},' \ + f'{DateTimeFormatUtil.luis_date(end_date.year, end_date.month, end_date.day)},{duration_timex})' + + @staticmethod + def generate_date_period_timex(begin: datetime, end: datetime, timex_type: DatePeriodTimexType, + alternative_begin: datetime = None, + alternative_end: datetime = None, has_year: bool = True, + has_month: bool = True): + begin_month = begin.month + end_month = end.month + begin_day = begin.day + end_day = end.day + begin_year = begin.year + end_year = end.year + + # If the year is not specified, the combined range timex will use fuzzy years. + + if not has_year: + begin_year = -1 + end_year = -1 + + if not has_month: + begin_month = -1 + end_month = -1 + + if not has_month or not has_year: + unit_count = TimexUtil.generate_date_period_timex_unit_count(begin, end, timex_type) + + date_period_timex = f"P{unit_count}{date_period_timex_type_to_suffix[timex_type]}" + return f'({DateTimeFormatUtil.luis_date(begin_year, begin_month, begin_day)},' \ + f'{DateTimeFormatUtil.luis_date(end_year, end_month, end_day)},{date_period_timex})' + + alternative = False + if alternative_begin is None and alternative_end is None: + alternative_begin = datetime.now() + alternative_end = datetime.now() + else: + alternative = True + + equal_duration_length = (end - begin).days == (alternative_end - alternative_begin).days or \ + alternative == False + + unit_count = TimexUtil.generate_date_period_timex_unit_count(begin, end, timex_type, equal_duration_length) + date_period_timex = f'P{unit_count}{date_period_timex_type_to_suffix[timex_type]}' + + if alternative: + return f'({DateTimeFormatUtil.luis_date_from_datetime_with_alternative(begin, alternative_begin)},' \ + f'{DateTimeFormatUtil.luis_date_from_datetime_with_alternative(end, alternative_end)},' \ + f'{date_period_timex})' + else: + return f'({DateTimeFormatUtil.luis_date(begin.year, begin.month, begin.day)},' \ + f'{DateTimeFormatUtil.luis_date(end.year, end.month, end.day)},{date_period_timex})' + + @staticmethod + def generate_date_period_timex_with_duration(begin_date: datetime, end_date: datetime, duration_timex: str): + return f'({DateTimeFormatUtil.luis_date(begin_date.year, begin_date.month, begin_date.day)},' \ + f'{DateTimeFormatUtil.luis_date(end_date.year, end_date.month, end_date.day)},{duration_timex})' + + @staticmethod + def generate_split_date_time_period_timex(date_timex: str, time_range_timex: str): + split = time_range_timex.split(Constants.TIME_TIMEX_PREFIX[0]) + timex: str = None + if len(split) == 4: + timex = split[0] + date_timex + Constants.TIME_TIMEX_PREFIX + split[1] + date_timex + \ + Constants.TIME_TIMEX_PREFIX + split[2] + Constants.TIME_TIMEX_PREFIX + split[3] + elif len(split) == 2: + timex = date_timex + time_range_timex + + return timex + + @staticmethod + def generate_relative_unit_date_time_period_timex(begin_date_time: datetime, end_date_time: datetime, + reference_time: datetime, unit_str: str, swift: int): + prefix: str = Constants.GENERAL_PERIOD_PREFIX + Constants.TIME_TIMEX_PREFIX + duration_timex = '' + if unit_str == Constants.TIMEX_DAY: + end_date_time = DateUtils.safe_create_from_value(begin_date_time.year, + begin_date_time.month, + begin_date_time.day) + end_date_time = end_date_time + timedelta(days=1, seconds=-1) + duration_timex = prefix + (end_date_time - begin_date_time).total_seconds() + Constants.TIMEX_SECOND + + elif unit_str == Constants.TIMEX_HOUR: + begin_date_time = begin_date_time if swift > 0 else reference_time + timedelta(hours=swift) + end_date_time = reference_time + timedelta(hours=swift) if swift > 0 else end_date_time + duration_timex = prefix + "1" + Constants.TIMEX_HOUR + + elif unit_str == Constants.TIMEX_MINUTE: + begin_date_time = begin_date_time if swift > 0 else reference_time + timedelta(hours=swift) + end_date_time = reference_time + timedelta(hours=swift) if swift > 0 else end_date_time + duration_timex = prefix + "1" + Constants.TIMEX_MINUTE + + elif unit_str == Constants.TIMEX_SECOND: + begin_date_time = begin_date_time if swift > 0 else reference_time + timedelta(hours=swift) + end_date_time = reference_time + timedelta(hours=swift) if swift > 0 else end_date_time + duration_timex = prefix + "1" + Constants.TIMEX_SECOND + else: + return '' + + return TimexUtil.generate_date_time_period_timex(begin_date_time, end_date_time, duration_timex) + + @staticmethod + def _process_double_timex(resolution_dic: Dict[str, object], future_key: str, past_key: str, origin_timex: str): + timexes = origin_timex.split(Constants.COMPOSTIE_TIMEX_DELIMITER) + if not future_key in resolution_dic or not past_key in resolution_dic or len(timexes) != 2: + return + future_resolution = resolution_dic[future_key] + past_resolution = resolution_dic[past_key] + future_resolution[Constants.TIMEX_KEY] = timexes[0] + past_resolution[Constants.TIMEX_KEY] = timexes[1] + + @staticmethod + def _has_double_timex(comment: str): + return comment == Constants.COMMENT_DOUBLETIMEX + + @staticmethod + def is_range_timex(timex: str) -> bool: + return timex and timex.startswith("(") + + @staticmethod + def get_range_timex_components(range_timex: str) -> RangeTimexComponents: + range_timex = range_timex.replace('(', '').replace(')', '') + components = range_timex.split(',') + result = RangeTimexComponents() + if len(components) == 3: + result.begin_timex = components[0] + result.end_timex = components[1] + result.duration_timex = components[2] + result.is_valid = True + + return result + + @staticmethod + def combine_date_and_time_timex(date_timex: str, time_timex: str): + return f'{date_timex}{time_timex}' + + @staticmethod + def generate_date_time_period_timex(begin_timex: str, end_timex: str, duration_timex: str): + return f'({begin_timex},{end_timex},{duration_timex})' + + @staticmethod + def parse_number_from_duration_timex(timex: str): + number_str = timex[ + timex.index(Constants.GENERAL_PERIOD_PREFIX) + 1: + timex.index(Constants.DURATION_UNIT_CHAR - 1)] + + return float(number_str) + + @staticmethod + def generate_year_timex(date: any = None, special_year_prefixes=None): + if not date: + year_timex = Constants.TIMEX_FUZZY_YEAR + else: + if type(date) == datetime: + year_timex = f'{date.year}' + elif type(date) == int: + # For when the year is used directly + year_timex = DateTimeFormatUtil.luis_date(date, 1, 1) + + if not special_year_prefixes: + return year_timex + else: + return special_year_prefixes + year_timex + + @staticmethod + def parse_hour_from_time_timex(timex: str) -> int: + start = timex.index(Constants.TIME_TIMEX_PREFIX) + 1 + try: + end = timex.index(Constants.TIME_TIMEX_CONNECTOR) + except ValueError: + end = len(timex) + hour = int(timex[start:end - start]) + return hour + + @staticmethod + def parse_hours_from_time_period_timex(timex: str) -> Tuple[int, int]: + hour1 = 0 + hour2 = 0 + time_list = timex.split(Constants.TIMEX_SEPARATOR[0]) + if len(time_list) > 2: + hour1 = TimexUtil.parse_hour_from_time_timex(time_list[0]) + hour2 = TimexUtil.parse_hour_from_time_timex(time_list[1]) + return hour1, hour2 + + @staticmethod + def generate_date_time_timex(date_time: datetime) -> str: + return DateTimeFormatUtil.luis_date_time(date_time) + + @staticmethod + def has_double_timex(comment: str) -> bool: + return comment == Constants.COMMENT_DOUBLETIMEX + + @staticmethod + def process_double_timex(resolution_dict: Dict, future_key: str, past_key: str, origin_timex: str) -> Dict: + timexes = origin_timex.split(Constants.COMPOSTIE_TIMEX_DELIMITER) + if future_key not in resolution_dict or past_key not in resolution_dict or len(timexes) != 2: + return resolution_dict + + future_resolution = resolution_dict[future_key] + past_resolution = resolution_dict[past_key] + future_resolution[DateTimeResolutionKey.timex] = timexes[0] + past_resolution[DateTimeResolutionKey.timex] = timexes[1] + + @staticmethod + def generate_week_timex(monday=None): + if monday is None: + return f'{Constants.TIMEX_FUZZY_YEAR}{Constants.DATE_TIMEX_CONNECTOR}{Constants.TIMEX_FUZZY_WEEK}' + else: + return DateTimeFormatUtil.to_iso_week_timex(monday) + + @staticmethod + def generate_weekday_timex(weekday: int): + return f'{Constants.TIMEX_FUZZY_YEAR}{Constants.DATE_TIMEX_CONNECTOR}{Constants.TIMEX_FUZZY_WEEK}' \ + f'{Constants.DATE_TIMEX_CONNECTOR}{weekday}' + + @staticmethod + def generate_decade_timex(begin_year, total_last_year, decade, input_century) -> str: + + if input_century: + begin_str = DateTimeFormatUtil.luis_date(begin_year, 1, 1) + end_str = DateTimeFormatUtil.luis_date(begin_year + total_last_year, 1, 1) + + else: + begin_year_str = f'{Constants.TIMEX_FUZZY_TWO_DIGIT_YEAR}{decade}' + begin_str = DateTimeFormatUtil.luis_date(-1, 1, 1) + begin_str = begin_str.replace(Constants.TIMEX_FUZZY_YEAR, begin_year_str) + + end_year_str = f'{Constants.TIMEX_FUZZY_TWO_DIGIT_YEAR}{((decade + total_last_year) % 100):02d}' + end_str = DateTimeFormatUtil.luis_date(-1, 1, 1) + end_str = end_str.replace(Constants.TIMEX_FUZZY_YEAR, end_year_str) + + return f'({begin_str},{end_str},{Constants.GENERAL_PERIOD_PREFIX}{total_last_year}{Constants.TIMEX_YEAR})' + + @staticmethod + def generate_week_of_month_timex(year: int, month: int, week_num: int) -> str: + week_timex = TimexUtil.generate_week_timex(week_num) + month_timex = DateTimeFormatUtil.luis_date(year, month, 1) + + return f'{month_timex}-{week_timex}' + + @staticmethod + def generate_week_of_year_timex(year: int, week_num: int) -> str: + week_timex = TimexUtil.generate_week_timex(week_num) + year_timex = DateTimeFormatUtil.luis_date(year, 1, 1) + + return f'{year_timex}-{week_timex}' + + @staticmethod + def generate_weekend_timex(date: datetime = None): + if date is None: + return f'{Constants.TIMEX_FUZZY_YEAR}{Constants.DATE_TIMEX_CONNECTOR}{Constants.TIMEX_FUZZY_WEEK}' \ + f'{Constants.DATE_TIMEX_CONNECTOR}{Constants.TIMEX_WEEKEND}' + else: + return f'{DateTimeFormatUtil.to_iso_week_timex(date)}{Constants.DATE_TIMEX_CONNECTOR}' \ + f'{Constants.TIMEX_WEEKEND}' + + @staticmethod + def generate_month_timex(date: datetime = None): + if date is None: + return f'{Constants.TIMEX_FUZZY_YEAR}{Constants.DATE_TIMEX_CONNECTOR}{Constants.TIMEX_FUZZY_MONTH}' + else: + return f'{date.year:D4}{Constants.DATE_TIMEX_CONNECTOR}{date.month:D2}' + + @staticmethod + def generate_duration_timex(number: float, unit_str: str, is_less_than_day: bool) -> str: + if Constants.TIMEX_BUSINESS_DAY != unit_str: + if unit_str == Constants.DECADE_UNIT: + number = number * 10 + unit_str = Constants.TIMEX_YEAR + elif unit_str == Constants.FORTNIGHT_UNIT: + number = number * 2 + unit_str = Constants.TIMEX_WEEK + elif unit_str == Constants.WEEKEND_UNIT: + unit_str = Constants.TIMEX_WEEKEND + else: + unit_str = unit_str[0:1] + + if is_less_than_day: + return Constants.GENERAL_PERIOD_PREFIX + Constants.TIME_TIMEX_PREFIX + str(number) + unit_str + else: + return Constants.GENERAL_PERIOD_PREFIX + str(number) + unit_str + + @staticmethod + def generate_compound_duration_timex(unit_to_timex_components: Dict[str, str], + unit_value_map: Dict[str, str]) -> str: + unit_list: List[str] = list(unit_to_timex_components.keys()) + unit_list.sort(key=lambda x: unit_value_map[x]) + + return TimexHelpers.generate_compound_duration_timex(unit_list) + + @staticmethod + def resolve_time_of_day(tod: str) -> TimeOfDayResolution: + result = TimeOfDayResolution() + if tod == Constants.EARLY_MORNING: + result.timex = Constants.EARLY_MORNING + result.begin_hour = Constants.EARLY_MORNING_BEGIN_HOUR + result.end_hour = Constants.EARLY_MORNING_END_HOUR + elif tod == Constants.MORNING: + result.timex = Constants.MORNING + result.begin_hour = Constants.MORNING_BEGIN_HOUR + result.end_hour = Constants.MORNING_END_HOUR + elif tod == Constants.MID_DAY: + result.timex = Constants.MID_DAY + result.begin_hour = Constants.MID_DAY_BEGIN_HOUR + result.end_hour = Constants.MID_DAY_END_HOUR + elif tod == Constants.AFTERNOON: + result.timex = Constants.AFTERNOON + result.begin_hour = Constants.AFTERNOON_BEGIN_HOUR + result.end_hour = Constants.AFTERNOON_END_HOUR + elif tod == Constants.EVENING: + result.timex = Constants.EVENING + result.begin_hour = Constants.EVENING_BEGIN_HOUR + result.end_hour = Constants.EVENING_END_HOUR + elif tod == Constants.DAYTIME: + result.timex = Constants.DAYTIME + result.begin_hour = Constants.DAYTIME_BEGIN_HOUR + result.end_hour = Constants.DAYTIME_END_HOUR + elif tod == Constants.NIGHT: + result.timex = Constants.NIGHTTIME + result.begin_hour = Constants.NIGHTTIME_BEGIN_HOUR + result.end_hour = Constants.NIGHTTIME_END_HOUR + elif tod == Constants.BUSINESS_HOUR: + result.timex = Constants.BUSINESS_HOUR + result.begin_hour = Constants.BUSINESS_BEGIN_HOUR + result.end_hour = Constants.BUSINESS_END_HOUR + elif tod == Constants.NIGHT: + result.timex = Constants.NIGHT + result.begin_hour = Constants.NIGHT_BEGIN_HOUR + result.end_hour = Constants.NIGHT_END_HOUR + elif tod == Constants.MEALTIME_BREAKFAST: + result.timex = Constants.MEALTIME_BREAKFAST + result.begin_hour = Constants.MEAL_TIME_BREAKFAST_BEGIN_HOUR + result.end_hour = Constants.MEAL_TIME_BREAKFAST_END_HOUR + elif tod == Constants.MEALTIME_BRUNCH: + result.timex = Constants.MEALTIME_BRUNCH + result.begin_hour = Constants.MEAL_TIME_BRUNCH_BEGIN_HOUR + result.end_hour = Constants.MEAL_TIME_BRUNCH_END_HOUR + elif tod == Constants.MEALTIME_LUNCH: + result.timex = Constants.MEALTIME_LUNCH + result.begin_hour = Constants.MEAL_TIME_LUNCH_BEGIN_HOUR + result.end_hour = Constants.MEAL_TIME_LUNCH_END_HOUR + elif tod == Constants.MEALTIME_DINNER: + result.timex = Constants.MEALTIME_DINNER + result.begin_hour = Constants.MEAL_TIME_DINNER_BEGIN_HOUR + result.end_hour = Constants.MEAL_TIME_DINNER_END_HOUR + return result + diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/token_utils.py b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/token_utils.py new file mode 100644 index 0000000000..e0666ae818 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/date_time/utilities/token_utils.py @@ -0,0 +1,89 @@ +import regex + +from typing import List, Pattern +from recognizers_text.extractor import Metadata, ExtractResult + + +class Token: + def __init__(self, start: int, end: int, metadata: Metadata = None): + self._start: int = start + self._end: int = end + self._metadata = metadata + + @property + def length(self) -> int: + if self._start > self._end: + return 0 + return self._end - self._start + + @property + def start(self) -> int: + return self._start + + @start.setter + def start(self, value) -> int: + self._start = value + + @property + def end(self) -> int: + return self._end + + @end.setter + def end(self, value) -> int: + self._end = value + + @property + def metadata(self): + return self._metadata + + @metadata.setter + def metadata(self, value): + self._metadata = value + + +def merge_all_tokens(tokens: List[Token], source: str, extractor_name: str) -> List[ExtractResult]: + result = [] + + merged_tokens: List[Token] = list() + tokens_ = sorted(filter(None, tokens), key=lambda x: x.start) + + for token in tokens_: + add = True + + for index, m_token in enumerate(merged_tokens): + if not add: + break + + if token.start >= m_token.start and token.end <= m_token.end: + add = False + + if m_token.start < token.start < m_token.end: + add = False + + if token.start <= m_token.start and token.end >= m_token.end: + add = False + merged_tokens[index] = token + + if add: + merged_tokens.append(token) + + for token in merged_tokens: + start = token.start + length = token.length + sub_str = source[start: start + length] + + extracted_result = ExtractResult() + extracted_result.start = start + extracted_result.length = length + extracted_result.text = sub_str + extracted_result.type = extractor_name + extracted_result.data = None + extracted_result.meta_data = token.metadata + + result.append(extracted_result) + + return result + + +def get_tokens_from_regex(pattern: Pattern, source: str) -> List[Token]: + return list(map(lambda x: Token(x.start(), x.end()), regex.finditer(pattern, source))) diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/__init__.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/__init__.py index ebc1a9e158..096d126e0a 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/__init__.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/__init__.py @@ -10,3 +10,7 @@ from .italian_date_time import ItalianDateTime from .german_date_time import GermanDateTime from .english_time_zone import TimeZoneDefinitions +from .dutch_date_time import DutchDateTime +from .japanese_date_time import JapaneseDateTime +from .catalan_date_time import CatalanDateTime +from .arabic_date_time import ArabicDateTime diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/arabic_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/arabic_date_time.py new file mode 100644 index 0000000000..f14edf6869 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/arabic_date_time.py @@ -0,0 +1,796 @@ +from .base_date_time import BaseDateTime +# pylint: disable=line-too-long + + +class ArabicDateTime: + LangMarker = 'Ara' + CheckBothBeforeAfter = False + TillRegex = f'(?\\b(إلى|حتى يوم|حتى|خلال|عبر)\\b|{BaseDateTime.RangeConnectorSymbolRegex})' + RangeConnectorRegex = f'(?و|خلال|عبر|{BaseDateTime.RangeConnectorSymbolRegex})' + LastNegPrefix = f'(?القادم|التالي|الآتي|الحالي|الماضي|المقبل|الحاضر|السابق|الأخير)\\b' + StrictRelativeRegex = f'\\b(?القادم|التالي|الآتي|هذا|الحالي|الماضي|السابق|الأخير)\\b' + UpcomingPrefixRegex = f'((هذه\\s+)?(المقبل(ة)?))' + NextPrefixRegex = f'\\b(بعد|القادم(ة)?|{UpcomingPrefixRegex})\\b' + AfterNextSuffixRegex = f'\\b(after\\s+(the\\s+)?next)\\b' + PastPrefixRegex = f'((this\\s+)?past)\\b' + PreviousPrefixRegex = f'(الماضي(ة)?|السابق(ة)?)\\b' + ThisPrefixRegex = f'(هذه|الحالي(ة)?)\\b' + RangePrefixRegex = f'(من|بين)' + CenturySuffixRegex = f'(^century)\\b' + ReferencePrefixRegex = f'(ذلك|نفس|هذا)\\b' + FutureSuffixRegex = f'\\b(الحالي(ة)|القادم(ة)|في المستقبل|التالي(ة)|الآتي(ة)|المقبلين|المقبل(ة))\\b' + PastSuffixRegex = f'^\\b$' + DayRegex = f'(?(?:3[0-1]|[1-2]\\d|0?[1-9]))' + ImplicitDayRegex = f'(the\\s*)?(?(?:3[0-1]|[0-2]?\\d)(?:th|nd|rd|st))\\b' + MonthNumRegex = f'(?1[0-2]|(0)?[1-9])\\b' + WrittenOneToNineRegex = f'(?:واحد|اثنان|ثلاثة|أربعة|خمسة|ستة|سبعة|ثمانية|تسعة)' + WrittenElevenToNineteenRegex = f'(إحدى عشر|إثنى عشر|ثلاثة عشر|أربعة عشر|خمسة عشر|ستة عشر|سبعة عشر|ثمانية عشر|تسعة عشر)' + WrittenTensRegex = f'(عشر[وي]ن|ثلاث[وي]ن|أربع[وي]ن|خمس[وي]ن|ست[وي]ن|سبع[وي]ن|ثمان[وي]ن|تسع[وي]ن)' + WrittenNumRegex = f'(?:{WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}(\\s+{WrittenOneToNineRegex})?)' + WrittenCenturyFullYearRegex = f'(?(واحد|اثنان\\s*)?((,\\s+|،\\s+)?(الألفين|ألفين|ألفان|ألف))(\\s+و)?(\\s*(ثلاث|أربع|خمس|ست|سبع|ثمان|تسع)\\s*(مائة|مئتان)(\\s+و)?)?)(?({WrittenElevenToNineteenRegex})|(({WrittenOneToNineRegex})?(\\s+و\\s*)?)({WrittenTensRegex})?)?' + WrittenCenturyOrdinalYearRegex = f'(?({WrittenElevenToNineteenRegex}|مائة|مائتين)\\s+((و)\\s*)?({WrittenOneToNineRegex})\\s+(و)\\s*{WrittenTensRegex})' + CenturyRegex = f'\\b(?{WrittenCenturyFullYearRegex}|{WrittenCenturyOrdinalYearRegex}(\\s*مائة)?(\\s*و)?)\\b' + LastTwoYearNumRegex = f'(?:zero\\s+{WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}(\\s+{WrittenOneToNineRegex})?)' + FullTextYearRegex = f'(?{CenturyRegex})\\s*(?{LastTwoYearNumRegex})|(?{WrittenCenturyFullYearRegex})|{WrittenCenturyOrdinalYearRegex}' + OclockRegex = f'(?(ال)?ساعة|(ال)?ساعات)' + SpecialDescRegex = f'((?)p\\b)' + AmDescRegex = f'(في\\s)?(صباح(ا)?|صباحًا|ص|الصباح|{BaseDateTime.BaseAmDescRegex})' + PmDescRegex = f'(في\\s)?((ال)?مساء|مساءً|ليلًا|ليلا|(ال)?ليل(ة)?|بعد الظهر|الظهر|ظهرا|{BaseDateTime.BasePmDescRegex})' + AmPmDescRegex = f'({BaseDateTime.BaseAmPmDescRegex})' + DescRegex = f'(?:(?:({OclockRegex}\\s+)?(?({AmPmDescRegex}|{AmDescRegex}|{PmDescRegex}|{SpecialDescRegex})|{OclockRegex})))' + OfPrepositionRegex = f'(\\bof\\b)' + TwoDigitYearRegex = f'\\b(?([0-9]\\d))(?!(\\s*((\\:\\d)|{AmDescRegex}|{PmDescRegex}|\\.\\d)))\\b' + YearRegex = f'(?:{BaseDateTime.FourDigitYearRegex}|{FullTextYearRegex})' + WeekDayRegex = f'(?(?=يوم\\s+)?(الأحد|الإثنين|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت|أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت))' + SingleWeekDayRegex = f'(?(?=يوم\\s+)?(الأحد|الإثنين|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت|أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت))' + NextRegex = f'(?الآتي|الأخير|التالي|القادم|من الآن|الحالي|المقبل|الحاضر)' + RelativeMonthRegex = f'(?(من\\s+)?(هذا\\s+)?(الشهر|شهر)(\\s+)?({NextRegex})?)' + WrittenMonthRegex = f'(((the\\s+)?month of\\s+)?(?apr(il)?|aug(ust)?|dec(ember)?|feb(ruary)?|jan(uary)?|july?|june?|mar(ch)?|may|nov(ember)?|oct(ober)?|sept(ember)?|sept?))' + MonthSuffixRegex = f'(?(?:(in|of|on)\\s+)?({RelativeMonthRegex}|{WrittenMonthRegex}))' + DateUnitRegex = f'((?(((ال)?(يوم(ا)?|أسبوع(ا)?|شهر(ا)?|سنة|عام(ا)?|قرن|حقبة))|نهاية الأسبوع))|(?((ال)?(يومان|أسبوعان|شهران|سنتان|عامان|قرنان|حقبتان|يومين|أسبوعين|شهرين|سنتين|عامين|قرنين|حقبتين|يومان|أسبوعان|شهران|سنتان|عامان|قرنان|حقبتان|أيام|أسابيع|أشهر|سنوات|أعوام|حقبات|قرون|سنين|شهور)))|((?<=\\s+\\d{{1,4}})[ymwd]))\\b' + DateTokenPrefix = 'في ' + TimeTokenPrefix = 'عند ' + TokenBeforeDate = 'في ' + TokenBeforeTime = 'عند ' + HalfTokenRegex = f'^(النصف|نصف|والنصف|ونصف)' + QuarterTokenRegex = f'^(ربع|الربع|وربع|والربع|إلا ربع|إلا الربع)' + ThreeQuarterTokenRegex = f'^(وثلاثة أرباع|ثلاثة أرباع|إلا الربع)' + ToTokenRegex = f'\\b(إلا)' + ToHalfTokenRegex = f'\\b(إلا\\s+(النصف|نصف))$' + ForHalfTokenRegex = f'\\b(ل(s+)?(نصف))$' + FromRegex = f'\\b(from(\\s+the)?)$' + BetweenTokenRegex = f'\\b(between(\\s+the)?)$' + OrdinalNumberRegex = f'((ال)?حادي عشر|ل(ال)?ثاني عشر|(ال)?ثالث عشر|(ال)?رابع عشر|(ال)?خامس عشر|(ال)?خمسة عشر|(ال)?سادس عشر|(ال)?سابع عشر|(ال)?ثامن عشر|(ال)?تاسع عشر|(ال)?عشرون|(ال)?عشرين|(ال)?حادي والعشرون|(ال)?حادية والعشرين|(ال)?حادي والعشرين|(ال)?ثاني والعشرون|(ال)?ثانية والعشرين|(ال)?ثالث والعشرون|(ال)?رابع والعشرون|(ال)?خامس والعشرون|(ال)?سادس والعشرون|(ال)?تاسع والعشرون|(ال)?سابع والعشرون|(ال)?رابع والعشرون|الثامن|الأول|الثالث|الرابع|الخامس|السادس|الثاني|العاشر|السابع)' + SolarMonthRegex = f'(?يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)' + LunarMonthRegex = f'(?محرم|صفر|ربيع الأول|ربيع الثاني|جمادى الأول|جمادى الثاني|رجب|شعبان|رمضان|شوال|ذو القعدة|ذو الحجة)' + ArabicMonthRegex = f'(?كانون الثاني|شباط|آذار|نيسان|حزيران|تموز|آب|أيلول|تشرين الأول|تشرين الثاني|كانون الأول|أيار)' + SimpleCasePreMonthRegex = f'((بين|من)\\s+)(({DayRegex}-{DayRegex})\\s+)((من|في)\\s+)?((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\\s+)({RelativeRegex})?({YearRegex})?' + SimpleCasesRegex = f'(((من)\\s+)?(({DayRegex}|{OrdinalNumberRegex})\\s+)((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\\s+)?((حتى|إلى)\\s*)(({DayRegex}|{OrdinalNumberRegex})\\s+)((من هذا|من|هذا|في)\\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})?(\\s+({RelativeRegex}))?(\\s+{YearRegex})?)|({SimpleCasePreMonthRegex})' + MonthFrontSimpleCasesRegex = f'(((شهر\\s+)?{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\\s+(بين|من)\\s+({DayRegex}|{OrdinalNumberRegex})\\s+[و]\\s*({DayRegex}|{OrdinalNumberRegex}))|({DayRegex}\\s*[-\\./]\\s*{DayRegex}\\s+{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})' + MonthFrontBetweenRegex = f'\\b{MonthSuffixRegex}\\s+(between\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' + BetweenRegex = f'((بين|من)\\s+)(({DayRegex}|{OrdinalNumberRegex})\\s*)((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\\s+)?((حتى|إلى|و|-)\\s*)(({DayRegex}|{OrdinalNumberRegex})\\s+)((من هذا|من|هذا|في)\\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})?(\\s*([,،-])\\s*)?(\\s*({RelativeRegex}))?(\\s+{YearRegex})?' + MonthWithYear = f'((هذا\\s+)?(شهر\\s+)?({SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})[\\.]?(\\s*)[/\\\\\\-\\.,]?(\\s*(من عام|من|في|عام))?(\\s*)({YearRegex}))|(({SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\\s+(هذا\\s+)?((عام|العام)\\s+)?({RelativeRegex})?)' + SpecialYearPrefixes = f'(التقويمي(ة)?|(?المالي(ة)?|الدراسي(ة)?))' + ArabicWeekRegex = f'(?الأسبوعين|الاسبوعين|أسابيع|الاسبوع|الأسبوع|الإسبوع|أسبوعين|أسبوعي|اسبوعين|اسبوعي|أسبوع|الاسابيع|الأسابيع)' + OneWordPeriodRegex = f'((بعد|في|آخر)\\s+(\\d+\\s+)?((ال)?سنوات|(ال)?أعوام|(ال)?سنين|(ال)?أسابيع|(ال)?أشهر|(ال)?أيام))(\\s+\\d+)?(\\s+{FutureSuffixRegex})?|((هذا\\s+)?(شهر\\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})(\\s+{RelativeRegex})?)|((هذا\\s+)?((عطلة|خلال)\\s+)?((نهاية\\s+)?({ArabicWeekRegex}|العام)\\s*)((بعد\\s+)?{RelativeRegex})?)' + MonthNumWithYear = f'\\b(({BaseDateTime.FourDigitYearRegex}(\\s*)[/\\-\\.](\\s*){MonthNumRegex})|({MonthNumRegex}(\\s*)[/\\-](\\s*){BaseDateTime.FourDigitYearRegex}))\\b' + WeekOfMonthRegex = f'(\\b(?(الأسبوع)\\s+((?الأول|الثاني|الثالث|الرابع|الخامس|الأخير)\\s+)((من هذا|هذا|من)\\s+)?(شهر\\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})[,]?(\\s+{YearRegex})?)\\b)|(((الأسبوع|أسبوع)\\s+)(في\\s+)?{DayRegex}\\s+({SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex}))' + WeekOfYearRegex = f'(?(الأسبوع)\\s+(?الأول|الثاني|الثالث|الرابع|الخامس|الأخير)\\s+((من هذا|هذا|من)\\s+)?(العام|من عام|عام)\\s*({YearRegex}|{RelativeRegex})?)' + OfYearRegex = f'\\b((of|in)\\s+({YearRegex}|{StrictRelativeRegex}\\s+year))\\b' + FirstLastRegex = f'\\b(the\\s+)?((?first)|(?last))\\b' + FollowedDateUnit = f'^\\s*{DateUnitRegex}' + NumberCombinedWithDateUnit = f'\\b(?\\d+(\\.\\d*)?)(\\s)?(-)?{DateUnitRegex}' + QuarterTermRegex = f'(الربع[- ]+(?الأول|الثاني|الثالث|الرابع))' + RelativeQuarterTermRegex = f'\\b(الربع)\\s+(?{StrictRelativeRegex})\\b' + QuarterRegex = f'({YearRegex}\\s+)?({QuarterTermRegex})(((\\s+(من عام|من))?\\s+({YearRegex}))|(\\s+(هذا|من هذا|)\\s+العام))?' + QuarterRegexYearFront = f'(?:{YearRegex}|{RelativeRegex}\\s+year)(\'s)?(?:\\s*-\\s*|\\s+(the\\s+)?)?{QuarterTermRegex}' + HalfYearTermRegex = f'(?first|1st|second|2nd)\\s+half' + HalfYearFrontRegex = f'(?((1[5-9]|20)\\d{{2}})|2100)(\\s*-\\s*|\\s+(the\\s+)?)?h(?[1-2])' + HalfYearBackRegex = f'(the\\s+)?(h(?[1-2])|({HalfYearTermRegex}))(\\s+of|\\s*,\\s*)?\\s+({YearRegex})' + HalfYearRelativeRegex = f'(the\\s+)?{HalfYearTermRegex}(\\s+of|\\s*,\\s*)?\\s+({RelativeRegex}\\s+year)' + AllHalfYearRegex = f'({HalfYearFrontRegex})|({HalfYearBackRegex})|({HalfYearRelativeRegex})' + EarlyPrefixRegex = f'\\b(?بداية|مطلع|وقت مبكر|(?قبل))\\b' + MidPrefixRegex = f'\\b(?في منتصف|منتصف)\\b' + LaterPrefixRegex = f'\\b(?نهاية|باقي|بقية|أواخر|(?في وقت لاحق|لاحقا في|بعد))\\b' + PrefixPeriodRegex = f'({EarlyPrefixRegex}|{MidPrefixRegex}|{LaterPrefixRegex}|{RelativeRegex})' + PrefixDayRegex = f'\\b((?early)|(?mid(dle)?)|(?later?))(\\s+in)?(\\s+the\\s+day)?$' + SeasonDescRegex = f'(?(ال)?ربيع|(ال)?صيف|(ال)?خريف|(ال)?شتاء)' + SeasonRegex = f'\\b(?(هذا\\s+)?(منتصف\\s+)?(({SeasonDescRegex})(\\s+{PrefixPeriodRegex})?(\\s*عام\\s*)?(\\s*{YearRegex})?))\\b' + WhichWeekRegex = f'\\b(week)(\\s*)(?5[0-3]|[1-4]\\d|0?[1-9])\\b' + WeekOfRegex = f'(the\\s+)?((week)(\\s+(of|(commencing|starting|beginning)(\\s+on)?))|w/c)(\\s+the)?' + MonthOfRegex = f'(من)(\\s*)(شهر)' + MonthRegex = f'(?{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})' + DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|(?{WrittenNumRegex})\\s+days?\\s+from\\s+(?yesterday|tomorrow|tmr|today))\\b' + RelativeDayRegex = f'\\b(((the\\s+)?{RelativeRegex}\\s+day))\\b' + SetWeekDayRegex = f'\\b(?on\\s+)?(?morning|afternoon|evening|night|(sun|mon|tues|wednes|thurs|fri|satur)day)s\\b' + WeekDayOfMonthRegex = f'(?(the\\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|last)\\s+(week\\s+{MonthSuffixRegex}[\\.]?\\s+(on\\s+)?{WeekDayRegex}|{WeekDayRegex}\\s+{MonthSuffixRegex}))' + RelativeWeekDayRegex = f'\\b({WrittenNumRegex}\\s+{WeekDayRegex}\\s+(from\\s+now|later))\\b' + SpecialDate = f'(?=\\b(on|at)\\s+the\\s+){DayRegex}\\b' + DatePreposition = f'\\b(في|عند|من)' + DateExtractorYearTermRegex = f'(\\s+|\\s*,\\s*|\\s+من\\s+){DateYearRegex}' + CardinalDayRegex = f'(?=يوم\\s+)?((ال|لل|ل)?عاشر|(ال|لل|ل)?حادي(ة)? و(ال)?عشر[يو]ن|واحد و(ال)?عشر[يو]ن|(ال|لل|ل)?ثاني(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?ثالث(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?رابع(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?خامس(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?سادس(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?سابع(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?ثامن(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?تاسع(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?ثلاثين|(ال|لل|ل)?حادي(ة)? والثلاثين|(ال|لل|ل)?أول|(ال|لل|ل)?ثاني|(ال|لل|ل)?ثالث|(ال|لل|ل)?رابع|(ال|لل|ل)?خامس|(ال|لل|ل)?سادس|(ال|لل|ل)?سابع|(ال|لل|ل)?ثامن|(ال|لل|ل)?تاسع)' + DateExtractor1 = f'({CardinalDayRegex})(\\s+يوم\\s+)({WeekDayRegex})(\\s+)(في|من)(\\s+)(هذا|هذه)?(\\s+)?(الشهر|{MonthRegex})({DateExtractorYearTermRegex}\\b)?' + DateExtractor3 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*|\\s*،\\s*))?({DayRegex}|{CardinalDayRegex})[\\.]?(\\s+|\\s*,\\s*|\\s+من\\s+|\\s*-\\s*)?{MonthRegex}[\\.]?((\\s+(في|عند|عام|سنة|من عام|من سنة))?{DateExtractorYearTermRegex})?\\b' + DateExtractor4 = f'\\b{MonthNumRegex}\\s*[/\\\\\\-]\\s*{DayRegex}[\\.]?\\s*[/\\\\\\-]\\s*{DateYearRegex}' + DateExtractor5 = f'\\b{DayRegex}\\s*[/\\\\\\-\\.]\\s*({MonthNumRegex}|{MonthRegex})\\s*[/\\\\\\-\\.]\\s*{DateYearRegex}(?!\\s*[/\\\\\\-\\.]\\s*\\d+)' + DateExtractor6 = f'(?<={DatePreposition}\\s+)({StrictRelativeRegex}\\s+)?({WeekDayRegex}\\s+)?{MonthNumRegex}[\\-\\.]{DayRegex}(?![%])\\b' + DateExtractor7L = f'\\b({WeekDayRegex}\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\\b' + DateExtractor7S = f'({MonthRegex}\\s*[-\\./]\\s*{DayRegex})|(\\b({WeekDayRegex}\\s+)?{MonthNumRegex}\\s*[/\\.]\\s*{DayRegex}(?![%])\\b)' + DateExtractor8 = f'(?<={DatePreposition}\\s+)({StrictRelativeRegex}\\s+)?({WeekDayRegex}\\s+)?{DayRegex}[\\\\\\-]{MonthNumRegex}(?![%])\\b' + DateExtractor9L = f'\\b({WeekDayRegex}\\s+)?{DayRegex}\\s*/\\s*{MonthNumRegex}{DateExtractorYearTermRegex}(?![%])\\b' + DateExtractor9S = f'\\b({WeekDayRegex}\\s+)?{DayRegex}\\s*[/-]\\s*{MonthNumRegex}(?![%])\\b' + DateExtractorA = f'\\b({WeekDayRegex}\\s+)?{BaseDateTime.FourDigitYearRegex}\\s*[/\\\\\\-\\.]\\s*({MonthNumRegex}|{MonthRegex})\\s*[/\\\\\\-\\.]\\s*{DayRegex}' + OfMonth = f'^\\s*(يوم\\s+)?من\\s*{MonthRegex}' + MonthEnd = f'{MonthRegex}\\s*(في)?\\s*$' + WeekDayEnd = f'(هذا\\s+)?{WeekDayRegex}\\s*[,،]?\\s*$' + WeekDayStart = f'^[\\.]' + RangeUnitRegex = f'\\b(?years?|months?|weeks?)\\b' + HourNumRegex = f'\\b(?الأولى|(ال)?واحدة|(ال)?ثانية|(ال)?ثالثة|(ال)?رابعة|(ال)?خامسة|(ال)?سادسة|(ال)?سابعة|(ال)?ثامنة|(ال)?تاسعة|(ال)?عاشرة|(ال)?حادية عشر(ة)?|(ال)?ثانية عشر(ة)?|خمسة عشر|أحد عشر)\\b' + MinuteNumRegex = f'\\b(?أربع|خمس|ست|سبع|ثمان|تسع|عشر|عشرة|أحد عشر|إثني عشر|إثنا عشر|ثلاثة عشر|خمسة عشر|ثمانية عشر|أربعة عشر|ستة عشر|سبعة عشر|(ال)?حادية عشر(ة)?|تسعة عشر|عشرون|ثلاثون|أربعون|خمسون|عشرين|ثلاث(ين)?|أربعين|خمسين|واحد|إثنان|ثلاثة|خمسة|ثمانية)\\b' + DeltaMinuteNumRegex = f'(?عشرة|أحد عشر|اثنا عشر|ثلاثة عشر|خمسة عشر|ثمانية عشر|أربعة|ستة|سبعة|تسعة|عشرين|أربعة عشر|ستة عشر|سبعة عشر|تسعة عشر| ثلاثون|أربعون|خمسين|أربعين|خمسون|واحد|اثنان|ثلاثة|خمسة|ثمانية|ثلاث(ين)?|أربع|خمس|ست|سبع|ثمان|تسع|(ال)?واحدة|(ال)?ثانية|(ال)?ثالثة|(ال)?رابعة|(ال)?خامسة|(ال)?سادسة|(ال)?سابعة|(ال)?ثامنة|(ال)?تاسعة|(ال)?عاشرة|(ال)?حادية عشر(ة)?|(ال)?ثانية عشر(ة)?)' + PmRegex = f'(?(?:(في|حول)\\s|ل)?(وقت\\s)?(بعد الظهر|بعد الظهيرة|(ال)?مساء|مساءً|منتصف(\\s|-)الليل|الغداء|الليل|ليلا))' + PmRegexFull = f'(?(?:(في|حول)\\s|ل)?(وقت\\s)?(بعد الظهر|بعد الظهيرة|(ال)?مساء|مساءً|منتصف(\\s|-)الليل|الغداء|الليل|ليلا))' + AmRegex = f'(?(?:(في|حول)\\s|ل)?(وقت\\s)?((ال)?صباح|صباحا|صباحًا))' + LunchRegex = f'\\b(موعد الغذاء|وقت الغذاء)\\b' + NightRegex = f'\\bمنتصف(\\s|-)الليل\\b' + CommonDatePrefixRegex = f'^[\\.]' + LessThanOneHour = f'(?((ال)?ربع|ثلاثة أرباع|(ال)?نصف)|({BaseDateTime.DeltaMinuteRegex}(\\s(دقيقة|دقائق))?)|({DeltaMinuteNumRegex}(\\s(دقيقة|دقائق))?))' + WrittenTimeRegex = f'(?((ال)?ساعة\\s)?{HourNumRegex}\\s+(و(\\s)?)?({MinuteNumRegex}|{{LessThanOneHour}}|({MinuteNumRegex}\\s+(و(\\s)?)?(?عشرون|ثلاثون|أربعون|خمسون|عشرين|ثلاثين|أربعين|خمسين))))' + TimePrefix = f'(?(إلا|حتى|و|قبل)?(\\s)?{LessThanOneHour})' + TimeSuffix = f'(?{AmRegex}|{PmRegex}|{OclockRegex})' + TimeSuffixFull = f'(?{AmRegex}|{PmRegexFull}|{OclockRegex})' + BasicTime = f'\\b(?{WrittenTimeRegex}|{HourNumRegex}|({MinuteNumRegex}(\\s(دقيقة|دقائق))?)|{BaseDateTime.HourRegex}:{BaseDateTime.MinuteRegex}(:{BaseDateTime.SecondRegex})?|{BaseDateTime.HourRegex}(?![%\\d]))' + MidnightRegex = f'(?منتصف(\\s|(\\s?-\\s?))الليل)' + MidmorningRegex = f'(?منتصف(\\s|(\\s?-\\s?))الصباح)' + MidafternoonRegex = f'(?منتصف(\\s|(\\s?-\\s?))بعد الظهر)' + MiddayRegex = f'(?(وقت الغداء\\s)?(منتصف(\\s|(\\s?-\\s?)))?(النهار|(الساعة\\s)?((((12\\s)?الظهر)|(12\\s)?الظهيرة)|(12\\s)?ظهرا))(\\sوقت الغداء)?)' + MidTimeRegex = f'(?({MidnightRegex}|{MidmorningRegex}|{MidafternoonRegex}|{MiddayRegex}))' + AtRegex = f'\\b(?:(?:(?<=\\bفي\\s+)?(?:{WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}(?!\\.\\d)|{MidTimeRegex}))|{MidTimeRegex})\\b' + IshRegex = f'\\b((({BaseDateTime.HourRegex}|{WrittenTimeRegex})(\\s|-))?(وقت\\s)?((الظهيرة|الظهر|ظهر(ا|اً))))\\b' + TimeUnitRegex = f'([^A-Za-z]{{1,}}|\\b)((?((ال)?(ساعة|دقيقة|ثانية)))|(?((ال)?(ساعات|دقائق|ثوان|ساعتين|دقيقتين|ثانيتين|ساعتان|دقيقتان|ثانيتان))))\\b' + RestrictedTimeUnitRegex = f'(?(ال)?ساعة|(ال)?دقيقة)\\b' + FivesRegex = f'(?(?:fifteen|(?:twen|thir|fou?r|fif)ty(\\s*five)?|ten|five))\\b' + HourRegex = f'\\b{BaseDateTime.HourRegex}' + PeriodHourNumRegex = f'(?((واحد|اثنان|اثنين|إثنين|ثلاثة|أربعة|إثنان)?(و(\\s+)?(عشرون|عشرين)))|أحد عشر|إثني عشر|((ثلاثة|خمسة|ثمانية|أربعة|ستة|سبعة|تسعة)(عشر)?)|صفر|واحد|اثنان|إثنان|ثنان|اثنين|عشرة|الأولى|(ال)?واحدة|(ال)?ثانية|(ال)?ثالثة|(ال)?رابعة|(ال)?خامسة|(ال)?سادسة|(ال)?سابعة|(ال)?ثامنة|(ال)?تاسعة|(ال)?عاشرة|(ال)?حادية عشر(ة)?|(ال)?ثانية عشر(ة)?|خمسة عشر)' + ConnectNumRegex = f'\\b{BaseDateTime.HourRegex}(?[0-5][0-9])\\s*{DescRegex}' + TimeRegexWithDotConnector = f'({BaseDateTime.HourRegex}(\\s*\\.\\s*){BaseDateTime.MinuteRegex})' + TimeRegex1 = f'\\b({TimePrefix}\\s+)?({WrittenTimeRegex}(\\s{TimePrefix})?|{HourNumRegex}|{BaseDateTime.HourRegex})(\\s*|[.]){DescRegex}' + TimeRegex2 = f'(\\b{TimePrefix}\\s+)?(t)?{BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex}((\\s*)?:(\\s*)?{BaseDateTime.SecondRegex})?(?a)?((\\s*{DescRegex})|\\b)' + TimeRegex3 = f'(\\b{TimePrefix}\\s+)?{BaseDateTime.HourRegex}\\.{BaseDateTime.MinuteRegex}(\\s*{DescRegex})' + TimeRegex4 = f'\\b({TimePrefix}\\s+)?{BasicTime}(\\s*{DescRegex})?(\\s+{TimeSuffix})?(\\s*{DescRegex})?\\b' + TimeRegex5 = f'\\b({DescRegex}\\s)?{BasicTime}((\\s*{DescRegex})((\\s+{TimePrefix})?)|(\\s+{TimePrefix}(\\s+{TimePrefix})?))(\\s{DescRegex})?' + TimeRegex6 = f'{BasicTime}(\\s*{DescRegex})?\\s+{TimeSuffix}\\b' + TimeRegex7 = f'\\b({DescRegex}\\s)?(وقت الغداء\\s)?{TimeSuffixFull}\\s+(في\\s+)?{BasicTime}(\\s{DescRegex})?(\\sوقت الغداء)?(\\s{TimePrefix})?((\\s*{DescRegex})|\\b)?' + TimeRegex8 = f'.^' + TimeRegex9 = f'\\b{PeriodHourNumRegex}(\\s+|-){FivesRegex}((\\s*{DescRegex})|\\b)' + TimeRegex10 = f'\\b({TimePrefix}\\s+)?{BaseDateTime.HourRegex}(\\s*h\\s*){BaseDateTime.MinuteRegex}(\\s*{DescRegex})?' + TimeRegex11 = f'\\b((?:({TimeTokenPrefix})?{TimeRegexWithDotConnector}(\\s*{DescRegex}))|(?:(?:{TimeTokenPrefix}{TimeRegexWithDotConnector})(?!\\s*per\\s*cent|%)))' + FirstTimeRegexInTimeRange = f'\\b{TimeRegexWithDotConnector}(\\s*{DescRegex})?' + PureNumFromTo = f'({RangePrefixRegex}\\s+)?(الساعة\\s+)?(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|{HourRegex}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?\\s*{TillRegex}\\s*(\\s+الساعة\\s+)?(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|{HourRegex}|{PeriodHourNumRegex})(\\s+{TimePrefix})?(?\\s*({PmRegex}|{AmRegex}|{DescRegex}))?(\\s+اليوم)?' + PureNumBetweenAnd = f'(بين\\s+)(الساعة\\s+)?(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|{HourRegex}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?\\s*{RangeConnectorRegex}(\\s*)?(\\s+الساعة\\s+)?(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|{HourRegex}|{PeriodHourNumRegex})(\\s+{TimePrefix})?(?\\s*({PmRegex}|{AmRegex}|{DescRegex}))?(\\s+اليوم)?' + SpecificTimeFromTo = f'({RangePrefixRegex}\\s+)?(الساعة\\s+)?(?(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|({HourRegex}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?))\\s*{TillRegex}\\s*(\\s+الساعة\\s+)?(?(({TimeRegexWithDotConnector}(?\\s*{DescRegex}))|({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|({HourRegex}|{PeriodHourNumRegex})(\\s+{TimePrefix})?(\\s*(?{DescRegex}))?))(\\s+اليوم)?' + SpecificTimeBetweenAnd = f'(بين\\s+)(الساعة\\s+)?(?(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|({HourRegex}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?))\\s*{RangeConnectorRegex}(\\s*)?(\\s+الساعة\\s+)?(?(({TimeRegexWithDotConnector}(?\\s*{DescRegex}))|(({BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex})|{HourRegex}|{PeriodHourNumRegex})(\\s+{TimePrefix})?(\\s*(?{DescRegex}))?))(\\s+اليوم)?' + SuffixAfterRegex = f'\\b(((at)\\s)?(or|and)\\s+(above|after|later|greater)(?!\\s+than))\\b' + PrepositionRegex = f'(?^(at|on|of)(\\s+the)?$)' + LaterEarlyRegex = f'((?(\\s+|-)الباكر)|(?وقت متأخر(\\s+|-))|أواخر(\\s+|-)|وقت مبكر(\\s+|-)|أول(\\s+|-)|آخر(\\s+|-))' + MealTimeRegex = f'\\b((في|عند)\\s+)?(وقت\\s)?(?(ال)?إفطار|(ال)?فطور|(ال)?عشاء|(ال)?غذاء)\\b' + UnspecificTimePeriodRegex = f'({MealTimeRegex})' + TimeOfDayRegex = f'\\b(?((((في|عند)\\s+)?{LaterEarlyRegex}?(من\\s+)?(الصباح|بعد الظهر|الليل|المساء|الأمسيات){LaterEarlyRegex}?)|{MealTimeRegex}|(((في|عند|خلال)\\s+)?(النهار|((ساعة|ساعات)(\\s)?العمل)))))\\b' + SpecificTimeOfDayRegex = f'\\b(({StrictRelativeRegex}\\s+{TimeOfDayRegex})\\b|\\btoni(ght|te))s?\\b' + TimeFollowedUnit = f'^\\s*{TimeUnitRegex}' + TimeNumberCombinedWithUnit = f'\\b(?\\d+(\\.\\d*)?)(\\s)?(-)?{TimeUnitRegex}' + BusinessHourSplitStrings = [r'business', r'hour'] + NowRegex = f'\\b(?الآن|حالا|في هذه اللحظة|توا|على التو)\\b' + NowParseRegex = f'\\b({NowRegex}|^(date)$)\\b' + SuffixRegex = f'^\\s*(in the\\s+)?(morning|afternoon|evening|night)\\b' + NonTimeContextTokens = f'(building)' + DateTimeTimeOfDayRegex = f'\\b(?morning|(?afternoon|night|evening))\\b' + DateTimeSpecificTimeOfDayRegex = f'\\b(({RelativeRegex}\\s+{DateTimeTimeOfDayRegex})\\b|\\btoni(ght|te))\\b' + TimeOfTodayAfterRegex = f'^\\s*(,\\s*)?(in\\s+)?{DateTimeSpecificTimeOfDayRegex}' + TimeOfTodayBeforeRegex = f'{DateTimeSpecificTimeOfDayRegex}(\\s*,)?(\\s+(at|around|in|on))?\\s*$' + SimpleTimeOfTodayAfterRegex = f'(?{DateUnitRegex}|(ال)?ساعة|(ال)?ساعات|(ال)?دقيقة|(ال)?دقائق|(ال)?ثانية|(ال)?ثوان|(ال)?ليلة|(ال)?ليال)|ساعت(ين)?(ان)?|دقيقت(ين)?(ان)?|ثانيت(ين)?(ان)?|ليلت(ين)?(ان)?\\b' + SuffixAndRegex = f'(?\\s*(و)\\s+(?نصف|ربع))' + PeriodicRegex = f'\\b(?((?semi|bi|tri)(\\s*|-))?(daily|monthly|weekly|quarterly|yearly|annual(ly)?))\\b' + EachUnitRegex = f'\\b(?(each|every|any|once an?)(?\\s+other)?\\s+({DurationUnitRegex}|(?quarters?|weekends?)|{WeekDayRegex})|(?weekends))' + EachPrefixRegex = f'\\b(?(each|every|once an?)\\s*$)' + SetEachRegex = f'\\b(?(each|every)(?\\s+other)?\\s*)(?!the|that)\\b' + SetLastRegex = f'(?following|next|upcoming|this|{LastNegPrefix}last|past|previous|current)' + EachDayRegex = f'^\\s*(each|every)\\s*day\\b' + DurationFollowedUnit = f'(^\\s*{DurationUnitRegex}\\s+{SuffixAndRegex})|(^\\s*{SuffixAndRegex}?\\s+?{DurationUnitRegex})' + NumberCombinedWithDurationUnit = f'((?\\d+(\\.\\d*)?(\\s)?)?({DurationUnitRegex})(\\s{WrittenOneToNineRegex})?(\\sو)?(\\s)?(?\\d+(\\.\\d*)?(\\s)?)?(({DurationUnitRegex})?(\\s{WrittenOneToNineRegex})?)(\\sو)?(\\s)?(?\\d+(\\.\\d*)?(\\s)?)?({DurationUnitRegex})(\\s{WrittenOneToNineRegex})?)' + AnUnitRegex = f'\\b((?(1/2|½|نصف)))\\s+{DurationUnitRegex}(\\s(أخرى))?' + DuringRegex = f'\\b((((خلال|على مدى|مدة)\\s)|ل)+)(?(ال)?عام(ين)?|(ال)?سنتين|(ال)?سنة|(ال)?شهر(ين)?|الأشهر|(ال)?أسبوع(ين)?|(ال)?يوم(ين)?)\\b' + AllRegex = f'(?(طوال\\s+))?(?(ال)?عام|(ال)?سنة|(ال)?شهر|(ال)?أسبوع|(ال)?أسابيع|(ال)?أيام|(ال)?يوم)(?(\\s+كامل(ة)?))?' + HalfRegex = f'\\b((نصف)\\s+)?(?(ال)?ساعة|ساعتين|دقيقة|دقيقتين|ثانية|ثانيتين|(ال)?عام(ين)?|(ال)?سنة|(ال)?شهر(ين)?|(ال)?أسبوع(ين)?|(ال)?يوم(ين)?)(?(\\s+)?(و)?نصف)?\\b' + ConjunctionRegex = f'\\b((و(\\s+ل)?)|مع)\\b' + ArabicThisYearRegex = f'(\\s*)?(هذا|هذه)?(لعام|عام|العام|سنة)?(\\s*)?' + ArabicEidDay = f'?(يوم |عيد |ليلة | ليل)?(?=\\s*)' + HolidayList1 = f'((?=\\s*){ArabicEidDay}(إثنين الرماد|رأس السنة الهجرية|الحج|يواندان|الفطر|رأس السنة الجديدة|الأضحى|الأب|الشكر|عيد الميلاد|المولد النبوي|الفصح)(){ArabicThisYearRegex}(العام|السنة)?({YearRegex})?({RelativeRegex})?)' + HolidayList2 = f'((?=\\s*){ArabicEidDay}(الشباب|الأطفال|الفتيات|العشاق|الأرض|الافتتاح|جرذ الأرض|الحب|الذكرى|الخريف|القمر|الربيع|الفانوس)(){ArabicThisYearRegex}(العام|السنة)?({YearRegex})?({RelativeRegex})?)' + HolidayList3 = f'((?=\\s*){ArabicEidDay}(حقوق الإنسان|العالمي للأعمال الخيرية|يوم التحرير الأفريقي|حرية الصحافة العالمية|الاستقلال|الرؤساء|كل الأرواح|الشجرة|مارتن لوثر كينج| هالوين|العمال العالمي|الأم)(){ArabicThisYearRegex}(العام|السنة)?({YearRegex})?({RelativeRegex})?)' + HolidayRegex = f'({HolidayList1})|({HolidayList2})|({HolidayList3})' + AMTimeRegex = f'(?morning)' + PMTimeRegex = f'\\b(?afternoon|evening|night)\\b' + NightTimeRegex = f'(night)' + NowTimeRegex = f'(الآن|حالا|في هذه اللحظة|توا|على التو)' + RecentlyTimeRegex = f'(مؤخرًا|سابقًا)' + AsapTimeRegex = f'(في أسرع وقت ممكن)' + InclusiveModPrepositions = f'(?((on|in|at)\\s+or\\s+)|(\\s+or\\s+(on|in|at)))' + AroundRegex = f'(?:\\b(?:around|circa)\\s*?\\b)(\\s+the)?' + BeforeRegex = f'((\\b{InclusiveModPrepositions}?(?:before|in\\s+advance\\s+of|prior\\s+to|(no\\s+later|earlier|sooner)\\s+than|ending\\s+(with|on)|by|(un)?till?|(?as\\s+late\\s+as)){InclusiveModPrepositions}?\\b\\s*?)|(?)((?<\\s*=)|<))(\\s+the)?' + AfterRegex = f'((\\b{InclusiveModPrepositions}?((after|(starting|beginning)(\\s+on)?(?!\\sfrom)|(?>\\s*=)|>))(\\s+the)?' + SinceRegex = f'(?:(?:\\b(?:since|after\\s+or\\s+equal\\s+to|starting\\s+(?:from|on|with)|as\\s+early\\s+as|(any\\s+time\\s+)from)\\b\\s*?)|(?=))(\\s+the)?' + SinceRegexExp = f'({SinceRegex}|\\bfrom(\\s+the)?\\b)' + AgoRegex = f'\\b(ago|before\\s+(?yesterday|today))\\b' + LaterRegex = f'\\b(?:later(?!((\\s+in)?\\s*{OneWordPeriodRegex})|(\\s+{TimeOfDayRegex})|\\s+than\\b)|من الآن|من الان|(from|after)\\s+(?tomorrow|tmr|today))\\b' + BeforeAfterRegex = f'\\b((?before)|(?from|after))\\b' + ModPrefixRegex = f'\\b({RelativeRegex}|{AroundRegex}|{BeforeRegex}|{AfterRegex}|{SinceRegex})\\b' + ModSuffixRegex = f'\\b({AgoRegex}|{LaterRegex}|{BeforeAfterRegex}|{FutureSuffixRegex}|{PastSuffixRegex})\\b' + InConnectorRegex = f'\\b(in)\\b' + SinceYearSuffixRegex = f'(^\\s*{SinceRegex}(\\s*(the\\s+)?year\\s*)?{YearSuffix})' + WithinNextPrefixRegex = f'\\b(within(\\s+the)?(\\s+(?{NextPrefixRegex}))?)\\b' + TodayNowRegex = f'\\b(today|now)\\b' + MorningStartEndRegex = f'(^(morning|{AmDescRegex}))|((morning|{AmDescRegex})$)' + AfternoonStartEndRegex = f'(^(afternoon|{PmDescRegex}))|((afternoon|{PmDescRegex})$)' + EveningStartEndRegex = f'(^(evening))|((evening)$)' + NightStartEndRegex = f'(^(over|to)?ni(ght|te))|((over|to)?ni(ght|te)$)' + InexactNumberRegex = f'بضع(ة)?|عدة|(?((ل))?عدد(\\s+من)?)' + InexactNumberUnitRegex = f'({InexactNumberRegex})\\s+({DurationUnitRegex})|(في\\s+)?((ال)?يومين|(ال)?أيام|(ال)?أسابيع|(ال)?أشهر|(ال)?سنوات|(ال)?أعوام|(ال)?سنين)\\s+(العديدة|القليلة|الثلاثة|الأربعة|الخمسة|الستة|السبعة|الثمانية|التسعة|العشرة)' + RelativeTimeUnitRegex = f'(?:(?:(?:{NextPrefixRegex}|{PreviousPrefixRegex}|{ThisPrefixRegex})\\s+({TimeUnitRegex}))|((the|my))\\s+({RestrictedTimeUnitRegex}))' + RelativeDurationUnitRegex = f'(?:(?:(?<=({NextPrefixRegex}|{PreviousPrefixRegex}|{ThisPrefixRegex})\\s+)({DurationUnitRegex}))|((the|my))\\s+({RestrictedTimeUnitRegex}))' + ReferenceDatePeriodRegex = f'\\b{ReferencePrefixRegex}\\s+(?week|month|year|decade|weekend)\\b' + ConnectorRegex = f'^(-|,|for|t|around|@)$' + FromToRegex = f'(\\b(from).+(to|and|or)\\b.+)' + SingleAmbiguousMonthRegex = f'^(the\\s+)?(may|march)$' + SingleAmbiguousTermsRegex = f'^(the\\s+)?(day|week|month|year)$' + UnspecificDatePeriodRegex = f'^(week|month|year)$' + PrepositionSuffixRegex = f'\\b(on|in|at|around|from|to)$' + FlexibleDayRegex = f'(?([A-Za-z]+\\s)?[A-Za-z\\d]+)' + ForTheRegex = f'\\b((((?<=for\\s+)the\\s+{FlexibleDayRegex})|((?<=on\\s+)(the\\s+)?{FlexibleDayRegex}(?<=(st|nd|rd|th))))(?\\s*(,|\\.(?!\\d)|!|\\?|$)))' + WeekDayAndDayOfMonthRegex = f'\\b{WeekDayRegex}\\s+(the\\s+{FlexibleDayRegex})\\b' + WeekDayAndDayRegex = f'\\b{WeekDayRegex}\\s+(?!(the)){DayRegex}(?!([-:]|(\\s+({AmDescRegex}|{PmDescRegex}|{OclockRegex}))))\\b' + RestOfDateRegex = f'\\b(باقي|بقية)\\s+(?الشهر|العام|الأسبوع|العقد)\\b' + RestOfDateTimeRegex = f'\\b(rest|remaining)\\s+(of\\s+)?((the|my|this|current)\\s+)?(?day)\\b' + AmbiguousRangeModifierPrefix = f'(from)' + NumberEndingPattern = f'^(?:\\s+(?meeting|appointment|conference|((skype|teams|zoom|facetime)\\s+)?call)\\s+to\\s+(?{PeriodHourNumRegex}|{HourRegex})([\\.]?$|(\\.,|,|!|\\?)))' + OneOnOneRegex = f'\\b(1\\s*:\\s*1(?!\\d))|(one (on )?one|one\\s*-\\s*one|one\\s*:\\s*one)\\b' + LaterEarlyPeriodRegex = f'(\\b(({PrefixPeriodRegex})\\s*\\b\\s*(?{OneWordPeriodRegex}|(?{BaseDateTime.FourDigitYearRegex}))|({UnspecificEndOfRangeRegex}))\\b)|({PrefixPeriodRegex}\\s+(من هذا|من|هذا)\\s+(الشهر|الأسبوع|العام|الاسبوع)(\\s+{PrefixPeriodRegex})?)' + WeekWithWeekDayRangeRegex = f'\\b(?(هذا\\s+)?(الأسبوع)\\s+(({NextPrefixRegex}|{PreviousPrefixRegex})\\s+)?)(((بين)\\s+{WeekDayRegex}\\s+(و)\\s*{WeekDayRegex})|(من)\\s+{WeekDayRegex}\\s+(إلى)\\s+{WeekDayRegex})\\b' + GeneralEndingRegex = f'^\\s*((\\.,)|\\.|,|!|\\?)?\\s*$' + MiddlePauseRegex = f'\\s*(,)\\s*' + DurationConnectorRegex = f'^\\s*(?\\s+|و|،|,)\\s*$' + PrefixArticleRegex = f'\\bإلى\\s+' + OrRegex = f'\\s*((\\b|,\\s*)(or|and)\\b|,)\\s*' + SpecialYearTermsRegex = f'\\b(((ال)?سنة|(ال)?عام)(\\s+{SpecialYearPrefixes})?)' + YearPlusNumberRegex = f'\\b({SpecialYearTermsRegex}\\s*((?(\\d{{2,4}}))|{FullTextYearRegex}))\\b' + NumberAsTimeRegex = f'\\b({WrittenTimeRegex}|{PeriodHourNumRegex}|{BaseDateTime.HourRegex})\\b' + TimeBeforeAfterRegex = f'\\b(((?<=\\b(ب|((قبل|في موعد لا يتجاوز| بعد)\\s))(وقت\\s+)?)({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}|{MidTimeRegex}))|{MidTimeRegex})\\b' + DateNumberConnectorRegex = f'^\\s*(?\\s+at)\\s*$' + DecadeRegex = f'(?(ال)?عشرات|(ال)?عشرينيات|(ال)?عشرينات|(ال)?ثلاثينات|(ال)?أربعينيات|(ال)?أربعينات|(ال)?خمسينيات|(ال)?خمسينات|(ال)?ستينات|(ال)?سبعينيات|(ال)?سبعينات|(ال)?ثمانينات|(ال)?تسعينات|الألفين|ألفين)' + DecadeWithCenturyRegex = f'({DecadeRegex})((\\s+القرن(\\s+(الثماني عشر|التاسع عشر)))|(\\s+(و{DecadeRegex})))?' + RelativeDecadeRegex = f'\\b(?(الثلاثة|الأربعة|الخمسة|الستة|السبعة|الثمانية|التسعة|العشر|\\d+)\\s+)?((ال)?عقدين|(ال)?عقد|(ال)?عقود)\\s+(الماضيين|الماضية|الماضي|القادمين|القادمة|القادم)\\b' + YearPeriodRegex = f'(((من|بين)\\s+)?{YearRegex}\\s*({TillRegex}|{RangeConnectorRegex})\\s*{YearRegex})' + StrictTillRegex = f'(?\\b(to|(un)?till?|thru|through)\\b|{BaseDateTime.RangeConnectorSymbolRegex}(?!\\s*(h[1-2]|q[1-4])(?!(\\s+of|\\s*,\\s*))))' + StrictRangeConnectorRegex = f'(?\\b(and|through|to)\\b|{BaseDateTime.RangeConnectorSymbolRegex}(?!\\s*(h[1-2]|q[1-4])(?!(\\s+of|\\s*,\\s*))))' + StartMiddleEndRegex = f'\\b((?((the\\s+)?(start|beginning)\\s+of\\s+)?)(?((the\\s+)?middle\\s+of\\s+)?)(?((the\\s+)?end\\s+of\\s+)?))' + ComplexDatePeriodRegex = f'(?:((from|during|in)\\s+)?{StartMiddleEndRegex}(?.+)\\s*({StrictTillRegex})\\s*{StartMiddleEndRegex}(?.+)|((between)\\s+){StartMiddleEndRegex}(?.+)\\s*({StrictRangeConnectorRegex})\\s*{StartMiddleEndRegex}(?.+))' + FailFastRegex = f'{BaseDateTime.DeltaMinuteRegex}|\\b(?:{BaseDateTime.BaseAmDescRegex}|{BaseDateTime.BasePmDescRegex})|{BaseDateTime.BaseAmPmDescRegex}|\\b(?:zero|{WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}|{WrittenMonthRegex}|{SeasonDescRegex}|{DecadeRegex}|centur(y|ies)|weekends?|quarters?|hal(f|ves)|yesterday|to(morrow|day|night)|tmr|noonish|\\d(-|——)?ish|((the\\s+\\w*)|\\d)(th|rd|nd|st)|(mid\\s*(-\\s*)?)?(night|morning|afternoon|day)s?|evenings?||noon|lunch(time)?|dinner(time)?|(day|night)time|overnight|dawn|dusk|sunset|hours?|hrs?|h|minutes?|mins?|seconds?|secs?|eo[dmy]|mardi[ -]?gras|birthday|eve|christmas|xmas|thanksgiving|halloween|yuandan|easter|yuan dan|april fools|cinco de mayo|all (hallow|souls)|guy fawkes|(st )?patrick|hundreds?|noughties|aughts|thousands?)\\b|{WeekDayRegex}|{SetWeekDayRegex}|{NowRegex}|{PeriodicRegex}|\\b({DateUnitRegex}|{ImplicitDayRegex})' + UnitMap = dict([("قرن", "10Y"), + ("حقبة", "10Y"), + ("قرون", "10Y"), + ("حقبات", "10Y"), + ("قرنين", "20Y"), + ("قرنان", "20Y"), + ("حقبتان", "20Y"), + ("حقبتين", "20Y"), + ("سنة", "Y"), + ("العام", "Y"), + ("عام", "Y"), + ("سنوات", "Y"), + ("أعوام", "Y"), + ("عامان", "2Y"), + ("سنتان", "2Y"), + ("سنتين", "2Y"), + ("عامين", "2Y"), + ("الشهر", "MON"), + ("شهر", "MON"), + ("أشهر", "MON"), + ("شهور", "MON"), + ("شهرا", "MON"), + ("شهرين", "2MON"), + ("شهران", "2MON"), + ("quarters", "3MON"), + ("quarter", "3MON"), + ("semesters", "6MON"), + ("semestres", "6MON"), + ("semester", "6MON"), + ("semestre", "6MON"), + ("أسبوع", "W"), + ("أسابيع", "W"), + ("أسبوعا", "W"), + ("أسبوعان", "2W"), + ("أسبوعين", "2W"), + ("نهاية الأسبوع", "WE"), + ("يوم", "D"), + ("أيام", "D"), + ("يوما", "D"), + ("يومان", "2D"), + ("يومين", "2D"), + ("ليال", "D"), + ("ليلة", "D"), + ("ساعة", "H"), + ("ساعات", "H"), + ("ساعتان", "2H"), + ("ساعتين", "2H"), + ("دقيقة", "M"), + ("دقائق", "M"), + ("دقيقتان", "2M"), + ("دقيقتين", "2M"), + ("ثانية", "S"), + ("ثوان", "S"), + ("ثانيتان", "2S"), + ("ثانيتين", "2S")]) + UnitValueMap = dict([("قرن", 315360000), + ("حقبة", 315360000), + ("قرون", 315360000), + ("حقبات", 315360000), + ("قرنين", 630720000), + ("حقبتين", 630720000), + ("قرنان", 630720000), + ("حقبتان", 630720000), + ("سنة", 31536000), + ("العام", 31536000), + ("عام", 31536000), + ("سنوات", 31536000), + ("أعوام", 31536000), + ("عامان", 63072000), + ("سنتان", 63072000), + ("سنتين", 63072000), + ("عامين", 63072000), + ("الشهر", 2592000), + ("شهر", 2592000), + ("أشهر", 2592000), + ("شهور", 2592000), + ("شهرا", 2592000), + ("شهرين", 5184000), + ("شهران", 5184000), + ("نهاية الأسبوع", 172800), + ("أسبوع", 604800), + ("أسابيع", 604800), + ("أسبوعا", 604800), + ("أسبوعان", 1209600), + ("أسبوعين", 1209600), + ("يوم", 86400), + ("أيام", 86400), + ("يوما", 86400), + ("يومان", 172800), + ("يومين", 172800), + ("ليلة", 86400), + ("ليال", 86400), + ("ساعة", 3600), + ("ساعات", 3600), + ("ساعتان", 7200), + ("ساعتين", 7200), + ("دقيقة", 60), + ("دقائق", 60), + ("دقيقتان", 120), + ("دقيقتين", 120), + ("ثانية", 1), + ("ثوان", 1), + ("ثانيتان", 2), + ("ثانيتين", 2)]) + SpecialYearPrefixesMap = dict([("fiscal", "FY"), + ("school", "SY"), + ("fy", "FY"), + ("sy", "SY")]) + SeasonMap = dict([("الربيع", "SP"), + ("ربيع", "SP"), + ("الصيف", "SU"), + ("صيف", "SU"), + ("الخريف", "FA"), + ("خريف", "FA"), + ("الشتاء", "WI"), + ("شتاء", "WI")]) + SeasonValueMap = dict([("SP", 3), + ("SU", 6), + ("FA", 9), + ("WI", 12)]) + CardinalMap = dict([("الأول", 1), + ("الثاني", 2), + ("الثالث", 3), + ("الرابع", 4), + ("الخامس", 5)]) + DayOfWeek = dict([("الاثنين", 1), + ("الإثنين", 1), + ("monday", 1), + ("الثلاثاء", 2), + ("tuesday", 2), + ("الأربعاء", 3), + ("wednesday", 3), + ("الخميس", 4), + ("thursday", 4), + ("الجمعة", 5), + ("friday", 5), + ("السبت", 6), + ("saturday", 6), + ("الأحد", 0), + ("sunday", 0), + ("إثنين", 1), + ("ثلاثاء", 2), + ("أربعاء", 3), + ("خميس", 4), + ("جمعة", 5), + ("سبت", 6), + ("أحد", 0)]) + MonthOfYear = dict([("يناير", 1), + ("فبراير", 2), + ("مارس", 3), + ("أبريل", 4), + ("مايو", 5), + ("يونيو", 6), + ("يوليو", 7), + ("أغسطس", 8), + ("سبتمبر", 9), + ("أكتوبر", 10), + ("نوفمبر", 11), + ("ديسمبر", 12), + ("محرم", 1), + ("صفر", 2), + ("ربيع الأول", 3), + ("ربيع الثاني", 4), + ("جمادى الأول", 5), + ("جمادى الثاني", 6), + ("رجب", 7), + ("شعبان", 8), + ("رمضان", 9), + ("شوال", 10), + ("ذو القعدة", 11), + ("ذو الحجة", 12), + ("كانون الثاني", 1), + ("شباط", 2), + ("آذار", 3), + ("نيسان", 4), + ("أيار", 5), + ("حزيران", 6), + ("تموز", 7), + ("آب", 8), + ("أيلول", 9), + ("تشرين الأول", 10), + ("تشرين الثاني", 11), + ("كانون الأول", 12), + ("1", 1), + ("2", 2), + ("3", 3), + ("4", 4), + ("5", 5), + ("6", 6), + ("7", 7), + ("8", 8), + ("9", 9), + ("10", 10), + ("11", 11), + ("12", 12), + ("01", 1), + ("02", 2), + ("03", 3), + ("04", 4), + ("05", 5), + ("06", 6), + ("07", 7), + ("08", 8), + ("09", 9)]) + Numbers = dict([("صفر", 0), + ("واحد", 1), + ("الواحدة", 1), + ("اثنان", 2), + ("الثانية", 2), + ("ثلاثة", 3), + ("ثلاث", 3), + ("الثالثة", 3), + ("أربعة", 4), + ("الرابعة", 4), + ("خمسة", 5), + ("الخامسة", 5), + ("ستة", 6), + ("السادسة", 6), + ("سبعة", 7), + ("السابعة", 7), + ("ثمانية", 8), + ("الثامنة", 8), + ("تسعة", 9), + ("التاسعة", 9), + ("عشرة", 10), + ("العاشرة", 10), + ("أحد عشر", 11), + ("الحادية عشر", 11), + ("اثنا عشر", 12), + ("ثلاثة عشر", 13), + ("أربعة عشر", 14), + ("خمسة عشر", 15), + ("ستة عشر", 16), + ("سبعة عشر", 17), + ("ثمانية عشر", 18), + ("تسعة عشر", 19), + ("عشرون", 20), + ("عشرين", 20), + ("واحد وعشرون", 21), + ("اثنان وعشرون", 22), + ("ثلاثة وعشرون", 23), + ("أربعة وعشرون", 24), + ("خمسة وعشرون", 25), + ("ستة وعشرون", 26), + ("سبعة وعشرون", 27), + ("ثمانية وعشرون", 28), + ("تسعة وعشرون", 29), + ("الثلاثين", 30), + ("ثلاثين", 30), + ("واحد وثلاثون", 31), + ("اثنان وثلاثون", 32), + ("ثلاثة وثلاثون", 33), + ("أربعة وثلاثون", 34), + ("خمسة وثلاثون", 35), + ("ستة وثلاثون", 36), + ("سبعة وثلاثون", 37), + ("ثمانية وثلاثون", 38), + ("تسعة وثلاثون", 39), + ("أربعون", 40), + ("واحد وأربعون", 41), + ("اثنان وأربعون", 42), + ("ثلاثة وأربعون", 43), + ("أربعة وأربعون", 44), + ("خمسة وأربعون", 45), + ("ستة وأربعون", 46), + ("سبعة وأربعون", 47), + ("ثمانية وأربعون", 48), + ("تسعة وأربعون", 49), + ("خمسون", 50), + ("واحد وخمسون", 51), + ("اثنان وخمسون", 52), + ("ثلاثة وخمسون", 53), + ("أربعة وخمسون", 54), + ("خمسة وخمسون", 55), + ("ستة وخمسون", 56), + ("سبعة وخمسون", 57), + ("ثمانية وخمسون", 58), + ("تسعة وخمسون", 59), + ("ستين", 60), + ("واحد وستون", 61), + ("اثنان وستون", 62), + ("ثلاثة وستون", 63), + ("أربعة وستون", 64), + ("خمسة وستون", 65), + ("ستة وستون", 66), + ("سبعة وستون", 67), + ("ثمانية وستون", 68), + ("تسعة وستون", 69), + ("السبعون", 70), + ("واحد وسبعون", 71), + ("اثنان وسبعون", 72), + ("ثلاثة وسبعون", 73), + ("أربعة وسبعون", 74), + ("خمسة وسبعون", 75), + ("ستة وسبعون", 76), + ("سبعة وسبعون", 77), + ("ثمانية وسبعون", 78), + ("تسعة وسبعون", 79), + ("ثمانون", 80), + ("واحد وثمانون", 81), + ("اثنان وثمانون", 82), + ("ثلاثة وثمانون", 83), + ("أربعة وثمانون", 84), + ("خمسة وثمانون", 85), + ("ستة وثمانون", 86), + ("سبعة وثمانون", 87), + ("ثمانية وثمانين", 88), + ("تسعة وثمانون", 89), + ("تسعون", 90), + ("واحد وتسعون", 91), + ("اثنان وتسعون", 92), + ("ثلاثة وتسعون", 93), + ("أربعة وتسعون", 94), + ("خمسة وتسعون", 95), + ("ستة وتسعون", 96), + ("سبعة وتسعون", 97), + ("ثمانية وتسعون", 98), + ("تسعة وتسعون", 99), + ("مائة", 100)]) + DayOfMonth = dict([("1st", 1), + ("1th", 1), + ("2nd", 2), + ("2th", 2), + ("3rd", 3), + ("3th", 3), + ("4th", 4), + ("5th", 5), + ("6th", 6), + ("7th", 7), + ("8th", 8), + ("9th", 9), + ("10th", 10), + ("11th", 11), + ("11st", 11), + ("12th", 12), + ("12nd", 12), + ("13th", 13), + ("13rd", 13), + ("14th", 14), + ("15th", 15), + ("16th", 16), + ("17th", 17), + ("18th", 18), + ("19th", 19), + ("20th", 20), + ("21st", 21), + ("21th", 21), + ("22nd", 22), + ("22th", 22), + ("23rd", 23), + ("23th", 23), + ("24th", 24), + ("25th", 25), + ("26th", 26), + ("27th", 27), + ("28th", 28), + ("29th", 29), + ("30th", 30), + ("31st", 31), + ("01st", 1), + ("01th", 1), + ("02nd", 2), + ("02th", 2), + ("03rd", 3), + ("03th", 3), + ("04th", 4), + ("05th", 5), + ("06th", 6), + ("07th", 7), + ("08th", 8), + ("09th", 9)]) + DoubleNumbers = dict([("half", 0.5), + ("quarter", 0.25)]) + HolidayNames = dict([("easterday", ["easterday", "easter", "eastersunday"]), + ("ashwednesday", ["ashwednesday"]), + ("palmsunday", ["palmsunday"]), + ("maundythursday", ["maundythursday"]), + ("goodfriday", ["goodfriday"]), + ("eastersaturday", ["eastersaturday"]), + ("eastermonday", ["eastermonday"]), + ("ascensionday", ["ascensionday"]), + ("whitesunday", ["whitesunday", "pentecost", "pentecostday"]), + ("whitemonday", ["whitemonday"]), + ("trinitysunday", ["trinitysunday"]), + ("corpuschristi", ["corpuschristi"]), + ("earthday", ["earthday"]), + ("fathers", ["fatherday", "fathersday"]), + ("mothers", ["motherday", "mothersday"]), + ("thanksgiving", ["thanksgivingday", "thanksgiving"]), + ("blackfriday", ["blackfriday"]), + ("cybermonday", ["cybermonday"]), + ("martinlutherking", ["mlkday", "martinlutherkingday", "martinlutherkingjrday"]), + ("washingtonsbirthday", ["washingtonsbirthday", "washingtonbirthday", "presidentsday"]), + ("canberra", ["canberraday"]), + ("labour", ["labourday", "laborday"]), + ("columbus", ["columbusday"]), + ("memorial", ["memorialday"]), + ("yuandan", ["yuandan"]), + ("maosbirthday", ["maosbirthday"]), + ("teachersday", ["teachersday", "teacherday"]), + ("singleday", ["singleday"]), + ("allsaintsday", ["allsaintsday"]), + ("youthday", ["youthday"]), + ("childrenday", ["childrenday", "childday"]), + ("femaleday", ["femaleday"]), + ("treeplantingday", ["treeplantingday"]), + ("arborday", ["arborday"]), + ("girlsday", ["girlsday"]), + ("whiteloverday", ["whiteloverday"]), + ("loverday", ["loverday", "loversday"]), + ("christmas", ["christmasday", "christmas"]), + ("xmas", ["xmasday", "xmas"]), + ("newyear", ["newyear"]), + ("newyearday", ["newyearday"]), + ("newyearsday", ["newyearsday"]), + ("inaugurationday", ["inaugurationday"]), + ("groundhougday", ["groundhougday"]), + ("valentinesday", ["valentinesday"]), + ("stpatrickday", ["stpatrickday", "stpatricksday", "stpatrick"]), + ("aprilfools", ["aprilfools"]), + ("stgeorgeday", ["stgeorgeday"]), + ("mayday", ["mayday", "intlworkersday", "internationalworkersday", "workersday"]), + ("cincodemayoday", ["cincodemayoday"]), + ("baptisteday", ["baptisteday"]), + ("usindependenceday", ["usindependenceday"]), + ("independenceday", ["independenceday"]), + ("bastilleday", ["bastilleday"]), + ("halloweenday", ["halloweenday", "halloween"]), + ("allhallowday", ["allhallowday"]), + ("allsoulsday", ["allsoulsday"]), + ("guyfawkesday", ["guyfawkesday"]), + ("veteransday", ["veteransday"]), + ("christmaseve", ["christmaseve"]), + ("newyeareve", ["newyearseve", "newyeareve"]), + ("juneteenth", ["juneteenth", "freedomday", "jubileeday"])]) + WrittenDecades = dict([("hundreds", 0), + ("tens", 10), + ("twenties", 20), + ("thirties", 30), + ("forties", 40), + ("fifties", 50), + ("sixties", 60), + ("seventies", 70), + ("eighties", 80), + ("nineties", 90)]) + SpecialDecadeCases = dict([("noughties", 2000), + ("aughts", 2000), + ("two thousands", 2000)]) + DefaultLanguageFallback = 'DMY' + SuperfluousWordList = [r'preferably', r'how about', r'maybe', r'perhaps', r'say', r'like'] + DurationDateRestrictions = [r'today', r'now'] + AmbiguityFiltersDict = dict([("^(morning|afternoon|evening|night|day)\\b", "\\b(good\\s+(morning|afternoon|evening|night|day))|(nighty\\s+night)\\b"), + ("\\bnow\\b", "\\b(^now,)|\\b((is|are)\\s+now\\s+for|for\\s+now)\\b"), + ("\\bmay\\b", "\\b((((!|\\.|\\?|,|;|)\\s+|^)may i)|(i|you|he|she|we|they)\\s+may|(may\\s+((((also|not|(also not)|well)\\s+)?(be|ask|contain|constitute|e-?mail|take|have|result|involve|get|work|reply|differ))|(or may not))))\\b"), + ("\\b(a|one) second\\b", "\\b(?\\bfins\\sa|{BaseDateTime.RangeConnectorSymbolRegex})' + RangeConnectorRegex = f'(?\\b(i)\\b|{BaseDateTime.RangeConnectorSymbolRegex})' + ThisPrefixRegex = f'(aix[òo]|aquesta)\\b' + RangePrefixRegex = f'(des de|entre)' + DayRegex = f'\\b(?01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|1|20|21|22|23|24|25|26|27|28|29|2|30|31|3|4|5|6|7|8|9)(?:\\.[º°])?(?=\\b|t)' + MonthNumRegex = f'(?1[0-2]|(0)?[1-9])\\b' + WrittenDayRegex = f'(?un|dos|tres|quatre|cinc|cinc|sis|set|vuit|nou|nou|deu|onze|dotze|dotze|tretze|catorze|quinze|setze|mor disset|mor divuit|dinnou|vint|vint-i-un|vint-i-dos|vint-i-tres|vint-i-quatre|vint-i-cinc|vint-i-sis|vint-i-set|vint-i-vuit|vint-i-nou|trenta|trenta-un)' + OclockRegex = f'(?en\\s+punt(o)?)' + AmDescRegex = f'({BaseDateTime.BaseAmDescRegex})' + PmDescRegex = f'({BaseDateTime.BasePmDescRegex})' + AmPmDescRegex = f'({BaseDateTime.BaseAmPmDescRegex})' + DescRegex = f'(?({AmDescRegex}|{PmDescRegex}))' + OfPrepositionRegex = f'(\\bde\\b)' + TwoDigitYearRegex = f'\\b(?([0-9]\\d))(?!(\\s*((\\:\\d)|{AmDescRegex}|{PmDescRegex}|\\.\\d))|\\.?[º°ª])\\b' + WrittenOneToNineRegex = f'(?:u(n)?|dos|tres|quatre|cinc|sis|set|vuit|nou)' + TwoToNineIntegerRegex = f'(?:tres|set|vuit|quatre|cinc|nou|dos|sis)' + WrittenElevenToNineteenRegex = f'(?:onze|dotze|tretze|catorze|quinze|setze|disset|divuit|dinou)' + WrittenTensRegex = f'(?:setanta|vint|trenta|vuitanta|noranta|quaranta|cinquanta|seixanta)' + WrittenTwentiesRegex = f'(vint(\\s?-\\s?|\\s)i(\\s?-\\s?|\\s)({WrittenOneToNineRegex}))' + WrittenOneHundredToNineHundredRegex = f'(({TwoToNineIntegerRegex}(\\s?-\\s?|\\s))?cent(s?))' + WrittenOneToNinetyNineRegex = f'(({WrittenElevenToNineteenRegex}|{WrittenTwentiesRegex}|({WrittenTensRegex}((\\s?-\\s?|\\s)({WrittenOneToNineRegex}))?)|deu|{WrittenOneToNineRegex}))' + FullTextYearRegex = f'\\b(?((dos\\s+)?mil)(\\s+{WrittenOneHundredToNineHundredRegex})?(\\s+{WrittenOneToNinetyNineRegex})?)' + YearRegex = f'({BaseDateTime.FourDigitYearRegex}|{FullTextYearRegex})' + MonthRegex = f'\\b(?gener|febrer|mar[çc]|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)' + MonthSuffixRegex = f'(?((a|de)\\s+)?({MonthRegex}))' + SimpleCasesRegex = f'\\b({RangePrefixRegex}\\s+)?({DayRegex})\\s*{TillRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*){YearRegex})?\\b' + MonthFrontSimpleCasesRegex = f'\\b{MonthSuffixRegex}\\s+({RangePrefixRegex}?({DayRegex})\\s*{TillRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' + MonthFrontBetweenRegex = f'\\b{MonthSuffixRegex}\\s+({RangePrefixRegex}({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' + MonthNumWithYearRegex = f'\\b(({YearRegex}(\\s*?)[/\\-\\.~](\\s*?){MonthNumRegex})|({MonthNumRegex}(\\s*?)[/\\-\\.~](\\s*?){YearRegex}))\\b' + OfYearRegex = f'\\b((de?)\\s+({YearRegex}\\s+any))\\b' + CenturySuffixRegex = f'(^segle)\\b' + RangeUnitRegex = f'\\b(?anys?|mesos?|setmanes?)\\b' + BeforeAfterRegex = f'^[.]' + InConnectorRegex = f'\\b(en)(?=\\s*$)\\b' + TodayNowRegex = f'\\b(avui|ara)\\b' + FromRegex = f'((\\bdes?)(\\s*del)?)$' + BetweenRegex = f'(\\bentre\\s*)' + WeekDayRegex = f'\\b(?(dilluns|dimarts|dimecres|dijous|divendres|dissabte|diumenge))\\b' + OnRegex = f'\\b(a\\s+)({DayRegex}s?)(?![.,]\\d)\\b' + RelaxedOnRegex = f'(?<=\\b(a)\\s+)((?10|11|12|13|14|15|16|17|18|19|1st|20|21|22|23|24|25|26|27|28|29|2|30|31|3|4|5|6|7|8|9)s?)(?![.,]\\d)\\b' + SpecialDayRegex = f'\\b(avui|dem[àa]|ahir)\\b' + SpecialDayWithNumRegex = f'^[.]' + FlexibleDayRegex = f'(?([a-z]+\\s)?({WrittenDayRegex}|{DayRegex}))' + WeekDayAndDayOfMonthRegex = f'\\b{WeekDayRegex}\\s+((el\\s+(d[ií]a\\s+)?){FlexibleDayRegex})\\b' + WeekDayAndDayRegex = f'\\b{WeekDayRegex}\\s+({DayRegex}|{WrittenDayRegex})(?!([-:/]|\\.\\d|(\\s+({AmDescRegex}|{PmDescRegex}|{OclockRegex}))))\\b' + RelativeWeekDayRegex = f'^[.]' + AmbiguousRangeModifierPrefix = f'^[.]' + NumberEndingPattern = f'^[.]' + DateTokenPrefix = 'a ' + TimeTokenPrefix = 'a les ' + TokenBeforeDate = 'el ' + TokenBeforeTime = 'a les ' + HalfTokenRegex = f'^((i\\s+)?mitja(na)?)' + QuarterTokenRegex = f'^((i\\s+)?quart|(?menys\\s+quart))' + PastTokenRegex = f'\\b((passades|passats)(\\s+(de\\s+)?les)?)$' + ToTokenRegex = f'\\b((per|abans)(\\s+(de\\s+)?les?)|(?^menys))$' + SpecialDateRegex = f'(?<=\\b(a)\\s+el\\s+){DayRegex}\\b' + OfMonthRegex = f'^\\s*((d[ií]a\\s+)?d[e\']\\s?)?{MonthSuffixRegex}' + MonthEndRegex = f'({MonthRegex}\\s*(el)?\\s*$)' + WeekDayEnd = f'{WeekDayRegex}\\s*,?\\s*$' + WeekDayStart = f'^\\b$' + DateYearRegex = f'(?{YearRegex}|(?2[0-4]|[0-1]?\\d)' + HourNumRegex = f'\\b(?zero|una|dues|tres|quatre|cinc|sis|set|vuit|nou|deu|deu|onze|dotze)\\b' + MinuteNumRegex = f'(?u(n)?|dos|tres|quatre|cinc|sis|set|vuit|nou|deu|onze|dotze|tretze|catorze|quinze|setze|disset|divuit|dinou|vint|trenta|quaranta|cinquanta)' + DeltaMinuteNumRegex = f'(?u(n)?|dos|tres|quatre|cinc|sis|set|vuit|nou|deu|onze|dotze|tretze|catorze|quinze|setze|disset|divuit|dinou|vint|trenta|quaranta|cinquanta)' + PmRegex = f'(?((de|a)\\s+la)\\s+(tarda|nit))' + AmRegex = f'(?(((de|a)\\s+la)|al|del)\\s+(matí|matinada))' + AmTimeRegex = f'(?(aquesta|(de|a)\\s+la)|(aquest)\\s+(matí|matinada))' + PmTimeRegex = f'(?(aquesta|(de|a)\\s+la)\\s+(tarda|nit))' + NightTimeRegex = f'(nit)' + LastNightTimeRegex = f'(ahir a la nit)' + NowTimeRegex = f'(ara|mateix|moment)' + RecentlyTimeRegex = f'(ment)' + LessThanOneHour = f'(?((\\s+i\\s+)?quart|(\\s*)menys quart|(\\s+i\\s+)mitja(na)?|{BaseDateTime.DeltaMinuteRegex}(\\s+(minuts?|mins?))|{DeltaMinuteNumRegex}(\\s+(minuts?|mins?))))' + TensTimeRegex = f'(?deu|vint|trenta|quaranta|cinquanta)' + WrittenTimeRegex = f'(?{HourNumRegex}\\s*((i|(?menys))\\s+)?(({TensTimeRegex}(\\s*i\\s+)?)?{MinuteNumRegex}))' + TimePrefix = f'(?{LessThanOneHour}(\\s+(passades)\\s+(de\\s+les|les)?|\\s+(per\\s+a|abans\\s+de)?\\s+(les?))?)' + TimeSuffix = f'(?({LessThanOneHour}\\s+)?({AmRegex}|{PmRegex}|{OclockRegex}))' + GeneralDescRegex = f'({DescRegex}|(?{AmRegex}|{PmRegex}))' + BasicTime = f'(?{WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}:{BaseDateTime.MinuteRegex}(:{BaseDateTime.SecondRegex})?|{BaseDateTime.HourRegex})' + MidTimeRegex = f'(?((?mitja\\s*nit)|(?mitja\\s*matinada)|(?mig\\s*matí)|(?mitja\\s*tarda)|(?mig\\s*dia)))' + AtRegex = f'\\b((?<=\\b((a)\\s+les?|al)\\s+)(({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex})\\b?(DescRegex)?|{MidTimeRegex})|{MidTimeRegex})' + ConnectNumRegex = f'({BaseDateTime.HourRegex}(?[0-5][0-9])\\s*{DescRegex})' + TimeRegexWithDotConnector = f'({BaseDateTime.HourRegex}\\.{BaseDateTime.MinuteRegex})' + TimeRegex1 = f'(\\b{TimePrefix}\\s+)?({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex})\\s*({DescRegex})' + TimeRegex2 = f'(\\b{TimePrefix}\\s+)?(t)?{BaseDateTime.HourRegex}(\\s*)?:(\\s*)?{BaseDateTime.MinuteRegex}((\\s*)?:(\\s*)?{BaseDateTime.SecondRegex})?(\\s*({DescRegex})|\\b)' + TimeRegex3 = f'\\b(({TimePrefix}\\s+)?{TimeRegexWithDotConnector}(\\s*({DescRegex}|{TimeSuffix}))|((les\\s+{TimeRegexWithDotConnector})(?!\\s*(per\\s+cent?|%))(\\s*({DescRegex}|{TimeSuffix})|\\b)))' + TimeRegex4 = f'\\b(({DescRegex}?)|({BasicTime}\\s*)?({GeneralDescRegex}?)){TimePrefix}(\\s*({HourNumRegex}|{BaseDateTime.HourRegex}))?(\\s+{TensTimeRegex}(\\s*(i\\s+)?{MinuteNumRegex})?)?(\\s*({OclockRegex}|{DescRegex})|\\b)' + TimeRegex5 = f'\\b({TimePrefix}|{BasicTime}{TimePrefix})\\s+(\\s*{DescRegex})?{BasicTime}?\\s*{TimeSuffix}\\b' + TimeRegex6 = f'({BasicTime}(\\s*{DescRegex})?\\s+{TimeSuffix}\\b)' + TimeRegex7 = f'\\b{TimeSuffix}\\s+a\\s+les\\s+{BasicTime}((\\s*{DescRegex})|\\b)' + TimeRegex8 = f'\\b{TimeSuffix}\\s+{BasicTime}((\\s*{DescRegex})|\\b)' + TimeRegex9 = f'\\b(?{HourNumRegex}\\s+({TensTimeRegex}\\s*)(i\\s+)?{MinuteNumRegex}?)\\b' + TimeRegex11 = f'\\b({WrittenTimeRegex})(\\s+{DescRegex})?\\b' + TimeRegex12 = f'(\\b{TimePrefix}\\s+)?{BaseDateTime.HourRegex}(\\s*){BaseDateTime.MinuteRegex}(\\s*{DescRegex})?' + NowRegex = f'\\b(?(just\\s+)?ara(\\s+mateix)?|en\\s+aquest\\s+moment|tan\\s+aviat\\s +com\\s+sigui\\s+possible|tan\\s+aviat\\s+com\\s+(pugui|podes|podem|poden)|el\\s+m[aà]s\\s +aviat\\s+possible|recentment|prèviament|aquest llavors)\\b' + Tomorrow = 'matí' + DayOfWeek = dict([("dilluns", 1), + ("dimarts", 2), + ("dimecres", 3), + ("dijous", 4), + ("divendres", 5), + ("dissabte", 6), + ("diumenge", 0), + ("sa", 6)]) + MonthOfYear = dict([("gener", 1), + ("febrer", 2), + ("març", 3), + ("marc", 3), + ("abril", 4), + ("maig", 5), + ("juny", 6), + ("juliol", 7), + ("agost", 8), + ("setembre", 9), + ("octubre", 10), + ("novembre", 11), + ("desembre", 12), + ("1", 1), + ("2", 2), + ("3", 3), + ("4", 4), + ("5", 5), + ("6", 6), + ("7", 7), + ("8", 8), + ("9", 9), + ("10", 10), + ("11", 11), + ("12", 12), + ("01", 1), + ("02", 2), + ("03", 3), + ("04", 4), + ("05", 5), + ("06", 6), + ("07", 7), + ("08", 8), + ("09", 9)]) + Numbers = dict([("zero", 0), + ("un", 1), + ("una", 1), + ("dos", 2), + ("tres", 3), + ("trés", 3), + ("quatre", 4), + ("cinc", 5), + ("sis", 6), + ("set", 7), + ("vuit", 8), + ("nou", 9), + ("deu", 10), + ("onze", 11), + ("dotze", 12), + ("docena", 12), + ("dotzenes", 12), + ("tretze", 13), + ("catorze", 14), + ("quinze", 15), + ("setze", 16), + ("disset", 17), + ("divuit", 18), + ("dinou", 19), + ("vint", 20), + ("veinti", 20), + ("ventiuna", 21), + ("ventiuno", 21), + ("vint-i-un", 21), + ("vint-i-una", 21), + ("vint-i-dos", 22), + ("vint-i-tres", 23), + ("vint-i-quatre", 24), + ("vint-i-cinc", 25), + ("vint-i-sis", 26), + ("vint-sis", 26), + ("vint-i-set", 27), + ("vint-i-vuit", 28), + ("vint-i-nou", 29), + ("treinta", 30), + ("quaranta", 40), + ("cinquanta", 50)]) + DefaultLanguageFallback = 'DMY' +# pylint: enable=line-too-long \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/dutch_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/dutch_date_time.py new file mode 100644 index 0000000000..f1750e151d --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/dutch_date_time.py @@ -0,0 +1,839 @@ +# ------------------------------------------------------------------------------ +# +# This code was generated by a tool. +# Changes to this file may cause incorrect behavior and will be lost if +# the code is regenerated. +# +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# ------------------------------------------------------------------------------ + +from .base_date_time import BaseDateTime +# pylint: disable=line-too-long + + +class DutchDateTime: + LangMarker = 'Dut' + CheckBothBeforeAfter = False + TillRegex = f'(?\\b(tot(dat|\\s+en\\s+met)?|en|gedurende|tijdens|ten tijde van)\\b|{BaseDateTime.RangeConnectorSymbolRegex})' + RangeConnectorRegex = f'(?\\b(en|t/m|tot(\\s+(aan|en\\s+met))?)\\b|{BaseDateTime.RangeConnectorSymbolRegex})' + ArticleRegex = f'\\b(de|het|een)\\b' + ApostrofRegex = f'(’|‘|\'|ʼ)' + ApostrofsRegex = f'({ApostrofRegex}\\s*s)' + RelativeRegex = f'\\b(?((dit|deze|(erop)?volgende?|(aan)?komende?|aanstaande?|huidige?|vorige?|verleden|voorgaande?|laatste|afgelopen|(op\\s+)?de|het)\\b)|gister(en)?)' + StrictRelativeRegex = f'\\b(?((dit|deze|(erop)?volgende?|(aan)?komende?|aanstaande?|huidige?|vorige?|verleden|voorgaande?|laatste|afgelopen)\\b)|gister(en)?)' + UpcomingPrefixRegex = f'((deze\\s+)?((aan)?komende?|aanstaande?))' + NextPrefixRegex = f'\\b((erop)?volgende?|eerstvolgende|{UpcomingPrefixRegex})\\b' + AfterNextSuffixRegex = f'\\b((na\\s+(afloop\\s+van\\s+)?((de|het)\\s+)?volgende?)|over)\\b' + PastPrefixRegex = f'((deze\\s+)?(verleden|afgelopen))\\b' + PreviousPrefixRegex = f'((voorgaand[e]|vorige?|verleden|laatste|{PastPrefixRegex})\\b|gister(en)?)' + ThisPrefixRegex = f'(dit|deze|huidige?)\\b' + RangePrefixRegex = f'(van|tussen)' + CenturySuffixRegex = f'(^eeuw|^centennium)\\b' + ReferencePrefixRegex = f'(dezelfde|hetzelfde|dat(zelfde)?|die|overeenkomstige)\\b' + FutureSuffixRegex = f'\\b(((in\\s+de\\s+)?toekomst)|daarna|over|na)\\b' + PastSuffixRegex = f'^\\b$' + DayRegex = f'(de\\s*)?(?(?:3[0-1]|[1-2]\\d|0?[1-9]))(?:\\s*(ste|de|e))?(?=\\b|t)' + WrittenOneToNineRegex = f'(één|een|twee|drie|vier|vijf|zes|zeven|acht|negen)' + WrittenElevenToNineteenRegex = f'(elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien)' + WrittenDayRegex = f'(?({WrittenOneToNineRegex})|({WrittenElevenToNineteenRegex})|(({WrittenOneToNineRegex}(en|ën))?twintig)|(((één|een)(en|ën))?dertig))' + WrittenCardinalDayRegex = f'(?<=((de\\s+)|\\b))(?(éérste|eerste|tweede|derde|vierde|vijfde|zesde|zevende|achtste|negende|tiende|{WrittenElevenToNineteenRegex}de|({WrittenOneToNineRegex}(en|ën))?twintigste|((één|een)(en|ën))?dertigste))' + ImplicitDayRegex = f'(de\\s*)?(?(3[0-1]|[0-2]?\\d)(\\s*(ste|de|e)))\\b' + MonthNumRegex = f'\\b(?01|02|03|04|05|06|07|08|09|10|11|12|1|2|3|4|5|6|7|8|9)\\b' + WrittenTensRegex = f'(tien|twintig|dertig|veertig|vijftig|zestig|zeventig|tachtig|negentig)' + WrittenNumRegex = f'({WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}(\\s+{WrittenOneToNineRegex})?)' + WrittenCenturyFullYearRegex = f'((twee)\\s*duizend(\\s+en)?(\\s*{WrittenOneToNineRegex}\\s*honderd)?)' + WrittenCenturyOrdinalYearRegex = f'((ee|éé)nentwintig|tweeëntwintig|tien|elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien|twintig|een|twee|drie|vier|vijf|zes|zeven|acht|negen)' + CenturyRegex = f'\\b(?{WrittenCenturyFullYearRegex}|{WrittenCenturyOrdinalYearRegex}(\\s*honderd)?(\\s+en)?)' + LastTwoYearNumRegex = f'((zero|nul|en)\\s+{WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|({WrittenOneToNineRegex}[eë]n)?{WrittenTensRegex})' + FullTextYearRegex = f'\\b((?{CenturyRegex})\\s*(?{LastTwoYearNumRegex})\\b|\\b(?{WrittenCenturyFullYearRegex}|{WrittenCenturyOrdinalYearRegex}\\s+hundred(\\s+and)?))\\b' + OclockRegex = f'(?u(ur)?)\\b' + SpecialDescRegex = f'((?)p\\b)' + AmDescRegex = f'(:?{BaseDateTime.BaseAmDescRegex})' + PmDescRegex = f'(:?{BaseDateTime.BasePmDescRegex})' + AmPmDescRegex = f'(:?{BaseDateTime.BaseAmPmDescRegex})' + DescRegex = f'(:?(:?({OclockRegex}\\s+)?(?({AmPmDescRegex}|{AmDescRegex}|{PmDescRegex}|{SpecialDescRegex}))\\.?)|{OclockRegex})' + PmRegex = f'(?({ApostrofsRegex}|des)\\s+(\\bmiddags|avonds|nachts)|((in|tegen|op|om|met)\\s+(de\\s+)?)(((na)?middag|avond|(midder)?nacht|lunchtijd))|\\s+dag)' + PmRegexFull = f'(?(({ApostrofsRegex}|des)\\s+(\\bmiddags|avonds|nachts)|((in|tegen|op|om|met)\\s+(de\\s+)?)?(((na)?middag|(?(({ApostrofsRegex}|des)\\s+(ochtends|morgens)|((in|tegen|op)\\s+de)(\\s+(ochtend|morgen))|(?<=gisteren|morgen|vandaag|(maan|dins|woens|donder|vrij|zater|zon)dag)(ochtend|morgen)|^?ochtend))' + FullDescRegex = f'({DescRegex}|{AmRegex}|{PmRegexFull})' + TwoDigitYearRegex = f'\\b(?([0-24-9]\\d))(?!(\\s*(([:\\.]\\d)|keer|uurs?|{AmDescRegex}|{PmDescRegex})))\\b' + YearRegex = f'({BaseDateTime.FourDigitYearRegex}|{FullTextYearRegex})' + WeekDayRegex = f'\\b(?((ma|di(ns)?|wo(e(ns)?)?|do|vr(ij)?|zat?|zo)(\\.|\\b))|((?:maan|dins|woens|donder|vrij|zater|zon)(dag(en)?)?(middag)?)\\b)' + SingleWeekDayRegex = f'\\b(?(((ma|di(ns)?|wo(e(ns)?)?|do|vr|za)\\b(\\.)?)|(vrij|zat|zon?)\\.(?!$)|(((?((van\\s+)?(de\\s+)?)?{RelativeRegex}\\s+maand)\\b' + WrittenMonthRegex = f'(((de\\s+)?maand\\s+)?(?januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december|jan|feb|mar|mrt|apr|jun|jul|aug|sep|sept|oct|okt|nov|dec))' + MonthSuffixRegex = f'(?((in|van|tijdens|sinds|tot|op)\\s+)?({RelativeMonthRegex}|{WrittenMonthRegex}))' + DateUnitRegex = f'(?(eeuw|maand|weekend)(?en)?|jaar|(?jaren|weken)|jr|decennia|mnd|week|(?we[er]k)?dag(?en)?|dgn)\\b' + DateTokenPrefix = 'op ' + TimeTokenPrefix = 'om ' + TokenBeforeDate = 'op ' + TokenBeforeTime = 'om ' + HalfTokenRegex = f'^(half)' + QuarterTokenRegex = f'^(een\\s+kwart(\\s+jaar)?|kwart|een\\s+kwartier|kwartier)' + ThreeQuarterTokenRegex = f'^(drie\\s+kwart|drie\\s+kwartier)' + ToTokenRegex = f'\\b(voor)$' + ToHalfTokenRegex = f'\\b(over\\s+half)$' + ForHalfTokenRegex = f'\\b(voor\\s+half)$' + FromRegex = f'\\b(van(af)?)$' + BetweenTokenRegex = f'\\b(tussen)$' + SimpleCasesRegex = f'\\b({RangePrefixRegex}\\s+)?({DayRegex})\\s*{TillRegex}\\s*({DayRegex}(\\s*),?(\\s*){MonthSuffixRegex}|{MonthSuffixRegex}\\s+{DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' + MonthFrontSimpleCasesRegex = f'\\b({RangePrefixRegex}\\s+)?(({MonthSuffixRegex}\\s+((van)\\s+)?({DayRegex})|({DayRegex})\\s+((van)\\s+)?{MonthSuffixRegex})\\s*{TillRegex}\\s*({DayRegex})|(op\\s+)?({DayRegex})\\s*{TillRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' + MonthFrontBetweenRegex = f'\\b{MonthSuffixRegex}\\s+(tussen\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' + BetweenRegex = f'\\b(tussen\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*){YearRegex})?\\b' + RelativeYearRegex = f'({YearRegex}|\\\'?{TwoDigitYearRegex}|(?volgende?|komende?|aanstaande?|aankomende?|huidige?|vorige?|afgelopen|dit)\\s+jaar)' + MonthWithYear = f'\\b(({WrittenMonthRegex}(\\.)?(\\s*)[/\\\\\\-\\.,]?(\\s+(van|over|in))?(\\s*){RelativeYearRegex})|({RelativeYearRegex}(\\s*),?(\\s*){WrittenMonthRegex}))\\b' + OneWordPeriodRegex = f'\\b((((de\\s+)?maand\\s+(van\\s+)?)?({StrictRelativeRegex}\\s+)?(?januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mar\\.?|mrt\\.?|apr\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|sept\\.?|oct\\.?|okt\\.?|nov\\.?|dec\\.?))|(maand|jaar)\\s+tot(\\s+op)?\\s+heden|(({RelativeRegex}\\s+)(mijn\\s+)?(weekend|(?werkweek)|week|maand|jaar(?!\\s+hoger dan))|({RelativeRegex}\\s+)?(mijn\\s+)(weekend|(?werkweek)|week|maand|jaar))(?!((\\s+van)?\\s+\\d+|\\s+tot(\\s+op)?\\s+heden|nu))(\\s+{AfterNextSuffixRegex})?)\\b' + MonthNumWithYear = f'\\b(({BaseDateTime.FourDigitYearRegex}(\\s*)[/\\-\\.](\\s*){MonthNumRegex})|({MonthNumRegex}(\\s*)[/\\-](\\s*){BaseDateTime.FourDigitYearRegex}))\\b' + WeekOfMonthRegex = f'\\b(?(de\\s+)?(?eerste|tweede|derde|vierde|vijfde|1e|1ste|2e|2de|3e|3de|4e|4de|5e|5de|laatste)\\s+week\\s+{MonthSuffixRegex}(\\s+{BaseDateTime.FourDigitYearRegex}|{RelativeRegex}\\s+year)?)\\b' + WeekOfYearRegex = f'(\\b(?(de\\s+)?(?eerste|tweede|derde|vierde|vijfde|1e|1ste|2e|2de|3e|3de|4e|4de|5e|5de|laatste)\\s+week(\\s+van)?\\s+({YearRegex}|{RelativeRegex}\\s+jaar))\\b)|(\\b({YearRegex}|{RelativeRegex}\\s+jaar)\\s(?(de\\s+)?(?eerste|tweede|derde|vierde|vijfde|1e|1ste|2e|2de|3e|3de|4e|4de|5e|5de|laatste)\\s+week)\\b)' + OfYearRegex = f'\\b((of|in)\\s+({YearRegex}|{StrictRelativeRegex}\\s+year))\\b' + FirstLastRegex = f'\\b(the\\s+)?((?first)|(?last))\\b' + FollowedDateUnit = f'^\\s*{DateUnitRegex}' + NumberCombinedWithDateUnit = f'\\b(?\\d+(\\.\\d*)?){DateUnitRegex}' + QuarterTermRegex = f'\\b(((?eerste|1e|1ste|tweede|2e|2de|derde|3e|3de|vierde|4e|4de)[ -]+kwartaal)|(k(?[1-4])))\\b' + QuarterRegex = f'(het\\s+)?{QuarterTermRegex}((\\s+van|\\s*,\\s*)?\\s+({YearRegex}|{RelativeRegex}\\s+jaar))?' + QuarterRegexYearFront = f'({YearRegex}|({RelativeRegex}\\s+jaar))({ApostrofsRegex})?\\s+((het|de)\\s+)?{QuarterTermRegex}' + HalfYearTermRegex = f'(?eerste|1e|1ste|tweede|2e|2de)\\s+(helft)' + HalfYearFrontRegex = f'(?(de\\s+){HalfYearTermRegex}(\\s+helft van\\s+)((1[5-9]|2[0-1]])\\d{{2}}))' + HalfYearBackRegex = f'(het\\s+)?(H(?[1-2])|({HalfYearTermRegex}))(\\s+van|\\s*,\\s*)?\\s+({YearRegex})' + HalfYearRelativeRegex = f'(het\\s+)?{HalfYearTermRegex}(\\s+van|\\s*,\\s*)?\\s+({RelativeRegex}\\s+jaar)' + AllHalfYearRegex = f'({HalfYearFrontRegex})|({HalfYearBackRegex})|({HalfYearRelativeRegex})' + EarlyPrefixRegex = f'\\b(?((?eerder)|vroeg(er)?|((de|het)\\s+)?(begin(nend)?|start(end)?))(\\s+(in|op|van)(\\s+de)?)?)\\b' + MidPrefixRegex = f'\\b(?(het\\s+)?(mid(den|-)?|halverwege|op\\s+de\\s+helft|half)(\\s+(in|op|van)(\\s+de)?)?)' + LaterPrefixRegex = f'\\b(?(laat|(?later)|(aan\\s+)?het\\s+einde?(\\s+van(\\s+de)?)?|eind(e|igend)?|afsluitend)(\\s+(in|op|van)(\\s+de)?)?)\\b' + PrefixPeriodRegex = f'({EarlyPrefixRegex}|{MidPrefixRegex}|{LaterPrefixRegex})' + PrefixDayRegex = f'\\b(((?eerder|vroeg(er)?|begin|start)|(?midden|halverwege|op\\s+de\\s+helft)|(?laat|later))(\\s+(in|op|van))?(\\s+de\\s+dag)?$)|^\\s*(((?eerder|vroeg(er)?|begin|start)|(?midden|halverwege|op\\s+de\\s+helft)|in\\s+de|(?laat|later))(\\s+(in|op|van))(\\s+de\\s+dag))\\b' + SeasonDescRegex = f'(?lente|voorjaar|zomer|herfst|najaar|winter)' + SeasonRegex = f'\\b(?({PrefixPeriodRegex}(\\s+)?)?({ArticleRegex}\\s+)?({RelativeRegex}\\s+)?{SeasonDescRegex}((\\s+(in|van)|\\s*,\\s*)?\\s+({YearRegex}|({ArticleRegex}\\s+)?({RelativeRegex}\\s+)?jaar))?)\\b' + WhichWeekRegex = f'\\b(week)(\\s*)(?5[0-3]|[1-4]\\d|0?[1-9])\\b' + WeekOfRegex = f'(de\\s+)?(week)\\s+(van(\\s+(de|het))?|(beginnend|die\\s+begint|startend|aanvangend)(\\s+op)?)' + MonthOfRegex = f'(maand)(\\s*)(van)' + MonthRegex = f'\\b(?(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)\\b|(jan|feb|mar|mrt|apr|jun|jul|aug|sept|sep|oct|okt|nov|dec)(?:\\.|\\b))' + DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|{TwoDigitYearRegex})' + YearSuffix = f'((,|\\s*van)?\\s*({DateYearRegex}|{FullTextYearRegex}))' + OnRegex = f'(?<=\\bop\\s+)({DayRegex})\\b(?!(\\.|:)\\d+)' + RelaxedOnRegex = f'\\b(?<=op\\s+)(?:de\\s+)?(?(?:3[0-1]|[1-2]\\d|0?[1-9]))(?:\\s*(ste|de|e))?\\b(?!(\\.|:)\\d+)' + PrefixWeekDayRegex = f'(\\s*((,?\\s*op)|[-—–]))' + ThisRegex = f'\\b((deze(\\s+week{PrefixWeekDayRegex}?)?\\s*){WeekDayRegex})|({WeekDayRegex}((\\s+van)?\\s*deze\\s+week))\\b' + LastDateRegex = f'\\b({PreviousPrefixRegex}(\\s*week{PrefixWeekDayRegex}?)?\\s+{WeekDayRegex})|({WeekDayRegex}(\\s+van)?(\\s+vorige\\s+week))\\b' + WeekDayForNextDateRegex = f'\\b(?((ma|di(ns)?|wo(e(ns)?)?|do|vr(ij)?|za(t)?|zo)(\\.|\\b))|((?:maan(?!den)|dins|woens|donder|vrij|zater|zon)(dag)?))' + NextDateRegex1 = f'\\b({NextPrefixRegex}(\\s*week{PrefixWeekDayRegex}?)?\\s+{WeekDayForNextDateRegex}|(op\\s+)?{WeekDayForNextDateRegex}\\s+((van\\s+)?(de\\s+)?{NextPrefixRegex})\\s*week|(op\\s+)?{NextPrefixRegex}\\s*week\\s+{WeekDayForNextDateRegex})' + NextDateRegex2 = f'\\b({NextPrefixRegex}(\\s*week(\\s*,?\\s*op)?)?\\s+{WeekDayRegex}|(op\\s+)?{WeekDayRegex}\\s+((van\\s+)?(de\\s+)?{NextPrefixRegex})\\s*week|(op\\s+)?{NextPrefixRegex}\\s*week\\s+{WeekDayRegex})' + NextDateRegex = f'({NextDateRegex1}|{NextDateRegex2})' + SpecialDayRegex = f'\\b(eergisteren|overmorgen|(de\\s+)?dag\\s+na\\s+morgen|(de\\s+)?dag\\s+(ervoor|erna)|((de\\s+)?({StrictRelativeRegex}|mijn)\\s+dag)\\b|(de\\s+dag(?!\\s+van))|gisteren|(deze\\s+)?morgen|vandaag|morgen(middag))(?!s\\b)' + SpecialDayWithNumRegex = f'\\b((?{WrittenNumRegex})\\s+dag(en)?\\s+(gerekend\\s+)?(vanaf\\s+)(?gisteren|morgen|vandaag))\\b' + RelativeDayRegex = f'\\b(((de\\s+)?{RelativeRegex}\\s+dag))\\b' + SetWeekDayRegex = f'\\b(?op\\s+({{ArticleRegex}}\\s+)?)?(?morgen|ochtend|middag|avond|nacht|zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)((?e)n)\\b' + WeekDayOfMonthRegex = f'(?((de\\s+|\\b))?(?eerste|tweede|derde|vierde|vijfde|zesde|tiende|1e|1ste|2e|2de|3e|3de|4e|4de|5e|5de|laatste)\\s+{WeekDayRegex}(\\s+{MonthSuffixRegex}))' + RelativeWeekDayRegex = f'\\b({WrittenNumRegex}\\s+{WeekDayRegex}\\s+(vanaf\\s+nu|later))\\b' + SpecialDate = f'(?=\\b(op\\s+)(de\\s+)?){DayRegex}\\b' + DatePreposition = f'\\b(op(\\s+de)?)' + DateExtractorYearTermRegex = f'(\\s+(van\\s+)?|\\s*[,./-]\\s*){DateYearRegex}' + DateExtractor1 = f'\\b({WeekDayRegex}\\s*[,-]?\\s*)?(({MonthRegex}(\\.)?\\s*[/\\\\.,-]?\\s*{DayRegex}(?!\\s*({MonthRegex}|\\-\\s*\\d{{2}}\\b)))|(\\({MonthRegex}\\s*[-.]\\s*{DayRegex}\\))|({DayRegex}(\\.)?\\s*[/\\\\.,-]?\\s*{MonthRegex}))(\\s*\\(\\s*{WeekDayRegex}\\s*\\))?({DateExtractorYearTermRegex}(?!\\s*{MonthRegex})\\b)?' + DateExtractor3 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*)?(de\\s+)?)?(({DayRegex}(\\s*dag|\\.)?)((\\s+|\\s*[,/-]\\s*|\\s+van\\s+)?{MonthRegex})((\\.)?(\\s+|\\s*[,/-]\\s*|\\s+in\\s+)?{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\\s*[,./-]?\\s*(de\\s*)?(?(?:3[0-1]|[1-2]\\d|0?[1-9]))(?:\\s*(ste|de|e))?(\\s*dag|\\.)?\\s*[,./-]?\\s*{MonthRegex})\\b' + DateExtractor4 = f'\\b{MonthNumRegex}\\s*[/\\\\\\-]\\s*{DayRegex}[\\.]?\\s*[/\\\\\\-]\\s*{ApostrofRegex}?{DateYearRegex}' + DateExtractor5 = f'\\b{DayRegex}\\s*[/\\\\\\-\\.]\\s*({MonthNumRegex}|{MonthRegex})\\s*[/\\\\\\-\\.]\\s*{DateYearRegex}(?!\\s*[/\\\\\\-\\.]\\s*\\d+)' + DateExtractor6 = f'(?<={DatePreposition}\\s+)({StrictRelativeRegex}\\s+)?({WeekDayRegex}\\s+)?{MonthNumRegex}[\\.]{DayRegex}(?!([%]|\\s*{FullDescRegex}))\\b|(?<={DatePreposition}\\s+){MonthNumRegex}[\\-\\.]{DayRegex}(?!([%]|\\s*{FullDescRegex}))\\b' + DateExtractor7L = f'\\b({WeekDayRegex}\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\\b' + DateExtractor7S = f'\\b((?<=(^|{DatePreposition}\\s+)){WeekDayRegex}\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{BaseDateTime.CheckDecimalRegex}(?!([%]|\\s*{FullDescRegex}))\\b' + DateExtractor8 = f'\\b((?<=(^|{DatePreposition}\\s+)){WeekDayRegex}\\s+)?(?(?:3[0-1]|[1-2]\\d|0?[1-9]))(?:\\s*(ste|de|e))?|{DayRegex}\\s*[/\\\\\\-\\.]\\s*{BaseDateTime.FourDigitYearRegex}\\s*[/\\\\\\-\\.]\\s*{MonthRegex})' + OfMonth = f'(^\\s*((van|in)\\s+)?)({MonthRegex})' + MonthEnd = f'{MonthRegex}(\\s+de\\s*)?$' + WeekDayEnd = f'(deze\\s+)?{WeekDayRegex}\\s*,?\\s*$' + WeekDayStart = f'^\\s+(op\\s+)?{WeekDayRegex}\\b' + RangeUnitRegex = f'\\b(?ja(ren|ar)|maand(en)?|we(ken|ek)|dag(en)?)\\b' + HourNumRegex = f'\\b(?nul|een|één|twee|drie|vier|vijf|zes|zeven|acht|negen|tien|elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien|twintig|eenentwintig|éénentwintig|tweeentwintig|tweeëntwintig|drieëntwintig|vierentwintig)\\b' + MinuteNumRegex = f'(?nul|een(?=\\s+min(uut)?)|één|twee|drie|vier|vijf|zes|zeven|acht|negen|tien|elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien|twintig|eenentwintig|éénentwintig|tweeentwintig|tweeëntwintig|drieëntwintig|vierentwintig|vij[fv]entwintig|ze(s|ven)entwintig|achtentwintig|negenentwintig|dertig|eenendertig|tweeëndertig|drieëndertig|vierendertig|vijfendertig|ze(s|ven)endertig|achtendertig|negenendertig|veertig|eenenveertig|tweeënveertig|drieënveertig|vierenveertig|vijfenveertig|ze(s|ven)enveertig|achtenveertig|negenenveertig|eenenvijftig|vijftig|tweeënvijftig|drieënvijftig|vierenvijftig|vijfenvijftig|ze(s|ven)envijftig|achtenvijftig|negenenvijftig)' + DeltaMinuteNumRegex = f'(?nul|een(?=\\s+min(uut)?)|één|twee|drie|vier|vijf|zes|zeven|acht|negen|tien|elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien|twintig|eenentwintig|éénentwintig|tweeentwintig|tweeëntwintig|drieëntwintig|vierentwintig|vijfentwintig|vijventwintig|zesentwintig|zevenentwintig|achtentwintig|negenentwintig|dertig|eenendertig|tweeëndertig|drieëndertig|vierendertig|vijfendertig|zesendertig|zevenendertig|achtendertig|negenendertig|veertig|eenenveertig|tweeënveertig|drieënveertig|vierenveertig|vijfenveertig|zesenveertig|zevenenveertig|achtenveertig|negenenveertig|eenenvijftig|vijftig|tweeënvijftig|drieënvijftig|vierenvijftig|vijfenvijftig|zesenvijftig|zevenenvijftig|achtenvijftig|negenenvijftig)(?=\\b)' + LunchRegex = f'\\b(lunchtijd)\\b' + NightRegex = f'\\b((({ApostrofsRegex}|des)\\s+)?nachts|(midder)?nacht)\\b' + CommonDatePrefixRegex = f'^[\\.]' + LessThanOneHour = f'(?((een\\s+)?((drie\\s+)?kwart(ier)?|half(uur)?))|{BaseDateTime.DeltaMinuteRegex}(\\s+(minuten|mins|min\\.?))?|({DeltaMinuteNumRegex}(\\s+(minuten|mins|min\\.?))?))' + WrittenTimeRegex = f'(?({HourNumRegex}\\s+{MinuteNumRegex}|(?half)\\s+({HourNumRegex})))' + TimePrefix = f'(?(half|{LessThanOneHour}\\s+(over|voor|na)(\\s+half)?)|(uur\\s+{LessThanOneHour}))' + TimeSuffix = f'(?(({OclockRegex}\\s+)?({AmRegex}|{PmRegex}))|{OclockRegex})' + TimeSuffixFull = f'(?(({OclockRegex}\\s+)?({AmRegex}|{PmRegexFull}))|{OclockRegex})' + HourDTRegEx = f'({BaseDateTime.HourRegex})' + MinuteDTRegEx = f'({BaseDateTime.MinuteRegex})' + SecondDTRegEx = f'({BaseDateTime.SecondRegex})' + BasicTime = f'\\b(?{WrittenTimeRegex}|{HourNumRegex}|{HourDTRegEx}(:|\\.){MinuteDTRegEx}(:{SecondDTRegEx})?|((?half)\\s+)?{HourDTRegEx}(?![.,:]?[%\\d]))' + MidnightRegex = f'(?mid\\s*(-\\s*)?nacht|middernacht|(in\\s+)?de nacht(\\s+van)?|({ApostrofsRegex}|des)\\s*nachts)' + MidmorningRegex = f'(?mid\\s*(-\\s*)?(morgen|ochtend)|halverwege de ochtend|het midden van de ochtend)' + MidafternoonRegex = f'(?mid\\s*(-\\s*)?middag|halverwege de middag|het midden van de middag)' + MiddayRegex = f'(?(?({MidnightRegex}|{MidmorningRegex}|{MidafternoonRegex}|{MiddayRegex}))' + AtRegex = f'(((?<=\\bom\\s+)({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}(?!\\.\\d)(\\s*((?a)|(?p)))?|{MidTimeRegex}))|{MidTimeRegex})\\b' + IshRegex = f'\\b(tegen\\s+{BaseDateTime.HourRegex}(-|——|\\s*{ApostrofRegex}\\s*)?en|middagloos)\\b' + TimeUnitRegex = f'([^A-Za-z]{{1,}}|\\b)(?(min\\.|sec\\.)|(u(ur)?|minuut|seconde|(?uren|minuten|seconde[ns])|(min|sec)(?s)?)\\b)' + RestrictedTimeUnitRegex = f'(?uur|minuut)\\b' + FivesRegex = f'(?(vijf|tien|vijftien|twintig|vijfentwintig|vijventwintig|dertig|vijfendertig|veertig|vijfenveertig|vijftig|vijfenvijftig))\\b' + HourRegex = f'\\b{BaseDateTime.HourRegex}' + PeriodHourNumRegex = f'\\b(?nul|een|één|twee|drie|vier|vijf(en)?|zes|zeven|acht|negen|tien|elf|elven|twaalf|dertien|veertien|vijftien|zestien|zeventien|achttien|negentien|twintig|eenentwintig|éénentwintig|tweeentwintig|tweeëntwintig|drieëntwintig|vierentwintig)\\b?' + ConnectNumRegex = f'\\b{BaseDateTime.HourRegex}(?00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59)\\s*{DescRegex}' + AroundRegex = f'(\\b(rond(om)?|ongeveer(\\s+om)?)\\s*\\b)' + TimeRegexWithDotConnector = f'({BaseDateTime.HourRegex}(\\s*\\.\\s*){BaseDateTime.MinuteRegex}(\\s*:\\s*{BaseDateTime.SecondRegex})?(\\s*u\\s*)?)' + TimeRegexFilter = f'\\b((iedere|elke|op)(\\s+andere)?\\s+)?(week|dag|{SingleWeekDayRegex}|vandaag)\\b' + TimeRegex1 = f'\\b(({TimePrefix}|{AroundRegex})\\s+)?(({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex})(\\s*{DescRegex})|(({AroundRegex})\\s+){HourNumRegex}(?!\\s+{SingleWeekDayRegex})\\b)' + TimeRegex2 = f'(\\b{TimePrefix}\\s+)?(t)?{BaseDateTime.HourRegex}(\\s*)?(:|\\.)(\\s*)?(?[0-5]\\d)(?!(\\d|\\s*(per|pro)\\s*cent|%))((\\s*)?:(\\s*)?{BaseDateTime.SecondRegex})?(\\s*u)?((\\s*{DescRegex})|\\b)' + TimeRegex3 = f'(\\b{TimePrefix}\\s+)?{BaseDateTime.HourRegex}\\.{BaseDateTime.MinuteRegex}(\\s*{DescRegex})' + TimeRegex4 = f'\\b{TimePrefix}\\s+{BasicTime}(\\s*{DescRegex})?\\s+{TimeSuffix}\\b' + TimeRegex5 = f'\\b({TimePrefix}\\s+{BasicTime}|{BasicTime}\\s+{TimePrefix})((\\s*({DescRegex}|{TimeSuffix}))|\\b)' + TimeRegex6 = f'{BasicTime}(\\s*u\\s*)?(\\s*{DescRegex})?\\s+{TimeSuffix}\\b' + TimeRegex7 = f'({TimeSuffixFull}\\s+(om\\s+)?({TimePrefix}\\s+)?(?({PmRegex}|{AmRegex}|{DescRegex})))?\\s*{TillRegex}\\s*({HourDTRegEx}|{PeriodHourNumRegex})(?\\s*({PmRegex}|{AmRegex}|{DescRegex}))?' + PureNumFromToPrefix = f'(({PmRegexFull}|{AmRegex})\\s+)?({RangePrefixRegex}\\s+)({HourDTRegEx}|{PeriodHourNumRegex})(\\s+uur)?(\\s*(?({PmRegex}|{AmRegex}|{DescRegex})))?\\s*{RangeConnectorRegex}\\s*({HourDTRegEx}|{PeriodHourNumRegex})(\\s+uur)?(?\\s*({PmRegex}|{AmRegex}|{DescRegex}))?' + PureNumFromToWithDateBefore = f'({RangePrefixRegex}\\s+)({HourDTRegEx})(\\s+(vandaag|morgen)\\s+)?(\\s*{RangeConnectorRegex}\\s*)({HourDTRegEx})' + PureNumFromToWithDateAfter = f'({RangePrefixRegex}\\s+)({HourDTRegEx})(\\s*{RangeConnectorRegex}\\s*)({HourDTRegEx}(\\s+(vandaag|morgen))?)' + PureNumFromTo = f'({PureNumFromToPrefix}|{PureNumFromToPrefixExcluded})' + TimeDateFromTo = f'({PureNumFromToWithDateAfter}|{PureNumFromToWithDateBefore})' + PureNumBetweenAnd = f'(tussen\\s+)({HourDTRegEx}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?\\s*{RangeConnectorRegex}\\s*({HourDTRegEx}|{PeriodHourNumRegex})(?\\s*({PmRegex}|{AmRegex}|{DescRegex}))?' + SpecificTimeFromTo = f'(({PmRegexFull}|{AmRegex})\\s+)?({RangePrefixRegex}\\s+)?(?({TimeRegex2}|({HourDTRegEx}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?))\\s*{TillRegex}\\s*(?({TimeRegex2}|({HourDTRegEx}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?))' + SpecificTimeBetweenAnd = f'(({PmRegexFull}|{AmRegex})\\s+)?(tussen\\s+)(?({TimeRegex2}|({HourDTRegEx}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?))\\s*{RangeConnectorRegex}\\s*(?({TimeRegex2}|({HourDTRegEx}|{PeriodHourNumRegex})(\\s*(?{DescRegex}))?(\\s+{TimeSuffix})?))' + PrepositionRegex = f'(?^(om|rond|tegen|op|van|deze)(\\s+de)?$)' + MealTimeRegex = f'\\b((((tijdens\\s+)?de|het)\\s+)?(?ontbijt|lunch|avondeten)|((om|tegen|tijdens)\\s+)?(?lunchtijd))\\b' + EarlyLateRegex = f'\\b(((?vroege?|(in\\s+het\\s+)?(begin))|(?laat|later|late|aan\\s+het\\s+einde?))((\\s+|-)(in\\s+de|op\\s+de|van\\s+de|deze|in|op|van|de))?)' + TimeOfDayRegex = f'(?(({EarlyLateRegex}\\s+)(aanstaande\\s+)?(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)\\s*(ochtend|morgen|(na)?middag|avond|nacht))|(((van\\s+deze\\s+)|\\b(in\\s+(de)?\\s+)|de\\s+)?({EarlyLateRegex}\\s+)?({ApostrofsRegex}\\s+)?(ochtend(en)?|morgen|middag(en)?|avond(en)?|nacht(\\s+van)?)s?((\\s+|-)({EarlyLateRegex}))?)|{MealTimeRegex}|((tijdens\\s+(de\\s+)?)?(kantoor|werk)uren))\\b' + SpecificTimeOfDayRegex = f'\\b((({StrictRelativeRegex}\\s+{TimeOfDayRegex})\\b|\\bvan(ochtend|morgen|middag|avond|nacht)))s?\\b' + TimeFollowedUnit = f'^\\s*{TimeUnitRegex}' + TimeNumberCombinedWithUnit = f'\\b(?\\d+(\\.\\d*)?){TimeUnitRegex}' + BusinessHourSplitStrings = [r'werk', r'uren'] + BusinessHourSplitStrings2 = [r'kantoor', r'uren'] + NowRegex = f'(?nu(\\s+meteen)?|zo snel mogelijk|zo spoedig mogelijk|asap|recent|onlangs|zojuist)\\b' + SuffixRegex = f'^\\s*(in de\\s+)?(vroege\\s+|late\\s+)?(ochtend|(na)?middag|avond|nacht)\\b' + DateTimeTimeOfDayRegex = f'\\b(?morgen|ochtend|(na)?middag|avond|nacht)\\b' + DateTimeSpecificTimeOfDayRegex = f'\\b(({RelativeRegex}\\s+{DateTimeTimeOfDayRegex})|van(nacht|avond|middag|ochtend|morgen))\\b' + TimeOfTodayAfterRegex = f'^\\s*(,\\s*)?((in\\s+de)|(op\\s+de))?{DateTimeSpecificTimeOfDayRegex}' + TimeOfTodayBeforeRegex = f'{DateTimeSpecificTimeOfDayRegex}(\\s*,)?(\\s+(om|rond|tegen|op\\s+de|op))?\\s*$' + NonTimeContextTokens = f'\\b(gebouw)' + SimpleTimeOfTodayAfterRegex = f'(?ochtend|(na)?middag|avond|nacht))\\b' + PeriodSpecificTimeOfDayRegex = f'\\b(({StrictRelativeRegex}(\\s+)?{PeriodTimeOfDayRegex})\\b|\\bvan(nacht|avond|(na)?middag|ochtend))\\b' + PeriodTimeOfDayWithDateRegex = f'(({TimeOfDayRegex}(\\s+(om|rond|van|tegen|op(\\s+de)?))?))\\b' + PeriodTimeOfDayWithDateRegexWithAnchors = f'((({TimeOfDayRegex}(\\s+(om|rond|van|tegen|op(\\s+de)?))?))(?=({MiddlePauseRegex})?\\s*$)|(?<=^\\s*({MiddlePauseRegex})?)(?!{MealTimeRegex}){TimeOfDayRegex})' + LessThanRegex = f'\\b((binnen\\s+)?minder\\s+dan)\\b' + MoreThanRegex = f'\\b((meer|langer)\\s+dan|ruim)\\b' + DurationUnitRegex = f'(?{DateUnitRegex}|(min\\.|sec\\.)|((?halfuur)|(?kwartier\\s+uur)|(?kwartier)|uur|uren|u|minuten|minuut|m(ins?)?|seconde[ns]?|s(ecs?)?|nacht(en)?)\\b)(\\s+lang\\b)?' + SuffixAndRegex = f'(?\\s+(en|ën)(\\s*een)?\\s*(?hal(f|ve)|kwart|kwartier)|(?(een\\s+)?kwartier))' + PeriodicRegex = f'\\b(?dagelijkse?|(drie)?maandelijkse?|wekelijkse?|twee-?wekelijkse?|(half)?jaarlijkse?|kwartaal)\\b' + EachUnitRegex = f'(?((iedere?|elke?|eenmaal per)(?\\s+andere)?\\s*({DurationUnitRegex}|(?weekend(en)?))|({DurationUnitRegex}|{WeekDayRegex})\\s+om(\\s+de)?(?\\s+andere)?\\s*(week|{DurationUnitRegex})))' + EachPrefixRegex = f'\\b(?(iedere|elke|eenmaal per)\\s*$)' + SetEachRegex = f'\\b(?(iedere|elke|om\\s+de)\\s*(?\\s+andere)?\\s*(week\\s*(?={WeekDayRegex}))?)' + SetLastRegex = f'(?volgende?|komende|aankomende|aanstaande|deze|huidige|aanstaande|vorige?|verleden|laatste)' + EachDayRegex = f'^\\s*(iedere|elke)\\s*dag\\b' + BeforeEachDayRegex = f'(iedere|elke)\\s*dag\\s*' + DurationFollowedUnit = f'^\\s*((?(?(?(een\\s+)?kwartier)))|{SuffixAndRegex}?(\\s+|-)?{DurationUnitRegex})' + NumberCombinedWithDurationUnit = f'\\b(?\\d+([.,:]\\d*)?)(-)?{DurationUnitRegex}' + AnUnitRegex = f'\\b((((nog een|een|nog)\\s+(?anderhalf|anderhalve|half|halve)?))|andere)\\s*{DurationUnitRegex}' + DuringRegex = f'\\b(voor\\s+een|gedurende\\s+(het|de))\\s+(?jaar|maand|week|dag)\\b' + AllRegex = f'\\b(?((de|het|een)\\s+)?((ge)?hele|volledige|ganse|heel|volledig|volle)(\\s+|-)(?jaar|maand|week|dag))\\b' + HalfRegex = f'(((een)\\s*)|\\b)(?(half|halve)\\s+(?jaar|maand|week|dag|uur|halfuur)|(?halfuur))\\b' + ConjunctionRegex = f'\\b((en(\\s+voor)?)|plus)\\b' + HolidayList1 = f'(?goede vrijdag|pasen|((eerste|tweede)\\s+)?paasdag|paas(zondag|maandag)|kerst(avond|mis)?|thanksgiving|halloween|(islamitisch\\s+)?nieuwjaar|oud en nieuw|oud & nieuw|pinksteren|oude?jaar|oude?jaarsavond|silvester|silvesteravond|sinterklaas|sinterklaasfeest|sinterklaasavond|pakjesavond|eid al(-|\\s+)fitr|eid al(-|\\s+)adha|juneteenth|vrijheidsdag|jubilee\\s+day)' + HolidayList2 = f'(?black friday|cyber monday|nationale dodenherdenking|nationale herdenking|dodenherdenking|dag\\s+van\\s+de\\s+(leraar|leerkracht(en)?|arbeid|aarde)|feest\\s+van\\s+de\\s+arbeid|yuandan|valentijn|sint-maartensfeest|sint-maarten|driekoningen|keti(\\s+|-)?koti|ramadan|suikerfeest|offerfeest|allerheiligen|allerheiligenavond|franse nationale feestdag|bestorming van de bastille)' + HolidayList3 = f'(?(martin luther king|mlk|dankzeggings|valentijns|nieuwjaars|(eerste|1e|tweede|2e)\\s+paas|prinsjes|konings|koninginne|bevrijdings|hemelvaarts|(eerste|1e|tweede|2e)\\s+kerst|vader|moeder|meisjes|(amerikaanse|us\\s+)?onafhankelijk(heid)?s|(nederlandse\\s+)?veteranen|boomplant|(nationale\\s+)?boomfeest)dag)' + HolidayRegex = f'\\b(({StrictRelativeRegex}\\s+({HolidayList1}|{HolidayList2}|{HolidayList3}))|(({HolidayList1}|{HolidayList2}|{HolidayList3})(\\s+(van\\s+)?({YearRegex}|{RelativeRegex}\\s+jaar))?))\\b' + AMTimeRegex = f'(?{ApostrofsRegex}\\s*(morgens|ochtends)|in\\s+de\\s+(morgen|ochtend))' + PMTimeRegex = f'(?{ApostrofsRegex}\\s*(middags|avonds|nachts)|(in\\s+de\\s+)?(deze\\s+)?((na)?middag|avond|nacht))\\b' + MorningTimeRegex = f'(morgens?|ochtends?)' + NightTimeRegex = f'(nacht)' + NowTimeRegex = f'\\b(nu)\\b' + RecentlyTimeRegex = f'\\b(kort\\s+geleden|eerder)\\b' + AsapTimeRegex = f'\\b(zo\\s+snel\\s+mogelijk|zsm)\\b' + InclusiveModPrepositions = f'(?((in|tegen|tijdens|op|om)\\s+of\\s+)|(\\s+of\\s+(in|tegen|tijdens|op)))' + AfterRegex = f'(\\b{InclusiveModPrepositions}?((na(\\s+afloop\\s+van)?|(?>=)|>)' + BeforeRegex = f'(\\b(?(al\\s+)?zo\\s+laat\\s+als)){InclusiveModPrepositions}?\\b\\s*)|(?)((?<=)|<)' + SinceRegex = f'(\\b(sinds|na\\s+of\\s+gelijk\\s+aan|(startend|beginnend)\\s+(vanaf|op|met)|(al\\s+)?zo\\s+vroeg\\s+als|(elk|ieder)\\s+moment\\s+vanaf|een\\s+tijdstip\\s+vanaf)\\b\\s*)|(?=)' + AgoRegex = f'\\b(geleden|(voor|eerder\\s+dan)\\s+(?gisteren|vandaag))\\b' + LaterRegex = f'\\b(later|vanaf\\s+nu|(vanaf|na|sedert)\\s+(?morgen|vandaag))\\b' + BeforeAfterRegex = f'\\b(gerekend\\s+)?((?voor(dat)?)|(?van(af)?|na))\\b' + ModPrefixRegex = f'\\b({RelativeRegex}|{AroundRegex}|{BeforeRegex}|{AfterRegex}|{SinceRegex})\\b' + ModSuffixRegex = f'\\b({AgoRegex}|{LaterRegex}|{BeforeAfterRegex}|{FutureSuffixRegex}|{PastSuffixRegex})\\b' + InConnectorRegex = f'\\b(in|over|na)(\\s+de)?\\b' + SinceYearSuffixRegex = f'(^\\s*{SinceRegex}((vanaf|sedert|sinds)\\s+(het\\s+)?jaar\\s+)?{YearSuffix})' + WithinNextPrefixRegex = f'\\b((binnen)(\\s+de|het)?(\\s+(?{NextPrefixRegex}))?)\\b' + TodayNowRegex = f'\\b(vandaag|nu)\\b' + MorningStartEndRegex = f'(^(({ApostrofsRegex}|des)\\s+(morgens|ochtends)|in\\s+de\\s+(na)?(morgen|ochtend)|deze\\s+(morgen|ochtend)|(morgen|ochtend)\\s+in\\s+het\\s+begin|aan\\s+het\\s+einde?(\\s+van(\\s+de)?)?\\s+(morgen|ochtend)|{AmDescRegex}|(morgen|ochtend)))|((({ApostrofsRegex}|des)\\s+(morgens|ochtends)|deze\\s+(morgen|ochtend)|in\\s+de\\s+(na)?(morgen|ochtend)|(morgen|ochtend)\\s+in\\s+het\\s+begin|(morgen|ochtend)\\s+aan\\s+het\\s+einde?|{AmDescRegex}|(morgen|ochtend))$)' + AfternoonStartEndRegex = f'(^(({ApostrofsRegex}|des)\\s+middags|in\\s+de\\s+(na)?middag|deze\\s+middag|aan\\s+het\\s+einde?(\\s+van(\\s+de)?)?\\s+middag|{PmDescRegex}))|((({ApostrofsRegex}|des)?\\s+middags|in\\s+de\\s+(na)?middag|deze\\s+middag|middag\\s+in\\s+het\\s+begin|middag\\s+aan\\s+het\\s+einde?|{PmDescRegex}|middag)$)' + EveningStartEndRegex = f'(^(({ApostrofsRegex}|des)\\s+avonds|in\\s+de\\s+(na)?avond|deze\\s+avond|avond\\s+in\\s+het\\s+begin|aan\\s+het\\s+einde?(\\s+van(\\s+de)?)?\\s+avond|{PmDescRegex}|avond))|((({ApostrofsRegex}|des)?\\s+avonds|deze\\s+avond|in\\s+de\\s+(na)?avond|avond\\s+in\\s+het\\s+begin|avond\\s+aan\\s+het\\s+einde?|{PmDescRegex}|avond)$)' + NightStartEndRegex = f'(^(gedurende de nacht|vannacht|nacht|({ApostrofsRegex}|des)?\\s+nachts))|((gedurende\\s+de\\s+nacht|vannacht|({ApostrofsRegex}|des)?\\s+nachts|nacht\\s+in\\s+het\\s+begin|nacht)$)' + InexactNumberRegex = f'\\b((een\\s+)?aantal|meerdere|enkele|verscheidene|wat|enige|(?(een\\s+)?paar))\\b' + InexactNumberUnitRegex = f'({InexactNumberRegex})\\s+({DurationUnitRegex})' + RelativeTimeUnitRegex = f'((({NextPrefixRegex}|{PreviousPrefixRegex}|{ThisPrefixRegex})\\s+({TimeUnitRegex}))|((de|het|mijn))\\s+({RestrictedTimeUnitRegex}))' + RelativeDurationUnitRegex = f'(((?<=({NextPrefixRegex}|{PreviousPrefixRegex}|{ThisPrefixRegex})\\s+)({DurationUnitRegex}))|((the|my))\\s+({RestrictedTimeUnitRegex}))' + ReferenceDatePeriodRegex = f'\\b{ReferencePrefixRegex}\\s+(?week|maand|jaar|decennium|weekend)\\b' + ConnectorRegex = f'^(-|,|voor|t|rond(om)?|@)$' + FromToRegex = f'\\b(van(af)?).+(tot)\\b.+' + SingleAmbiguousMonthRegex = f'^(de\\s+)?(mei)$' + SingleAmbiguousTermsRegex = f'^(de\\s+)?(dag|week|maand|jaar)$' + UnspecificDatePeriodRegex = f'^(week|weekend|maand|jaar)$' + PrepositionSuffixRegex = f'\\b((op|in)(\\s+de)?|om|rond(om)?|van|tot)$' + FlexibleDayRegex = f'(?([A-Za-zë]+\\s+)?[A-Za-zë\\d]+?\\s*(ste|de|e))' + ForTheRegex = f'\\b((((?<=voor\\s+)de\\s+{FlexibleDayRegex})|((?<=op\\s+)de\\s+{FlexibleDayRegex}(?<=(ste|de|e))))(?(\\s+(tussen|binnen|terug|tegen|aan|uit|mee|bij|vol|uit|aan|op|in|na|af)\\s*)?(\\s+(ge\\w\\w\\w+|\\w\\w\\w+en)\\s*)?(,|\\.|!|\\?|$)))' + WeekDayAndDayOfMonthRegex = f'\\b{WeekDayRegex}\\s+(de\\s+{FlexibleDayRegex})\\b' + WeekDayAndDayRegex = f'\\b{WeekDayRegex}\\s+{DayRegex}(?!([-]|:\\d+|\\.\\d+|(\\s+({AmDescRegex}|{PmDescRegex}|{OclockRegex}))))\\b' + RestOfDateRegex = f'\\brest\\s+(van\\s+)?((de|het|mijn|dit|deze|(de\\s+)?huidige)\\s+)?(?week|maand|jaar|decennium)\\b' + RestOfDateTimeRegex = f'\\brest\\s+(van\\s+)?((de|het|mijn|dit|deze|(de\\s+)?huidige)\\s+)?(?vandaag|dag)\\b' + AmbiguousRangeModifierPrefix = f'(voor)' + PotentialAmbiguousRangeRegex = f'\\b{AmbiguousRangeModifierPrefix}(?!\\s+het\\s+(einde?|begin(nen)?))(.+\\b(boven|later|groter|erna|daarna|hoger|(?{BaseDateTime.RangeConnectorSymbolRegex}))\\b)' + NumberEndingPattern = f'^(\\s+((?vergadering|afspraak|conferentie|telefoontje|skype-gesprek)\\s+)?(om|naar)\\s+(?{PeriodHourNumRegex}|{HourRegex})((\\.)?$|(\\.,|,|!|\\?)))' + OneOnOneRegex = f'\\b(1\\s*:\\s*1)|(één\\s+(op\\s)één|één\\s*-\\s*één|één\\s*:\\s*één)\\b' + LaterEarlyPeriodRegex = f'\\b({PrefixPeriodRegex})\\s*\\b\\s*(?{OneWordPeriodRegex}|(?{BaseDateTime.FourDigitYearRegex}))\\b' + WeekWithWeekDayRangeRegex = f'\\b((?({NextPrefixRegex}|{PreviousPrefixRegex}|deze)\\s+week)((\\s+tussen\\s+{WeekDayRegex}\\s+en\\s+{WeekDayRegex})|(\\s+van\\s+{WeekDayRegex}\\s+tot\\s+{WeekDayRegex})))\\b' + GeneralEndingRegex = f'^\\s*((\\.,)|\\.|,|!|\\?)?\\s*$' + DurationConnectorRegex = f'^\\s*(?\\s+|en|,)\\s*$' + PrefixArticleRegex = f'\\bde\\s+' + OrRegex = f'\\s*((\\b|,\\s*)(of|en)\\b|,)\\s*' + YearPlusNumberRegex = f'\\b(jaar\\s+((?(\\d{{3,4}}))|{FullTextYearRegex}))\\b' + NumberAsTimeRegex = f'\\b({WrittenTimeRegex}|{PeriodHourNumRegex}|{BaseDateTime.HourRegex})\\b' + TimeBeforeAfterRegex = f'\\b(((?<=\\b(voor|niet later dan|na|door)\\s+)({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}|{MidTimeRegex}))|{MidTimeRegex})\\b' + DateNumberConnectorRegex = f'^\\s*(?\\s+om)\\s*$' + DecadeRegex = f'(?(nul|tien|twintig|dertig|veertig|vijftig|zestig|zeventig|tachtig|negentig)|(fifties|sixties|seventies|eighties|nineties|zeroes|tens|tweeduizend|(ee|éé)nentwintigste\\s+eeuw))' + DecadeWithCenturyRegex = f'\\b(de\\s+)?(jaren\\s+)?((?1\\d|2\\d|\\d)?({ApostrofRegex})?(?\\d0)({ApostrofRegex})?s?)(?!%)\\b|(({CenturyRegex}(\\s+|-)?(en\\s+)?|(?<=\\b(de|jaren)\\s+)){DecadeRegex})|({CenturyRegex}(\\s+|-)?(en\\s+)?(?tien|honderd)))' + RelativeDecadeRegex = f'\\b(((de|het)\\s+)?{RelativeRegex}\\s+((?[\\w,]+)\\s+)?decenni(a|um)?)\\b' + SuffixAfterRegex = f'\\b(((bij)\\s)?(of|en)\\s+(boven|later|groter|erna|daarna|hoger)(?!\\s+dan))\\b' + DateAfterRegex = f'\\b((of|en)\\s+(hoger|later|groter)(?!\\s+dan))\\b' + YearPeriodRegex = f'((((van(af)?|tijdens|gedurende|in)\\s+)?{YearRegex}\\s*({TillRegex})\\s*{YearRegex})|(((tussen)\\s+){YearRegex}\\s*({RangeConnectorRegex})\\s*{YearRegex}))' + StartMiddleEndRegex = f'\\b((?(((de|het)\\s+)?(start|begin)\\s+van\\s+)?)(?((het\\s+)?midden\\s+van\\s+)?)(?((het\\s+)?einde?\\s+van\\s+)?))' + ComplexDatePeriodRegex = f'(((van(af)?|tijdens|gedurende|in(\\s+de)?)\\s+)?{StartMiddleEndRegex}(?.+)\\s*({TillRegex})\\s*{StartMiddleEndRegex}(?.+)|((tussen)\\s+){StartMiddleEndRegex}(?.+)\\s*({RangeConnectorRegex})\\s*{StartMiddleEndRegex}(?.+)|(?{WrittenMonthRegex})\\s+(?{WrittenMonthRegex}(\\s+|\\s*,\\s*){YearRegex}))' + ComplexTillRegex = f'({TillRegex}|{WrittenMonthRegex})' + UnitMap = dict([("millennium", "1000Y"), + ("eeuw", "100Y"), + ("centennium", "100Y"), + ("decennium", "10Y"), + ("decennia", "10Y"), + ("jaren", "Y"), + ("jaar", "Y"), + ("jr", "Y"), + ("maanden", "MON"), + ("maand", "MON"), + ("mnd", "MON"), + ("weken", "W"), + ("week", "W"), + ("weekend", "WE"), + ("weekenden", "WE"), + ("dagen", "D"), + ("dag", "D"), + ("werkdagen", "D"), + ("werkdag", "D"), + ("weekdagen", "D"), + ("weekdag", "D"), + ("vandaag", "D"), + ("dgn", "D"), + ("nachten", "D"), + ("nacht", "D"), + ("uren", "H"), + ("uur", "H"), + ("u", "H"), + ("minuten", "M"), + ("minuut", "M"), + ("min", "M"), + ("min.", "M"), + ("secondes", "S"), + ("seconden", "S"), + ("seconde", "S"), + ("secs", "S"), + ("sec", "S"), + ("kwartier", "H"), + ("kwartier uur", "H"), + ("halfuur", "H")]) + UnitValueMap = dict([("decennium", 315360000), + ("decennia", 315360000), + ("decenniën", 315360000), + ("jaren", 31536000), + ("jaar", 31536000), + ("jr", 31536000), + ("maanden", 2592000), + ("maand", 2592000), + ("mnd", 2592000), + ("weken", 604800), + ("week", 604800), + ("weekenden", 172800), + ("weekend", 172800), + ("dagen", 86400), + ("dag", 86400), + ("vandaag", 86400), + ("dgn", 86400), + ("nachten", 86400), + ("nacht", 86400), + ("werkdagen", 86400), + ("werkdag", 86400), + ("weekdagen", 86400), + ("weekdag", 86400), + ("uren", 3600), + ("uur", 3600), + ("u", 3600), + ("minuten", 60), + ("minuut", 60), + ("min", 60), + ("min.", 60), + ("secondes", 1), + ("seconden", 1), + ("seconde", 1), + ("secs", 1), + ("sec", 1), + ("kwartier", 3600), + ("kwartier uur", 3600), + ("halfuur", 3600)]) + SpecialYearPrefixesMap = dict([("", "")]) + SeasonMap = dict([("lente", "SP"), + ("zomer", "SU"), + ("herfst", "FA"), + ("winter", "WI")]) + SeasonValueMap = dict([("SP", 3), + ("SU", 6), + ("FA", 9), + ("WI", 12)]) + CardinalMap = dict([("eerste", 1), + ("1e", 1), + ("1ste", 1), + ("tweede", 2), + ("2e", 2), + ("2de", 2), + ("derde", 3), + ("3e", 3), + ("3de", 3), + ("vierde", 4), + ("4e", 4), + ("4de", 4), + ("vijfde", 5), + ("5e", 5), + ("5de", 5)]) + DayOfWeek = dict([("maandag", 1), + ("dinsdag", 2), + ("woensdag", 3), + ("donderdag", 4), + ("vrijdag", 5), + ("zaterdag", 6), + ("zondag", 0), + ("zondagmiddag", 0), + ("maandagen", 1), + ("dinsdagen", 2), + ("woensdagen", 3), + ("donderdagen", 4), + ("vrijdagen", 5), + ("zaterdagen", 6), + ("zondagen", 0), + ("ma", 1), + ("ma.", 1), + ("dins", 2), + ("dins.", 2), + ("woens", 3), + ("woens.", 3), + ("di", 2), + ("di.", 2), + ("wo", 3), + ("wo.", 3), + ("woe", 3), + ("woe.", 3), + ("do", 4), + ("do.", 4), + ("vr", 5), + ("vr.", 5), + ("vrij", 5), + ("vrij.", 5), + ("za", 6), + ("za.", 6), + ("zat", 6), + ("zat.", 6), + ("zo", 0), + ("zo.", 0), + ("zon", 0), + ("zon.", 0), + ("monday", 1), + ("tuesday", 2), + ("wednesday", 3), + ("thursday", 4), + ("friday", 5), + ("saturday", 6), + ("sunday", 0), + ("mon", 1), + ("tue", 2), + ("tues", 2), + ("wed", 3), + ("wedn", 3), + ("weds", 3), + ("thu", 4), + ("thur", 4), + ("thurs", 4), + ("fri", 5), + ("sat", 6), + ("sun", 0)]) + MonthOfYear = dict([("januari", 1), + ("februari", 2), + ("maart", 3), + ("april", 4), + ("mei", 5), + ("juni", 6), + ("juli", 7), + ("augustus", 8), + ("september", 9), + ("oktober", 10), + ("november", 11), + ("december", 12), + ("jan", 1), + ("feb", 2), + ("mar", 3), + ("mrt", 3), + ("apr", 4), + ("jun", 6), + ("jul", 7), + ("aug", 8), + ("sep", 9), + ("sept", 9), + ("oct", 10), + ("okt", 10), + ("nov", 11), + ("dec", 12), + ("jan.", 1), + ("feb.", 2), + ("mar.", 3), + ("mrt.", 3), + ("apr.", 4), + ("jun.", 6), + ("jul.", 7), + ("aug.", 8), + ("sep.", 9), + ("sept.", 9), + ("oct.", 10), + ("okt.", 10), + ("nov.", 11), + ("dec.", 12), + ("1", 1), + ("2", 2), + ("3", 3), + ("4", 4), + ("5", 5), + ("6", 6), + ("7", 7), + ("8", 8), + ("9", 9), + ("10", 10), + ("11", 11), + ("12", 12), + ("01", 1), + ("02", 2), + ("03", 3), + ("04", 4), + ("05", 5), + ("06", 6), + ("07", 7), + ("08", 8), + ("09", 9)]) + Numbers = dict([("nul", 0), + ("een", 1), + ("één", 1), + ("twee", 2), + ("drie", 3), + ("vier", 4), + ("vijf", 5), + ("zes", 6), + ("zeven", 7), + ("acht", 8), + ("negen", 9), + ("tien", 10), + ("elf", 11), + ("elven", 11), + ("twaalf", 12), + ("dertien", 13), + ("veertien", 14), + ("vijftien", 15), + ("zestien", 16), + ("zeventien", 17), + ("achttien", 18), + ("negentien", 19), + ("twintig", 20), + ("eenentwintig", 21), + ("éénentwintig", 21), + ("tweeentwintig", 22), + ("tweeëntwintig", 22), + ("drieëntwintig", 23), + ("vierentwintig", 24), + ("vijfentwintig", 25), + ("vijventwintig", 25), + ("zesentwintig", 26), + ("zevenentwintig", 27), + ("achtentwintig", 28), + ("negenentwintig", 29), + ("dertig", 30), + ("eenendertig", 31), + ("tweeëndertig", 32), + ("drieëndertig", 33), + ("vierendertig", 34), + ("vijfendertig", 35), + ("zesendertig", 36), + ("zevenendertig", 37), + ("achtendertig", 38), + ("negenendertig", 39), + ("veertig", 40), + ("eenenveertig", 41), + ("tweeënveertig", 42), + ("drieënveertig", 43), + ("vierenveertig", 44), + ("vijfenveertig", 45), + ("zesenveertig", 46), + ("zevenenveertig", 47), + ("achtenveertig", 48), + ("negenenveertig", 49), + ("eenenvijftig", 50), + ("vijftig", 51), + ("tweeënvijftig", 52), + ("drieënvijftig", 53), + ("vierenvijftig", 54), + ("vijfenvijftig", 55), + ("zesenvijftig", 56), + ("zevenenvijftig", 57), + ("achtenvijftig", 58), + ("negenenvijftig", 59), + ("zestig", 60), + ("eenenzestig", 61), + ("tweeënzestig", 62), + ("drieënzestig", 63), + ("vierenzestig", 64), + ("vijfenzestig", 65), + ("zesenzestig", 66), + ("zevenenzestig", 67), + ("achtenzestig", 68), + ("negenenzestig", 69), + ("zeventig", 70), + ("eenenzeventig", 71), + ("tweeënzeventig", 72), + ("drieënzeventig", 73), + ("vierenzeventig", 74), + ("vijfenzeventig", 75), + ("zesenzeventig", 76), + ("zevenenzeventig", 77), + ("achtenzeventig", 78), + ("negenenzeventig", 79), + ("tachtig", 80), + ("eenentachtig", 81), + ("tweeëntachtig", 82), + ("drieëntachtig", 83), + ("vierentachtig", 84), + ("vijfentachtig", 85), + ("zesentachtig", 86), + ("zevenentachtig", 87), + ("achtentachtig", 88), + ("negenentachtig", 89), + ("negentig", 90), + ("eenennegentig", 91), + ("tweeënnegentig", 92), + ("drieënnegentig", 93), + ("vierennegentig", 94), + ("vijfennegentig", 95), + ("zesennegentig", 96), + ("zevenennegentig", 97), + ("achtennegentig", 98), + ("negenennegentig", 99), + ("honderd", 100)]) + DayOfMonth = dict([("1e", 1), + ("1ste", 1), + ("2e", 2), + ("2de", 2), + ("3e", 3), + ("3de", 3), + ("4e", 4), + ("4de", 4), + ("5e", 5), + ("5de", 5), + ("6e", 6), + ("6de", 6), + ("7e", 7), + ("7de", 7), + ("8e", 8), + ("8de", 8), + ("9e", 9), + ("9de", 9), + ("10e", 10), + ("10de", 10), + ("11e", 11), + ("11de", 11), + ("12e", 12), + ("12de", 12), + ("13e", 13), + ("13de", 13), + ("14e", 14), + ("14de", 14), + ("15e", 15), + ("15de", 15), + ("16e", 16), + ("16de", 16), + ("17e", 17), + ("17de", 17), + ("18e", 18), + ("19e", 19), + ("20e", 20), + ("21e", 21), + ("22e", 22), + ("23e", 23), + ("24e", 24), + ("25e", 25), + ("26e", 26), + ("27e", 27), + ("28e", 28), + ("29e", 29), + ("30e", 30), + ("31e", 31)]) + DoubleNumbers = dict([("half", 0.5), + ("anderhalf", 1.5), + ("anderhalve", 1.5), + ("halve", 0.5), + ("een kwartier", 0.25), + ("kwartier", 0.25), + ("kwart", 0.25), + ("driekwart", 0.75), + ("drie kwart", 0.75), + ("kwartaal", 0.25)]) + HolidayNames = dict([("kingsday", ["koningsdag"]), + ("queensday", ["koninginnedag"]), + ("prinsjesdag", ["prinsjesdag"]), + ("dodenherdenking", ["nationaledodenherdenking", "nationaleherdenking", "dodenherdenking"]), + ("bevrijdingsdag", ["bevrijdingsdag"]), + ("teachersday", ["dagvandeleraar", "dagvandeleerkracht", "dagvandeleerkrachten"]), + ("veteransday", ["nederlandseveteranendag", "veteranendag"]), + ("eerstekerstdag", ["eerstekerstdag", "1ekerstdag"]), + ("tweedekerstdag", ["tweedekerstdag", "2ekerstdag"]), + ("dagvandearbeid", ["dagvandearbeid", "feestvandearbeid"]), + ("treeplantingday", ["nationaleboomfeestdag", "boomfeestdag", "boomplantdag"]), + ("sinterklaas", ["sinterklaas", "sinterklaasavond", "sinterklaasfeest", "pakjesavond"]), + ("driekoningen", ["driekoningen"]), + ("ketikoti", ["ketikoti", "keti-koti"]), + ("stmartinsday", ["sint-maartensfeest", "sint-maarten"]), + ("ascensionday", ["hemelvaartsdag"]), + ("whitesunday", ["pinksteren"]), + ("christmas", ["kerstfeest", "kerstmis", "kerst", "xmas"]), + ("easterday", ["pasen", "eerstepaasdag", "paasdag", "paaszondag"]), + ("eastermonday", ["tweedepaasdag", "paasmaandag"]), + ("fathers", ["vaderdag"]), + ("goodfriday", ["goedevrijdag"]), + ("mothers", ["moederdag"]), + ("newyear", ["nieuwjaar"]), + ("newyearday", ["nieuwjaarsdag"]), + ("newyearsday", ["nieuwjaarsdag"]), + ("newyeareve", ["oudjaar", "oudejaar", "oudejaarsavond", "oudjaarsavond", "silvester", "silvesteravond", "oudennieuw", "oud&nieuw"]), + ("valentinesday", ["valentijnsdag", "valetijnsdag"]), + ("independenceday", ["onafhankelijkheidsdag", "onafhankelijksdag"]), + ("bastilleday", ["fransenationalefeestdag", "bestormingvandebastille"]), + ("halloweenday", ["halloween", "allerheiligenavond"]), + ("allhallowday", ["allerheiligen"]), + ("allsoulsday", ["allerzielen"]), + ("christmaseve", ["kerstavond"]), + ("yuandan", ["yuandan"]), + ("chinesenewyear", ["chineesnieuwjaar", "lentefestival", "lentefeest"]), + ("ramadan", ["ramadan"]), + ("eidalfitr", ["eidalfitr", "suikerfeest"]), + ("sacrifice", ["eidaladha", "offerfeest"]), + ("islamicnewyear", ["islamitischnieuwjaar"]), + ("thanksgiving", ["thanksgivingday", "thanksgiving", "dankzeggingsdag"]), + ("martinlutherking", ["martinlutherkingday", "martinlutherkingjrday", "martinlutherkingdag", "mlkdag"]), + ("usindependenceday", ["amerikaanseonafhankelijkheidsdag", "usonafhankelijkheidsdag"]), + ("blackfriday", ["blackfriday"]), + ("cybermonday", ["cybermonday"]), + ("earthday", ["dagvandeaarde"]), + ("juneteenth", ["jubileeday", "juneteenth", "vrijheidsdag"])]) + WrittenDecades = dict([("jaren 0", 0), + ("jaren nul", 0), + ("jaren 10", 10), + ("jaren tien", 10), + ("jaren 20", 20), + ("jaren twintig", 20), + ("twintiger jaren", 20), + ("jaren 30", 30), + ("jaren dertig", 30), + ("dertiger jaren", 30), + ("jaren 40", 40), + ("jaren veertig", 40), + ("veertiger jaren", 40), + ("jaren 50", 50), + ("jaren vijftig", 50), + ("vijftiger jaren", 50), + ("jaren 60", 60), + ("jaren zestig", 60), + ("zestiger jaren", 60), + ("jaren 70", 70), + ("jaren zeventig", 70), + ("zeventiger jaren", 70), + ("jaren 80", 80), + ("jaren tachtig", 80), + ("tachtiger jaren", 80), + ("jaren 90", 90), + ("jaren negentig", 90), + ("nul", 0), + ("tien", 10), + ("twintig", 20), + ("twintiger", 20), + ("dertig", 30), + ("dertiger", 30), + ("veertig", 40), + ("veertiger", 40), + ("vijftig", 50), + ("vijftiger", 50), + ("zestig", 60), + ("zestiger", 60), + ("zeventig", 70), + ("zeventiger", 70), + ("tachtig", 80), + ("tachtiger", 80), + ("negentig", 90), + ("negentiger", 90), + ("honderd", 0)]) + SpecialDecadeCases = dict([("21e eeuw", 2000), + ("eenentwintigste eeuw", 2000), + ("tweeduizend", 2000), + ("jaren nul", 0), + ("nul", 0)]) + DefaultLanguageFallback = 'DMY' + SuperfluousWordList = [r'preferably', r'how about', r'maybe', r'say', r'like'] + DurationDateRestrictions = [r'vandaag', r'nu'] + AmbiguityFiltersDict = dict([("^\\d{4}$", "(\\d\\.\\d{4}|\\d{4}\\.\\d)"), + ("\\b(ontbijt|lunch|avondeten)$", "(?(? +# This code was generated by a tool. +# Changes to this file may cause incorrect behavior and will be lost if +# the code is regenerated. +# +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# ------------------------------------------------------------------------------ + +# pylint: disable=line-too-long + + +class TimeZoneDefinitions: + DirectUtcRegex = f'\\b(utc|gmt)(\\s*[+\\-\\u00B1]?\\s*[\\d]{{1,2}}h?(\\s*:\\s*[\\d]{{1,2}})?)?\\b' + AbbreviationsList = [r'AFT'] + FullNameList = [r'Afghanistan Standard Time'] + BaseTimeZoneSuffixRegex = f'((\\s+|-)(friendly|compatible))?(\\s+|-)time(zone)?' + LocationTimeSuffixRegex = f'((\\s+|-)(tijdzone|tijd|timezone|time)\\b)' + TimeZoneEndRegex = f'({BaseTimeZoneSuffixRegex})$' + AmbiguousTimezoneList = [r'bit', r'get', r'art', r'cast', r'eat', r'lint', r'mat', r'most', r'west', r'vet', r'wet', r'cot', r'pt', r'et', r'eastern', r'pacific', r'central', r'mountain'] + AbbrToMinMapping = dict([("aft", 270)]) + FullToMinMapping = dict([("beijing time", 480)]) + MajorLocations = [r'Dominican Republic'] +# pylint: enable=line-too-long diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/english_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/english_date_time.py index fd70b7a0bf..1a9ce65eeb 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/english_date_time.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/english_date_time.py @@ -80,7 +80,7 @@ class EnglishDateTime: MonthFrontSimpleCasesRegex = f'\\b({RangePrefixRegex}\\s+)?{MonthSuffixRegex}\\s+((from)\\s+)?({DayRegex}|{WrittenOrdinalDayRegex})\\s*{TillRegex}\\s*({DayRegex}|{WrittenOrdinalDayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' MonthFrontBetweenRegex = f'\\b{MonthSuffixRegex}\\s+(between\\s+)({DayRegex}|{WrittenOrdinalDayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex}|{WrittenOrdinalDayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' BetweenRegex = f'\\b(between\\s+)({DayRegex}|{WrittenOrdinalDayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex}|{WrittenOrdinalDayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*){YearRegex})?\\b' - MonthWithYear = f'\\b((({WrittenMonthRegex}[\\.]?|((the\\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|sixth|6th|seventh|7th|eighth|8th|ninth|9th|tenth|10th|eleventh|11th|twelfth|12th|last)\\s+month(?=\\s+(of|in))))((\\s*)[/\\\\\\-\\.,]?(\\s+(of|in))?(\\s*)({YearRegex}|(?following|next|last|this)\\s+year)|\\s+(of|in)\\s+{TwoDigitYearRegex}))|(({YearRegex}|(?following|next|last|this)\\s+year)(\\s*),?(\\s*){WrittenMonthRegex}))\\b' + MonthWithYear = f'\\b((({WrittenMonthRegex}[\\.]?|((the\\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|sixth|6th|seventh|7th|eighth|8th|ninth|9th|tenth|10th|eleventh|11th|twelfth|12th|last)\\s+month(?=\\s+(of|in))))((\\s*)[/\\\\\\-\\.,]?(\\s+(of|in))?(\\s*)({YearRegex}|\\\'?{TwoDigitYearRegex}|(?following|next|last|this)\\s+year)|\\s+(of|in)\\s+{TwoDigitYearRegex}))|(({YearRegex}|(?following|next|last|this)\\s+year)(\\s*),?(\\s*){WrittenMonthRegex}))\\b' SpecialYearPrefixes = f'(calendar|(?fiscal|school))' OneWordPeriodRegex = f'\\b((((the\\s+)?month of\\s+)?({StrictRelativeRegex}\\s+)?{MonthRegex})|(month|year) to date|(?((un)?till?|to)\\s+date)|({RelativeRegex}\\s+)?(my\\s+)?((?working\\s+week|workweek)|week(end)?|month|fortnight|(({SpecialYearPrefixes}\\s+)?year))(?!((\\s+of)?\\s+\\d+(?!({BaseDateTime.BaseAmDescRegex}|{BaseDateTime.BasePmDescRegex}))|\\s+to\\s+date))(\\s+{AfterNextSuffixRegex})?)\\b' MonthNumWithYear = f'\\b(({BaseDateTime.FourDigitYearRegex}(\\s*)[/\\-\\.](\\s*){MonthNumRegex})|({MonthNumRegex}(\\s*)[/\\-](\\s*){BaseDateTime.FourDigitYearRegex}))\\b' @@ -109,7 +109,7 @@ class EnglishDateTime: WhichWeekRegex = f'\\b(week)(\\s*)(?5[0-3]|[1-4]\\d|0?[1-9])(\\s+of\\s+({YearRegex}|{RelativeRegex}\\s+year))?\\b' WeekOfRegex = f'(the\\s+)?((week)(\\s+(of|(commencing|starting|beginning)(\\s+on)?))|w/c)(\\s+the)?' MonthOfRegex = f'(month)(\\s*)(of)' - DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|(?{BaseDateTime.FourDigitYearRegex}|(?(3[0-1]|[0-2]?\\d)(?:th|nd|rd|st))s?)\\b' @@ -132,8 +132,8 @@ class EnglishDateTime: DateExtractor4 = f'\\b{MonthNumRegex}\\s*[/\\\\\\-]\\s*{DayRegex}[\\.]?\\s*[/\\\\\\-]\\s*{DateYearRegex}' DateExtractor5 = f'\\b({DayPrefix}(\\s*,)?\\s+)?{DayRegex}\\s*[/\\\\\\-\\.]\\s*({MonthNumRegex}|{MonthRegex})\\s*[/\\\\\\-\\.]\\s*{DateYearRegex}(?!\\s*[/\\\\\\-\\.]\\s*\\d+)' DateExtractor6 = f'(?<={DatePreposition}\\s+)({StrictRelativeRegex}\\s+)?({DayPrefix}\\s+)?{MonthNumRegex}[\\-\\.]{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\\b' - DateExtractor7L = f'\\b({DayPrefix}(\\s*,)?\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\\b' - DateExtractor7S = f'\\b({DayPrefix}(\\s*,)?\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\\b' + DateExtractor7L = f'\\b({DayPrefix}(\\s*,)?\\s+)?(the\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\\b' + DateExtractor7S = f'\\b({DayPrefix}(\\s*,)?\\s+)?(the\\s+)?{MonthNumRegex}\\s*/\\s*{DayRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\\b' DateExtractor8 = f'(?<={DatePreposition}\\s+)({StrictRelativeRegex}\\s+)?({DayPrefix}\\s+)?{DayRegex}[\\\\\\-]{MonthNumRegex}(?![%]){BaseDateTime.CheckDecimalRegex}\\b' DateExtractor9L = f'\\b({DayPrefix}(\\s*,)?\\s+)?{DayRegex}\\s*/\\s*{MonthNumRegex}{DateExtractorYearTermRegex}(?![%])\\b' DateExtractor9S = f'\\b({DayPrefix}(\\s*,)?\\s+)?{DayRegex}\\s*/\\s*{MonthNumRegex}{BaseDateTime.CheckDecimalRegex}(?![%])\\b' @@ -153,7 +153,7 @@ class EnglishDateTime: LunchRegex = f'\\blunchtime\\b' NightRegex = f'\\b(mid)?night\\b' CommonDatePrefixRegex = f'^[\\.]' - LessThanOneHour = f'(?(a\\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\\s+(minutes?|mins?))|{DeltaMinuteNumRegex}(\\s+(minutes?|mins?)))' + LessThanOneHour = f'(?(a\\s+)?quarter|three quarter(s)?|half( an hour)?|{BaseDateTime.DeltaMinuteRegex}(\\s+(minutes?|mins?)|(?=\\s+past))|{DeltaMinuteNumRegex}(\\s+(minutes?|mins?)|(?=\\s+past)))' WrittenTimeRegex = f'(?{HourNumRegex}\\s+{MinuteNumRegex}(\\s+(minutes?|mins?))?)' TimePrefix = f'(?{LessThanOneHour}\\s+(past|to))' TimeSuffix = f'(?{AmRegex}|{PmRegex}|{OclockRegex})' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/french_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/french_date_time.py index f7ab2cf049..8934c82ded 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/french_date_time.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/french_date_time.py @@ -52,7 +52,7 @@ class FrenchDateTime: MonthFrontBetweenRegex = f'\\b{MonthSuffixRegex}\\s+(entre|d[ue]\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' BetweenRegex = f'\\b(entre\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*){YearRegex})?\\b' YearWordRegex = f'\\b(?l\'ann[ée]e)\\b' - MonthWithYear = f'\\b({WrittenMonthRegex}(\\s*),?(\\s+de)?(\\s*)({YearRegex}|{TwoDigitYearRegex}|(?cette)\\s*{YearWordRegex})|{YearWordRegex}\\s*({PastSuffixRegex}|{NextSuffixRegex}))' + MonthWithYear = f'\\b({WrittenMonthRegex}(\\s*),?(\\s+de)?(\\s*)({YearRegex}|\\\'?{TwoDigitYearRegex}|(?cette)\\s*{YearWordRegex})|{YearWordRegex}\\s*({PastSuffixRegex}|{NextSuffixRegex}))' OneWordPeriodRegex = f'\\b(({RelativeRegex}\\s+)?{WrittenMonthRegex}|(la\\s+)?(weekend|(fin de )?semaine|week-end|mois|ans?|l\'année)\\s+{StrictRelativeRegex}|{RelativeRegex}\\s+(weekend|(fin de )?semaine|week-end|mois|ans?|l\'année)|weekend|week-end|mois|l\'année|an)\\b' MonthNumWithYear = f'({YearRegex}(\\s*)[/\\-\\.](\\s*){MonthNumRegex})|({MonthNumRegex}(\\s*)[/\\-](\\s*){YearRegex})' WeekOfMonthRegex = f'(?(le\\s+)?(?premier|1er|duexi[èe]me|2|troisi[èe]me|3|quatri[èe]me|4|cinqi[èe]me|5)\\s+semaine(\\s+de)?\\s+{MonthSuffixRegex})' @@ -85,7 +85,7 @@ class FrenchDateTime: AmbiguousRangeModifierPrefix = f'^\\b$' NumberEndingPattern = f'^\\b$' SpecialDate = f'(?<=\\b(au|le)\\s+){DayRegex}(?!:)\\b' - DateYearRegex = f'(?{YearRegex}|{TwoDigitYearRegex})' + DateYearRegex = f'(?{YearRegex}|\\\'?{TwoDigitYearRegex})' DateExtractor1 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*))?{MonthRegex}\\s*[/\\\\\\.\\-]?\\s*{DayRegex}(\\s*([/\\\\\\.\\-]|\\bde\\b)?\\s*{BaseDateTime.FourDigitYearRegex})?\\b' DateExtractor2 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*))?{DayRegex}(\\s+|\\s*,\\s*|\\s+){MonthRegex}\\s*([\\.\\-]|\\bde\\b)?\\s*{DateYearRegex}\\b' DateExtractor3 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*))?((?matin([ée]e)?)' AfternoonRegex = f'(?(d\'|l\')?apr[eè]s(-|\\s*)midi)' MidmorningRegex = f'(?milieu\\s*d[ue]\\s*{MorningRegex})' - MiddayRegex = f'(?milieu(\\s*|-)d[eu]\\s*(jour|midi)|apr[eè]s(-|\\s*)midi|(?<=\\bà\\s+)midi)' + MiddayRegex = f'(?milieu(\\s*|-)d[eu]\\s*(jour|midi)|apr[eè]s(-|\\s*)midi|(?<=à\\s+)midi)' MidafternoonRegex = f'(?milieu\\s*d\'+{AfternoonRegex})' MidTimeRegex = f'(?({MidnightRegex}|{MidmorningRegex}|{MidafternoonRegex}|{MiddayRegex}))' AtRegex = f'\\b(((?<=\\b[àa]\\s+)({WrittenTimeRegex}|{HourNumRegex}(\\s+heures)?|{BaseDateTime.HourRegex}|{MidTimeRegex}))|{MidTimeRegex})\\b' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/german_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/german_date_time.py index 4e7c1693c1..1018f17da8 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/german_date_time.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/german_date_time.py @@ -58,7 +58,7 @@ class GermanDateTime: MonthFrontSimpleCasesRegex = f'((vom|zwischen)\\s*)?{MonthSuffixRegex}\\s*((vom|zwischen)\\s*)?({DayRegex})\\s*{TillRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?' MonthFrontBetweenRegex = f'({MonthSuffixRegex}\\s+(zwischen\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?)' BetweenRegex = f'((zwischen\\s+)({DayRegex})(\\s+{MonthSuffixRegex})?\\s*{RangeConnectorRegex}\\s*({DayRegex})(\\s+{MonthSuffixRegex})((\\s+|\\s*,\\s*){YearRegex})?|(zwischen\\s+)({DayRegex})(\\s+{MonthSuffixRegex})?\\s*{RangeConnectorRegex}\\s*({DayRegex})(\\s+{MonthSuffixRegex})?((\\s+|\\s*,\\s*){YearRegex})?)' - MonthWithYear = f'\\b((?apr(il|\\.)|aug(ust|\\.)|dez(ember|\\.)|feb(ruar|ber|\\.)|januar|j[äa]n(ner|\\.)|jul(e?i|l\\.)|jun([io]|\\.)|märz|mai|nov(ember|\\.)|okt(ober|\\.)|sept?(ember|\\.))(\\s*),?(\\s+des)?(\\s*)({YearRegex}|(?nächste[mn]|letzte[mn]|diese(s|n))\\s+jahres))' + MonthWithYear = f'\\b((?apr(il|\\.)|aug(ust|\\.)|dez(ember|\\.)|feb(ruar|ber|\\.)|januar|j[äa]n(ner|\\.)|jul(e?i|l\\.)|jun([io]|\\.)|märz|mai|nov(ember|\\.)|okt(ober|\\.)|sept?(ember|\\.))(\\s*),?(\\s+des)?(\\s*)({YearRegex}|\\\'?{TwoDigitYearRegex}|(?nächste[mn]|letzte[mn]|diese(s|n))\\s+jahres))' OneWordPeriodRegex = f'\\b((((im\\s+)?monat\\s+)?({RelativeRegex}\\s*(jahr\\s*(im\\s*)?)?)?(?apr(il|\\.)|aug(ust|\\.)|dez(ember|\\.)|feb(ruar|ber|\\.)|j[äa]n(uar|ner|\\.)|jul(e?i|l\\.)|jun([io]|\\.)|märz|mai|nov(ember|\\.)|okt(ober|\\.)|sept?(ember|\\.)))|(?unter\\s+der\\s+woche)|({RelativeRegex}\\s+)?((?werktags|arbeitswoche)|woche(nende)?|monat(s)?|jahr|jahres)(?!(\\s+\\d+(?!({BaseDateTime.BaseAmDescRegex}|{BaseDateTime.BasePmDescRegex}))|\\s+bis\\s+heute)))\\b' MonthNumWithYear = f'({YearRegex}(\\s*)[/\\-\\.](\\s*){MonthNumRegex})|({MonthNumRegex}(\\s*)[/\\-\\.](\\s*){YearRegex})' WeekOfMonthRegex = f'(?((die|der)\\s+)(?erste[rns]?|1\\.|zweite[rns]?|2\\.|dritte[rns]?|3\\.|vierte[rns]?|4\\.|fünfte[rns]?|5\\.|letzte[rmns]?)\\s+woche\\s+(des|diese(s|n)|im)\\s+({MonthSuffixRegex}|monat(s)?))' @@ -78,7 +78,7 @@ class GermanDateTime: WeekOfRegex = f'(die\\s+)?(woche)(\\s+des)' MonthOfRegex = f'(monat)(\\s*)(des)' MonthRegex = f'(?apr((il)?\\b|\\.)|aug((ust)?\\b|\\.)|dez((ember)?\\b|\\.)|feb((ruar|ber)?\\b|\\.)|januar|j[äa]n((ner)?\\b|\\.)|jul((e?i|l)?\\b|l\\.)|jun([io]?\\b|\\.)|märz|mai|nov((ember)?\\b|\\.)|okt((ober)?\\b|\\.)|sept?((ember)?\\b|\\.))' - DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|{TwoDigitYearRegex})' + DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|\\\'?{TwoDigitYearRegex})' OnRegex = f'(?<=\\bam\\s+)({DayRegex}s?)\\b' RelaxedOnRegex = f'(?<=\\b(am|an dem)\\s+)((?10|11|12|13|14|15|16|17|18|19|1|20|21|22|23|24|25|26|27|28|29|2|30|31|3|4|5|6|7|8|9)([\\.]))' ThisRegex = f'(((diese((n|m)|(\\s*woche))(\\s*am)?\\s+){WeekDayRegex})|diese(n|r)?\\s*(sommer|winter|frühling|herbst))' @@ -91,13 +91,13 @@ class GermanDateTime: WeekDayOfMonthRegex = f'\\b(?((an( dem)?|de[rs]|am)\\s+)?(?erste[rns]?|1\\.|zweite[rns]?|2\\.|dritte[rns]?|3\\.|vierte[rns]?|4\\.|fünfte[rns]?|5\\.|letzte[rmns]?)\\s+{WeekDayRegex}\\s+{MonthSuffixRegex})\\b' RelativeWeekDayRegex = f'\\b({WrittenNumRegex}\\s+{WeekDayRegex}e\\s+(von\\s+jetzt|später))\\b' SpecialDate = f'(?=\\b(an( dem)?|am)\\s+){DayRegex}\\b' - DateExtractor1 = f'\\b(({WeekDayRegex})(\\s+|\\s*,\\s*))?({DayRegex}\\s*[/\\\\.,\\- ]\\s*{MonthRegex}(\\s*[/\\\\.,\\- ]\\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\\s*[/\\\\.,\\- ]\\s*{DayRegex}\\s*[/\\\\.,\\- ]\\s*{MonthRegex})\\b' + DateExtractor1 = f'\\b(({WeekDayRegex})(\\s+|\\s*,\\s*))?({DayRegex}\\s*[/\\\\.,\\- ]\\s*({MonthNumRegex}|{MonthRegex})(\\s*[/\\\\.,\\- ]\\s*{DateYearRegex})?|{BaseDateTime.FourDigitYearRegex}\\s*[/\\\\.,\\- ]\\s*{DayRegex}\\s*[/\\\\.,\\- ]\\s*{MonthRegex})\\b' DateExtractor2 = f'\\b({MonthRegex}\\s*[/\\\\.,\\- ]\\s*{DayRegex}(?!\\s*\\-\\s*\\d{{2}}\\b)(\\s*[/\\\\.,\\- ]\\s*{DateYearRegex})?)\\b' DateExtractor3 = f'\\b({DayRegex}{MonthRegex})' DateExtractor4 = f'\\b({DayRegex}\\s*{MonthNumRegex}\\s*{DateYearRegex})\\b' DateExtractor5 = f'\\b(({WeekDayRegex})(\\s+|\\s*,\\s*))?({DayRegex}\\s*[/\\\\\\-\\.]\\s*({MonthNumRegex}|{MonthRegex})\\s*[/\\\\\\-\\.]\\s*{DateYearRegex})\\b(?!\\s*[/\\\\\\-\\.]\\s*\\d+)' DateExtractor6 = f'^[.]' - DateExtractor7 = f'({DayRegex}\\s*[\\.]\\s*{MonthNumRegex}[\\.]){BaseDateTime.CheckDecimalRegex}' + DateExtractor7 = f'\\b({DayRegex}\\s*[\\.]\\s*{MonthNumRegex}[\\.]){BaseDateTime.CheckDecimalRegex}' DateExtractor8 = f'(?<=\\b(am)\\s+){DayRegex}[/\\\\\\.]{MonthNumRegex}([/\\\\\\.]{DateYearRegex})?{BaseDateTime.CheckDecimalRegex}\\b' DateExtractor9 = f'\\b({DayRegex}\\s*/\\s*{MonthNumRegex}((\\s+|\\s*,\\s*){DateYearRegex})?){BaseDateTime.CheckDecimalRegex}\\b' DateExtractor10 = f'^[.]' @@ -118,7 +118,7 @@ class GermanDateTime: NightRegex = f'\\b(mitternacht|(nachts?|primetime|abends?))\\b' AmPmPrefixRegex = f'\\b((((um|gegen)\\s*)?(?(((?am morgen)|((früh|spät)\\s*)?morgens|früh|(vor|nach)mittags?)|(?((früh|spät)\\s*)?(nachmittags?|abends?)|mitternachts?))|(in der\\s*)?(?nachts?)))\\s*(um|gegen|von)\\s*)' CommonDatePrefixRegex = f'^[\\.]' - LessThanOneHour = f'\\b(?(ein(er?)?\\s+)?((drei)?viertel|halb(en?)?)(\\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\\s+(min(uten?)?))|{DeltaMinuteNumRegex}(\\s+(min(uten?)?))' + LessThanOneHour = f'\\b(?(ein(er?)?\\s+)?((drei)?viertel|halb(en?)?)(\\s*stunden?)?)|{BaseDateTime.DeltaMinuteRegex}(\\s+(min(uten?)?)|(?=\\s+(nach|vor)))|{DeltaMinuteNumRegex}(\\s+(min(uten?)?)|(?=\\s+(nach|vor)))' WrittenTimeRegex = f'(um\\s*)?(?{HourNumRegex}(\\s*{OclockRegex}\\s*)({MinuteNumRegex}|{MinuteNumRegex}und(?zwanzig|dreißig|vierzig|fünfzig)))' TimePrefix = f'(?({LessThanOneHour})(\\s*(vor(\\W)?|nach(\\W)?))?)' TimeSuffix = f'(?{AmRegex}|{PmRegex}|{OclockRegex})' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/italian_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/italian_date_time.py index 13741926eb..fabd6cb3de 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/italian_date_time.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/italian_date_time.py @@ -58,7 +58,7 @@ class ItalianDateTime: LastTwoYearNumRegex = f'({WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}({WrittenOneToNineRegex})?)' FullTextYearRegex = f'\\b((?{WrittenCenturyFullYearRegex})(?{LastTwoYearNumRegex})?)\\b' TwoDigitYearRegex = f'\\b(?([0-9]\\d))(?!(\\s*((\\:\\d)|{AmDescRegex}|{PmDescRegex}|\\.\\d)))\\b' - DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|{TwoDigitYearRegex})' + DateYearRegex = f'(?{BaseDateTime.FourDigitYearRegex}|\\\'?{TwoDigitYearRegex})' YearSuffix = f'(,?\\s*({DateYearRegex}|{FullTextYearRegex}))' YearRegex = f'({BaseDateTime.FourDigitYearRegex}|{FullTextYearRegex})' DateUnitRegex = f'\\b(?decennio|mese|settimana|(ann|giorn)(o|(?i))|(?decenni|mesi|settimane))\\b' @@ -67,7 +67,7 @@ class ItalianDateTime: MonthFrontBetweenRegex = f'\\b{MonthSuffixRegex}\\s+([tf]ra\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})((\\s+|\\s*,\\s*){YearRegex})?\\b' BetweenRegex = f'\\b([tf]ra\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*){YearRegex})?\\b' YearWordRegex = f'\\b(?l\'anno)\\b' - MonthWithYear = f'\\b({MonthRegex}(\\.)?(\\s*)[/\\\\\\-\\.,]?(((\\s+del)?\\s+{YearRegex})|((\\s+(del|di|il))?\\s+(?prossim[\'o]|passato|quest[\'o])\\s*anno)|((\\s+(del)?l\')anno\\s+(?prossimo|passato))))' + MonthWithYear = f'\\b({MonthRegex}(\\.)?(\\s*)[/\\\\\\-\\.,]?(((\\s+del)?\\s+{YearRegex}|\\\'?{TwoDigitYearRegex})|((\\s+(del|di|il))?\\s+(?prossim[\'o]|passato|quest[\'o])\\s*anno)|((\\s+(del)?l\')anno\\s+(?prossimo|passato))))' SpecialYearPrefixes = f'(?fiscale|scolastico)' OneWordPeriodRegex = f'\\b((((il|l[o\'])\\s*)?((mese di\\s+)|({RelativeRegex}\\s*))?{MonthRegex}(\\s+{RelativeRegex})?)|dall\'inizio\\s+del(l\')\\s*(mese|anno)|({RelativeRegex}\\s*)?(mi[ao]\\s+)?(weekend|finesettimana|settimana|mese|anno)(\\s+{RelativeRegex})?(?!((\\s+di|del)?\\s+\\d+))(\\s+{AfterNextSuffixRegex})?)\\b' MonthNumWithYear = f'({YearRegex}[/\\-\\.]{MonthNumRegex})|({MonthNumRegex}[/\\-]{YearRegex})' @@ -132,9 +132,9 @@ class ItalianDateTime: AmRegex = f'\\b(?((((la|alla|verso|per|della|di|in)\\s+(la\\s+)?)?(mattinata|mattina))|(((il|al|verso|per|del|di)\\s+(il\\s+)?)?(mattino))))\\b' LunchRegex = f'\\b(ora di pranzo)\\b' NightRegex = f'\\b(mezzanotte|notte)\\b' - LessThanOneHour = f'(?(un\\s+quarto|tre quarti?|mezz[oa]|mezz\'ora|{BaseDateTime.DeltaMinuteRegex}(\\s+(minut[oi]|min))?|{DeltaMinuteNumRegex}(\\s+(minut[oi]|min))|(?<=(e|meno)\\s+){DeltaMinuteNumRegex}))' + LessThanOneHour = f'(?(un\\s+quarto|tre quarti?|mezz[oa]|mezz\'ora|{BaseDateTime.DeltaMinuteRegex}|{DeltaMinuteNumRegex}))' EngTimeRegex = f'(?{HourNumRegex}\\s+e\\s+({MinuteNumRegex}|(?venti?|trenta?|quaranta?|cinquanta?){MinuteNumRegex}))' - TimePrefix = f'(?(e\\s+{LessThanOneHour}|{LessThanOneHour}\\s+(minut[oi]|min)\\s+all[e\']|meno {LessThanOneHour}))' + TimePrefix = f'(?((e|meno)\\s+{LessThanOneHour}(\\s+(minut[oi]|min))?|{LessThanOneHour}\\s+(minut[oi]|min)\\s+all[e\']))' TimeSuffix = f'(?{AmRegex}|{PmRegex}|{OclockRegex})' BasicTime = f'\\b(?{EngTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}:{BaseDateTime.MinuteRegex}(:{BaseDateTime.SecondRegex})?|{BaseDateTime.HourRegex})' MidnightRegex = f'(?mezzanotte|mezza notte)' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/japanese_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/japanese_date_time.py new file mode 100644 index 0000000000..20c07009f0 --- /dev/null +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/japanese_date_time.py @@ -0,0 +1,852 @@ +# ------------------------------------------------------------------------------ +# +# This code was generated by a tool. +# Changes to this file may cause incorrect behavior and will be lost if +# the code is regenerated. +# +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# ------------------------------------------------------------------------------ + +from .base_date_time import BaseDateTime +# pylint: disable=line-too-long + + +class JapaneseDateTime: + LangMarker = 'Jpn' + MonthRegex = f'(?(正|一|二|三|四|五|六|七|八|九|十|十一|十二|0?[1-9]|1[0-2])\\s*(か月(?!で)|月間?))' + MonthRegexForPeriod = f'(?正月|一月|二月|三月|四月|五月|六月|七月|八月|九月|十月|十一月|十二月|(0?[1-9]|1[0-2])か?月)(?=\\b|t|まで|から)?' + MonthNumRegexForPeriod = f'(?0?[1-9]|1[0-2])(?=\\b|t|まで|から)?' + DayRegex = f'(?[0-2]?[1-9]|[1-3]0|31)((日|目)(?!かかる|待つ|泊まる|経つ|都合)間?)?' + DayRegexForPeriod = f'(?3[01]|[0-2]?\\d|(三十一?|(一|二)?十?[一二三四五六七八九]))((\\s*日(?!かかる|待つ|泊まる|経つ))目?)?(?=\\b|t|まで|から)?' + DayNumberRegex = f'(二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|二十一|三十一|十二|十三|十四|十五|十六|十七|十八|十一|十|二十|廿(?!日市市)|三十|一|二|三|四|五|六|七|八|九)' + DateDayRegexInCJK = f'(?初一|({DayNumberRegex}|3[01]|[0-2]?\\d)(\\s*日|号)(?!かかる|待つ|泊まる|経つ))目?' + DayRegexNumInCJK = f'(?一|十一|二十一|三十一|三十|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|一|十一|十|二十一|二十|廿(?!日市市)|三十一|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|十|二十|廿|卅)' + MonthNumRegex = f'(?0?[1-9]|1[0-2])' + TwoNumYear = '50' + YearNumRegex = f'((?((?\\d{{2,4}})(?!\\$|ドル|円|¥))(\\s*年)?' + ZeroToNineIntegerRegexCJK = f'[一二三四五六七八九十廿零壹贰叁肆伍陆柒捌玖〇两千俩倆仨]' + DynastyStartYear = '元' + RegionTitleRegex = f'(昭和|平成|令和|大正|明治|寛政|享和|文化|文政|天保|弘化|嘉永|安政|万延|文久|元治|慶応)' + DynastyYearRegex = f'((?{RegionTitleRegex})(?({DynastyStartYear}|\\d{{1,2}}|({ZeroToNineIntegerRegexCJK}){{1,3}}))年?)|(((?慶応)|(?明治)|(?大正)|(?昭和)|(?平成)|(?令和))(\\d+|元|{ZeroToNineIntegerRegexCJK})年)' + DateYearInCJKRegex = f'(?({ZeroToNineIntegerRegexCJK}{{2,4}}|{DynastyYearRegex}))年?' + WeekDayRegex = f'(前の?)?(週(間)?の?)?(?(日|月|火|水|木|金|土)曜日?)' + WeekDayStartEnd = f'(^(の)?{WeekDayRegex}|{WeekDayRegex}$)' + LunarRegex = f'(农历|初一|正月|大年|旧暦)' + DateThisRegex = f'(这个|这一个|这|这一|本|(?今週)|これ?)(的|の)?({WeekDayRegex}|日)' + DateLastRegex = f'(上一个|上个|上一|上|最后一个|最后|前の?|(?先週)|最後)(的|の)?({WeekDayRegex}|日)' + DateNextRegex = f'(下一个|下个|下一|下|(?(来|翌)週)|次)(的|の)?{WeekDayRegex}' + WeekWithWeekDayRangeRegex = f'({DateThisRegex}|{DateNextRegex}|{DateLastRegex})(から)({WeekDayRegex})' + WoMLastRegex = f'過去|去|最後|先' + WoMPreviousRegex = f'前' + WoMNextRegex = f'次|翌|来|これから(の)?' + SpecialMonthRegex = f'(先月|来月|今月|前月|再来月|昨月|先々月|ぜんげつ|(せん)?せんげつ|さくげつ|らいげつ|こんげつ)' + SpecialYearRegex = f'(ことし|さ?らいねん|きょねん|さくねん)' + SpecialDayRegex = f'((いっ)?さくじつ|おとつい|最近(?!の)|前天|后天|明日から二日((?今日)から(?1日半)(の間)?)|((?今日)から(?2日半)(の間)?)|(?本日)|昨日の2日前|昨日から4日|今日から二日|今日から4日|昨日から2日間|昨天|明天|今天|(?日曜日?|月曜日?|火曜日?|水曜日?|木曜日?|金曜日?|土曜日?))?' + WeekDayOfMonthRegex = f'((({SpecialMonthRegex}|{MonthRegex}|{MonthNumRegex}|((这个|这一个|这|这一|本|今|上个|上一个|上|上一|去|下个|下一个|下|下一|明)月))(的|の)?\\s*)?(第|最)?(?([初一二三四五])|最後|最終|([1-5])|最后一)(个|の|\\s)*{WeekDayRegex})' + WeekDayAndDayRegex = f'({DayRegexForPeriod}(の|的)?(\\s|,)*{WeekDayRegex})' + ThisPrefixRegex = f'这个|这一个|这|这一|本|今|こ' + LastPrefixRegex = f'上个|上一个|上|上一|去|過去|ここ|最後|前|先|昨|最終' + NextPrefixRegex = f'下个|下一个|下|下一|明(?!治)|次|再?来|向こう|これから(の)?|翌|向こう' + RelativeRegex = f'(?({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex}))' + SpecialDate = f'(?({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})年)?(の|的)?(?({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})(の|的)?月)?(の|的)?{DateDayRegexInCJK}' + DateUnitRegex = f'(?年|个月|月|周|(?営業)日|(?あとで?)|(?の早い時間)' + DateRegexList1 = f'({LunarRegex}(的|の|\\s)*)?(({SimpleYearRegex}|{DateYearInCJKRegex})[/\\\\\\-の的]?(\\s*{MonthRegex})[/\\\\\\-の的]?(\\s*{DayRegexForPeriod})((\\s|,)*{WeekDayRegex})?)' + DateRegexList2 = f'((?到|至|から|--|-|—|——|~|–)(?!\\d泊)' + DatePeriodRangeSuffixRegex = f'(に?まで|の間)' + DatePeriodRangePrefixRegex = f'^\\b$' + DatePeriodTillSuffixRequiredRegex = f'(?与|和)' + DatePeriodDayRegexInCJK = f'(?(二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|二十二|二十三|二十一|十一|三十一|十二|十三|十四|十五|十六|十七|十八|十九|十|二十|三十|一|十|二|三|四|五|六|七|八|九|3[0-1]|[1-2]\\d|0?[1-9])日|初一|三十|(一|十一|二十一|三十一|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|一|十一|十|二十一|二十|三十一|三十|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|十|二十|三十|3[0-1]|[1-2]\\d|0?[1-9])号|一|十一|二十一|三十一|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|一|十一|十|二十一|二十|三十一|三十|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|十|二十|三十|廿(?!日市市)|卅)目?' + DatePeriodThisRegex = f'(?再来|以降)|下个|下一个|下|下一|最初|来|向こう|これから(の)?|翌|今後|次(の)?|の後' + DateRangePrepositions = f'((ひと|こ|私の|その|この|これらの|それらの)\\s*)?' + RelativeMonthRegex = f'(?({DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})\\s*月)' + HalfYearRegex = f'((?の?(上|前)半期?)|(?の?(下|后|後)半期?))' + YearRegex = f'((({YearNumRegex})(\\s*年)?|({SimpleYearRegex})\\s*年)(に)?{HalfYearRegex}?)|({DynastyYearRegex})' + StrictYearRegex = f'(((ひと|こ|その|この|これらの|それらの)\\s*)?{YearRegex})' + YearRegexInNumber = f'(?(\\d{{3,4}}))' + DatePeriodYearInCJKRegex = f'(?({ZeroToNineIntegerRegexCJK}{{2,4}}))年{HalfYearRegex}?' + MonthSuffixRegex = f'(?({RelativeMonthRegex}|{MonthRegex}))' + SimpleCasesRegex = f'({DateRangePrepositions})(({YearRegex}|{DatePeriodYearInCJKRegex})\\s*)?{MonthSuffixRegex}({DatePeriodDayRegexInCJK}|{DayRegex})\\s*{DatePeriodTillRegex}\\s*({DatePeriodDayRegexInCJK}|{DayRegex})(?!\\d)((\\s+|\\s*,\\s*){YearRegex})?(までの間|まで|の間)?' + YearAndMonth = f'(({YearNumRegex}|{DateYearInCJKRegex})の?\\s*{MonthRegex}(\\b|から)?)' + SimpleYearAndMonth = f'({DateRangePrepositions})({YearNumRegex}[/\\\\\\-]{MonthNumRegex}(\\b|から)$)' + PureNumYearAndMonth = f'({DateRangePrepositions})({YearRegexInNumber}\\s*[-\\.\\/]\\s*{MonthNumRegex})(?!\\d)|({MonthNumRegex}\\s*\\/\\s*{YearRegexInNumber})' + OneWordPeriodRegex = f'({DateRangePrepositions})((((周末|週(間)?|日間?|明年|(?(今|再来|翌|去|前|后|来)年))(,|の(残り)?)?\\s*)?{MonthRegex}|(({DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})の?\\s*)?(数|\\d\\d?|{ZeroToNineIntegerRegexCJK}|(?半))?(?ヶ?((?営業)日|(?半)|(?の残りの日|いっぱい)?)|(({DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})({MonthRegex}(?!で)|{DayRegex})))(?後に|以内に|初来)?' + LaterEarlyPeriodRegex = f'((?来|翌)|(?今|同じ)|(?この|去|先|前(の)?))?(?(?週(間)?)|(?(正|一|二|三|四|五|六|七|八|九|十|十一|十二|0?[1-9]|1[0-2]))?((?(?の下旬|この後|の後半)|の終わり(ごろ)?|末|下旬)|(?(の)?(半ば|中旬))|(?(の)?初め|のはじめ|早くに|初旬|(?ちょっと前に|上旬(に)?)))' + DatePointWithAgoAndLater = f'((?今日)|(?昨日)|(?明日))(から|の)(\\d)(?週間|日)((?以内)|(?以上)(?前)|(?以上(あと)?))' + WeekOfMonthRegex = f'({DateRangePrepositions})((?({YearRegex}\\s*)?{MonthSuffixRegex}(的|の))(?第一|第二|第三|第四|第五|最后一|第\\d|{DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})?\\s*の?(週|周)\\s*)' + WeekOfYearRegex = f'({DateRangePrepositions})(?({YearRegex}|{RelativeRegex}年)(的|の)(?第一|第二|第三|第四|第五|最后一|第\\d|{DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})?\\s*の?(週|周)\\s*)' + WeekOfDateRegex = f'(({DateRangePrepositions})({MonthSuffixRegex}({DayRegex})(的|の))第?\\s*の?(週|周)s*)|({DayRegex}日の?(週(間)?))' + MonthOfDateRegex = f'({DateRangePrepositions})({MonthSuffixRegex}({DayRegex})(的|の))第?\\s*の?(月)s*' + RestOfDateRegex = f'((当|この|今)(?日)の)?(?残りの?)(?時間|日|週|月|年)' + UnitRegex = f'(?ヶ?(年|(个)?月|周|週間|日|天))' + FollowedUnit = f'^\\s*{UnitRegex}' + NumberCombinedWithUnit = f'(?\\d+(\\.\\d*)?){UnitRegex}' + YearMonthDayRange = f'({YearNumRegex}[/\\\\\\-]?({MonthRegex}|{MonthNumRegex})[/\\\\\\-]?({DayRegexForPeriod}|{DateDayRegexInCJK})から{YearNumRegex}[/\\\\\\-]?({MonthRegex}|{MonthNumRegex})[/\\\\\\-]?({DayRegexForPeriod}|{DateDayRegexInCJK})(までの間|まで|の間|にわたって))|(({YearNumRegex})?({MonthRegex}|{MonthNumRegex})[/\\\\\\-]?({DayRegexForPeriod}|{DateDayRegexInCJK}){WeekDayRegex}?から({MonthRegex}|{MonthNumRegex})?({DayRegexForPeriod}|{DateDayRegexInCJK}){WeekDayRegex}(までの間|まで|の間|にわたって))' + YearMonthRange = f'({YearNumRegex}[/\\\\\\-]?({MonthRegex}|{MonthNumRegex})から{YearNumRegex}[/\\\\\\-]?({MonthRegex}|{MonthNumRegex})(までの間|まで|の間|にわたって))' + MonthDayRange = f'({YearNumRegex})?({MonthRegex}|{MonthNumRegex})[/\\\\\\-]?(({DayRegexForPeriod}|{DateDayRegexInCJK})|{WeekDayRegex})から(({DayRegexForPeriod}|{DateDayRegexInCJK})|{WeekDayRegex})(までの間|まで|の間|にわたって)' + YearToYear = f'({DateRangePrepositions})(({SpecialYearRegex}|{DatePeriodYearInCJKRegex}|{YearNumRegex})から({SpecialYearRegex}|{DatePeriodYearInCJKRegex}|{YearNumRegex})(ま(での間|で)?|の間|にわたって))' + YearToYearSuffixRequired = f'^[.]' + MonthToMonth = f'({DateRangePrepositions})(({SimpleYearRegex}?({SpecialMonthRegex}|{MonthRegex})(SpecialDayRegex}}|{DayRegex})?から({SpecialMonthRegex}|{MonthRegex})(SpecialDayRegex}}|{DayRegex})?(までの間|まで|の間))|({SimpleYearRegex}{MonthRegexForPeriod}から{SimpleYearRegex}{MonthRegexForPeriod}(までの間|まで|の間))|({SimpleYearRegex}[/\\\\\\-](?{MonthNumRegexForPeriod})から{SimpleYearRegex}[/\\\\\\-](?{MonthNumRegexForPeriod})(までの間|まで|の間)))' + MonthToMonthSuffixRequired = f'^[.]' + DayToDay = f'({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})?(({SpecialMonthRegex}|{MonthRegex})の?)?(({SpecialDayRegex}|{DayRegex}|{WeekDayRegex})から(({SpecialMonthRegex}|{MonthRegex})の?)?({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})?((今月|来月|{MonthRegex})の?)?({SpecialDayRegex}|{DayRegex}|{WeekDayRegex})(までの間|まで|の間))|{SpecialDayRegex}' + FirstLastOfYearRegex = f'(({DatePeriodYearInCJKRegex}|{YearRegex}|(?再来年|翌年|来年|今年|去年))的?)((?前)|(?(最后|最後|最終)))' + ComplexDatePeriodRegex = f'({DateRangePrepositions})(?.+)(から)(?.+)(までの間|(?まで)|(?(この|(?((?以内に)|後に|向こう|后|次の|今後|今日の午後|これから(の)?|(?春(?!節)|夏|秋|冬)(天|季)?(の)?((?半ば)|(?初め|のはじめ)|(?終わり(ごろ)?|末|下旬))?' + WhichWeekRegex = f'第(?5[0-3]|[1-4]\\d|0?[1-9])週' + SeasonWithYear = f'({DateRangePrepositions})(({YearRegex}|{DatePeriodYearInCJKRegex}|(?再来年|翌年|来年|今年|去年))(的|の)?)?({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})?{SeasonRegex}' + QuarterRegex = f'({DateRangePrepositions})((({YearRegex}|{DatePeriodYearInCJKRegex}|(?再来年|翌年|来年|今年|去年))(的|の)?)(第(?1|2|3|4|一|二|三|四)(四半期|クォーター)?)|(第(?1|2|3|4|一|二|三|四)(四半期|クォーター)))|(({DatePeriodLastRegex}|{DatePeriodThisRegex}|{DatePeriodNextRegex})(四半期|クォーター))' + CenturyNumRegex = f'(?\\d|1\\d|2\\d)世紀' + CenturyRegexInCJK = f'(?一|二|三|四|五|六|七|八|九|十|十一|十二|十三|十四|十五|十六|十七|十八|十九|二十|二十一|二十二)世紀' + CenturyRegex = f'({CenturyNumRegex}|{CenturyRegexInCJK})' + RelativeCenturyRegex = f'(?({DatePeriodLastRegex}|{DatePeriodThisRegex}|{DatePeriodNextRegex}))世紀' + DecadeRegexInCJK = f'(?十|一十|二十|三十|四十|五十|六十|七十|八十|九十)' + DecadeRegex = f'({DateRangePrepositions})(?({CenturyRegex}|{CenturyRegexInCJK}|{RelativeCenturyRegex}))?の?(?(?\\d{{2}}(?=\\d)))?(?((\\d{{1}}0)|{DecadeRegexInCJK}))年代(のごろ)?' + TimeHourNumRegex = f'(?^(,?(夜の|的|の(?朝|夜|午後|晩)?|t),?|在)$)' + NowRegex = f'(?出来る限り早く|できるだけ早く|现在|马上|立刻|刚刚才|刚刚|刚才|今日中|今(?!日)(すぐ)?)' + NightRegex = f'(?早|晚|夜|泊(?=の?予約))' + TomorrowRegex = f'(?(?昨日の?(午前|午後|中|夜|泊(?=の?予約)|朝)?)' + TodayRegex = f'(?(今朝の?|今朝の午前|今晩|今晚|今早|今晨|明晚|明早|明晨|昨晚|今夜|昨夜)(的|在)?)' + FromNowRegex = f'((?今)から)' + SpecialDayHourRegex = f'((?{TimeHourCJKRegex}|{TimeHourNumRegex})(時間?|(:00)))' + SpecialDayMinuteRegex = f'((?{TimeMinuteCJKRegex}|{TimeMinuteNumRegex})分間?)' + SpecialDaySecondRegex = f'((?{TimeSecondCJKRegex}|{TimeSecondNumRegex})秒間?)' + SpecialDayModRegex = f'((?過ぎに|以降)|(?で)|(?弱|たらず)|(?以上))' + SpecialDayEndOfRegex = f'((?明日の終わり|今?({WeekDayRegex}の?終わり))|(?日の終わり|一日の終わり|その日の終わり))' + TimeOfSpecialDayRegex = f'(({SpecialDayEndOfRegex}|{WeekDayRegex}|{TomorrowRegex}|{YesterdayRegex}|あと|{TodayRegex})(\\d日)?(と)?(({SpecialDayHourRegex}{SpecialDayMinuteRegex}?{SpecialDaySecondRegex}?)|({SpecialDayMinuteRegex}{SpecialDaySecondRegex}?)){SpecialDayModRegex}?)|(({SpecialDayHourRegex}(の?うちに)))|(({SpecialDayEndOfRegex}|{TomorrowRegex}|{YesterdayRegex}|あと|{TodayRegex}){SpecialDayModRegex}?)|({WeekDayRegex}(\\d日)?(と)?{SpecialDayModRegex})|({FromNowRegex}\\d+(分|時|秒)後)' + NowTimeRegex = f'(现在|今)' + RecentlyTimeRegex = f'(刚刚才?|刚才)' + AsapTimeRegex = f'(出来る限り早く|立刻|马上)' + DateTimePeriodTillRegex = f'(? 到|至|から|--|-|—|——|~)' + DateTimePeriodFromPrefixRegex = f'(从)' + DateTimePeriodFromSuffixRegex = f'(の間|まで(の間)?)' + DateTimePeriodConnectorRegex = f'(和|与|到)' + DateTimePeriodPrepositionRegex = f'(?^\\s*(的|の(?!午)|在)\\s*$)' + BeforeAfterRegex = f'(?[零〇一二两三四五六七八九]|二十[一二三四]?|十[一二三四五六七八九]?)' + ZhijianRegex = f'^\\s*(之间|之内|期间|中间|间)' + DateTimePeriodThisRegex = f'这个|这一个|这|这一|今後|今から|これから' + DateTimePeriodLastRegex = f'上个|上一个|上|上一|昨' + DateTimePeriodNextRegex = f'下个|下一个|下|下一' + AmPmDescRegex = f'(?(am|a\\.m\\.|a m|a\\. m\\.|a\\.m|a\\. m|a m|pm|p\\.m\\.|p m|p\\. m\\.|p\\.m|p\\. m|p m|夜|晚|晩|午後|午后|午前(半ば|中)?|正午|真昼|夜中|深夜|昼食時|夕方に|朝|午後|昼(?!食)))' + TimeOfDayRegex = f'(?凌晨|清晨|早上|早|上午|中午|下午|午后|晚上|夜里|夜晚|半夜|夜间|深夜|傍晚|晩|泊(?=の?予約)|夜|((?ぎりぎり)|(今夜|今晩|今朝|今早|今晨|明晚|明早|明晨|昨晚)|(({FutureRegex}|{PastRegex})(?(日|月|火|水|木|金|土)曜日?)の(午前|午後|中|夜|泊(?=の?予約)|朝)((?(([零〇一二两三四五六七八九]|二十[一二三四]?|十[一二三四五六七八九]?)(つ)?)|([0-1]?\\d|2[0-4]))時間?)((?([二三四五]?十[一二三四五六七八九]?|六十|[零〇一二三四五六七八九])|([0-5]?\\d))分間?)?((?([二三四五]?十[一二三四五六七八九]?|六十|[零〇一二三四五六七八九])|([0-5]?\\d))秒間?)?まで)|(({FutureRegex}|{PastRegex})の?(?数)((時|分|秒)間?)))' + DateTimePeriodUnitRegex = f'(?(時|分|秒)間?)' + DateTimePeriodFollowedUnit = f'^\\s*{DateTimePeriodUnitRegex}' + DateTimePeriodNumberCombinedWithUnit = f'\\b(?\\d+(\\.\\d*)?){DateTimePeriodUnitRegex}' + PlusOneDayRegex = f'あす|あした|明日|来|次|翌' + MinusOneDayRegex = f'きのう|最後の日|前日|昨|昨日の?' + PlusTwoDayRegex = f'后天|後天|明後日|あさって|今日から二日' + MinusTwoDayRegex = f'前天|一昨日|二日前|おととい' + PlusThreeDayRegex = f'大后天|大後天|明日から二日|昨日から4日' + MinusThreeDayRegex = f'大前天|昨日の2日前|昨日から2日間' + PlusFourDayRegex = f'今日から4日' + DurationAllRegex = f'(まる)' + DurationHalfRegex = f'^[.]' + DurationRelativeDurationUnitRegex = f'(?数ヶ|数)|(?(?以内)|(?後|(?(?(?(?数(?((か|ヶ)?(時|月|日(?!都合)|週|年|周|週|週|秒|分|営業日|年)間?))(たらず|以上)?)' + DurationMoreOrLessRegex = f'(?たらず|以下|を下回る)|(?以上|を上回る)' + DurationYearRegex = f'((\\d{{3,4}})|0\\d|两千)\\s*年' + DurationHalfSuffixRegex = f'半' + DurationSuffixList = dict([("M", "分|分間"), + ("S", "秒钟|秒|秒間"), + ("H", "時|時間"), + ("D", "天|日|泊|日間"), + ("BD", "営業日"), + ("W", "星期|个星期|周|週間|週"), + ("MON", "ひと月|月間|か月間|ヶ月|ヶ月間|个月|か月|月"), + ("Y", "年|年間")]) + DurationAmbiguousUnits = [r'分钟', r'秒钟', r'秒', r'个小时', r'小时', r'天', r'日', r'泊', r'星期', r'个星期', r'周', r'个月', r'年', r'時', r'時間', r'月'] + DurationUnitRegex = f'(?年|个月|月|周|時間?|泊|(?営業)日|天|週間?|星期|个星期|か月|(?別)の?(?日|年|月|時間?)' + DurationConnectorRegex = f'^\\s*(?[と]?|,)\\s*$' + ConnectorRegex = f'^\\s*[,-]\\s*$' + LunarHolidayRegex = f'(({YearRegex}|{DatePeriodYearInCJKRegex}|(?明年|今年|去年|来年))(的)?)?(?除夕|春节|旧暦の正月初一|中秋(節|节)?|元宵(节|節)|端午(节|の節句)?|重(阳节|陽節))' + HolidayRegexList1 = f'(旧暦の)?(({YearRegex}|{DatePeriodYearInCJKRegex}|(?明年|今年|去年|来年))(的|の)?)?(?新年|五一|劳动节|国際的な労働者の日|メーデー|元旦节|元旦|の?独立記念日|大晦日|愚人节|エイプリルフール|圣诞节|クリスマス(の日|イブ)?|感謝祭(の日)?|クリーンマンデイ|父の日|植树节|国庆节|国慶節|情人节|バレンタインデー|教(师节|師の日)|儿童节|妇女节|青年(节|の日)|建军节|建軍節|女生节|光棍节|双十一|清明(节|節)?|キング牧師記念日|旧正月|ガールズデー|(こども|子ども|子供)の日|お正月|植樹祭|シングルデー|シングルズデー|国際婦人デー|ダブル十一|復活祭|イースター)(の\\d日)?' + HolidayRegexList2 = f'(({YearRegex}|{DatePeriodYearInCJKRegex}|(?明年|今年|去年|来年))(的)?)?(?母(亲节|の日)|父亲节|感恩节|万圣节|ハロウィン)' + SetUnitRegex = f'(?年|月|隔週|週|日|時|分|秒)' + SetEachUnitRegex = f'((?(毎个|毎一|毎|各)\\s*(?年|月|週|日|時|分|秒))|(?隔週))' + SetEachPrefixRegex = f'((?毎|隔|各|ごとに)\\s*$)' + SetEachSuffixRegex = f'(^\\s*(?ごとに))' + SetLastRegex = f'(?last|this|next)' + SetEachDayRegex = f'(毎|各|毎一)(天|日)\\s*$' + SetEachDateUnitRegex = f'(毎)(年|月|週)\\s*$' + TimeHourRegex = f'(?{TimeHourCJKRegex}|{TimeHourNumRegex}){TimeClockDescRegex}' + TimeMinuteRegex = f'(?{TimeMinuteCJKRegex}|{TimeMinuteNumRegex}){TimeMinuteDescRegex}' + TimeSecondRegex = f'(?{TimeSecondCJKRegex}|{TimeSecondNumRegex}){TimeSecondDescRegex}' + TimeHalfRegex = f'(?过半|半)' + TimeQuarterRegex = f'(?[一两二三四1-4])\\s*(刻钟|刻)' + LessThanHalfHourRegex = f'(?([0-2]?\\d)|(二?十[一二三四五六七八九]?|[零〇一二三四五六七八九]))({TimeMinuteDescRegex})' + TimeCJKTimeRegex = f'{TimeHourRegex}({TimeQuarterRegex}|({TimeHalfRegex}({TimeSecondRegex})?)|((((过|又)?{TimeMinuteRegex})({TimeSecondRegex})?)|({TimeSecondRegex})))?' + TimeDigitTimeRegex = f'(?{TimeHourNumRegex}):(?{TimeMinuteNumRegex})(:(?{TimeSecondNumRegex}))?({AmPmDescRegex})?' + LessTimeRegex = f'(({TimeHourRegex}|(?{TimeHourNumRegex}):){LessThanHalfHourRegex}前)({AmPmDescRegex})?' + TimeDayDescRegex = f'(?(正午|夜中|午前半ば|(昼食時)|真昼)|((?<=({TimeDigitTimeRegex}|{TimeCJKTimeRegex})(の)?)(早朝(に)?|午後(に)?|晚|晩|(深)?夜(に)?|未明|午前(中)?|日中|白昼|(未|早)?朝(に)?|昼前に|昼すぎに|夕方前に|夕方に|営業時間内に|昼(?!食)))|((早朝(に)?|午後(に)?|晚|晩|(深)?夜(に)?|泊(?=の?予約)|未明|(早朝)?午前(中)?|日中|白昼|(未|早)?朝(に)?|昼前に|昼すぎに|夕方前に|夕方に|営業時間内に|昼(?!食))(?=(の)?({TimeDigitTimeRegex}|{TimeCJKTimeRegex}))))' + TimeApproximateDescPreffixRegex = f'(ぐらい|おそらく|多分|ほとんど|まもなく|昨日の|昨日|来週の|来週|昼食時|昼食|真)' + TimeApproximateDescSuffixRegex = f'(過ぎに|過ぎ|丁度に|丁度|きっかりに|きっかり|を過ぎた頃に|を過ぎた頃|ちょっと前に|ちょっと前|近くに|近く|昼食時|昼食|ぐらい|時かっきり|頃|かっきり)' + TimeRegexes1 = f'{TimeApproximateDescPreffixRegex}?({TimeDayDescRegex}(の)?)?({TimeDigitTimeRegex}|{TimeCJKTimeRegex})((の)?{TimeDayDescRegex})?{TimeApproximateDescSuffixRegex}?' + TimeRegexes2 = f'({TimeApproximateDescPreffixRegex}(の)?)?{TimeDayDescRegex}((の)?{TimeApproximateDescSuffixRegex})?' + TimeRegexes3 = f'({TimeDayDescRegex}(の)?)?({LessTimeRegex})((の)?{TimeDayDescRegex})?' + TimePeriodTimePeriodConnectWords = f'(まで(の間)?|の間|–|-|—|~|~)' + TimePeriodLeftCJKTimeRegex = f'(?{TimeDayDescRegex}?({TimeCJKTimeRegex}))(から)?' + TimePeriodRightCJKTimeRegex = f'{TimePeriodTimePeriodConnectWords}?(?{TimeDayDescRegex}?{TimeCJKTimeRegex}){TimePeriodTimePeriodConnectWords}?' + TimePeriodLeftDigitTimeRegex = f'(?{TimeDayDescRegex}?({TimeDigitTimeRegex}))(から)?' + TimePeriodRightDigitTimeRegex = f'{TimePeriodTimePeriodConnectWords}?(?{TimeDayDescRegex}?{TimeDigitTimeRegex}){TimePeriodTimePeriodConnectWords}?' + TimePeriodShortLeftCJKTimeRegex = f'(?{TimeDayDescRegex}?({TimeHourCJKRegex}))(から)?' + TimePeriodShortLeftDigitTimeRegex = f'(?{TimeDayDescRegex}?({TimeHourNumRegex}))(から)?' + TimePeriodRegexes1 = f'({TimePeriodLeftDigitTimeRegex}{TimePeriodRightDigitTimeRegex}|{TimePeriodLeftCJKTimeRegex}{TimePeriodRightCJKTimeRegex})' + TimePeriodRegexes2 = f'(((早朝(に)?|午後(に)?|(深)?夜(に)?|未明|午前(中)?|日中|白昼|(未|早)?朝(に)?|昼前に|昼すぎに|夕方前に|夕方に|営業時間内に|昼(?!食))({TimePeriodShortLeftDigitTimeRegex}{TimePeriodRightDigitTimeRegex}|{TimePeriodShortLeftCJKTimeRegex}{TimePeriodRightCJKTimeRegex}))|((早朝(に)?|午後(に)?|(深)?夜(に)?|未明|午前(中)?|日中|白昼|(未|早)?朝(に)?|昼前に|昼すぎに|夕方前に|夕方に|営業時間内に|昼(?!食))(?=((?!({TimeCJKTimeRegex}|{TimeDigitTimeRegex})(から)?)))))' + FromToRegex = f'^[.]' + AmbiguousRangeModifierPrefix = f'^[.]' + UnspecificDatePeriodRegex = f'^(の?(分|日|週|周|月|年|時間))$' + ReferenceDatePeriodRegex = f'(同じ|その)(?月|週末|年|週)' + ParserConfigurationBefore = f'((?(または|及び|と)そ)?の前|またはそれ以前|之前|以前|前|まで|以前)' + ParserConfigurationAfter = f'(の後から|(?または)それ以降|之后|之後|以后|以後|后|の?後|以降)' + ParserConfigurationUntil = f'(直到|直至|截至|截止(到)?)' + ParserConfigurationSincePrefix = f'(自从|自|自打|打|早ければ)' + ParserConfigurationSinceSuffix = f'(またはその後|以来|开始|(?早|晨|am)' + DateTimeSimplePmRegex = f'(?晚|晩|pm)' + DateTimePeriodMORegex = f'(朝|凌晨|清晨|早上|早|上午)' + DateTimePeriodMIRegex = f'昼(?!食)' + DateTimePeriodAFRegex = f'(中午|下午|午后|傍晚)' + DateTimePeriodEVRegex = f'(晚上|夜里|夜晚|晚|晩)' + DateTimePeriodNIRegex = f'(半夜|夜间|深夜|夜|泊(?=の?予約))' + AmbiguityFiltersDict = dict([("^\\d{1,2}\\.\\d{1,2}$", "\\d{1,2}\\.\\d{1,2}(?!\\s*に[戻残]|から|で)")]) + AmbiguityDateFiltersDict = dict([("^今週$", "今週"), + ("^[1一]日$", "[1一]日")]) + AmbiguityDateTimeFiltersDict = dict([("から.+まで", "")]) + AmbiguityDatePeriodFiltersDict = dict([("^年$", "年"), + ("(よい|いい)([0-9]|[一二三四五六七八九十])?か?(日|週|月|年)間?", "(よい|いい)([0-9]|[一二三四五六七八九十])?か?(日|週|月|年)間?")]) + AmbiguityTimeFiltersDict = dict([("^(\\d+|[一二三四五六七八九十廿])時$", "(\\d+|[一二三四五六七八九十廿])時間")]) + AmbiguityTimePeriodFiltersDict = dict([("^早$", "早")]) + AmbiguityDurationFiltersDict = dict([("月", "(?fiscal|escolar|letivo))' OneWordPeriodRegex = f'\\b(((pr[oó]xim[oa]?|[nd]?es[st]e|aquel[ea]|[uú]ltim[oa]?|em)\\s+)?(?abr(il)?|ago(sto)?|dez(embro)?|fev(ereiro)?|jan(eiro)?|ju[ln](ho)?|mar([çc]o)?|maio?|nov(embro)?|out(ubro)?|sep?t(embro)?)|({RelativeRegex}\\s+)?(ano\\s+{SpecialYearPrefixes}|{SpecialYearPrefixes}\\s+ano)|(?<=\\b(de|do|da|o|a)\\s+)?(pr[oó]xim[oa](s)?|[uú]ltim[oa]s?|est(e|a))\\s+(fim de semana|fins de semana|semana|m[êe]s|ano)|fim de semana|fins de semana|(m[êe]s|anos)? [àa] data)\\b' - MonthWithYearRegex = f'\\b((((pr[oó]xim[oa](s)?|[nd]?es[st]e|aquele|[uú]ltim[oa]?|em)\\s+)?{MonthRegex}|((n?o\\s+)?(?primeiro|1o|segundo|2o|terceiro|3o|[cq]uarto|4o|quinto|5o|sexto|6o|s[eé]timo|7o|oitavo|8o|nono|9o|d[eé]cimo(\\s+(primeiro|segundo))?|10o|11o|12o|[uú]ltimo)\\s+m[eê]s(?=\\s+(d[aeo]|[ao]))))\\s+((d[aeo]|[ao])\\s+)?({YearRegex}|{TwoDigitYearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|[nd]?es[st]e)\\s+ano))\\b' + MonthWithYearRegex = f'\\b((((pr[oó]xim[oa](s)?|[nd]?es[st]e|aquele|[uú]ltim[oa]?|em)\\s+)?{MonthRegex}|((n?o\\s+)?(?primeiro|1o|segundo|2o|terceiro|3o|[cq]uarto|4o|quinto|5o|sexto|6o|s[eé]timo|7o|oitavo|8o|nono|9o|d[eé]cimo(\\s+(primeiro|segundo))?|10o|11o|12o|[uú]ltimo)\\s+m[eê]s(?=\\s+(d[aeo]|[ao]))))\\s+((d[aeo]|[ao])\\s+)?({YearRegex}|\\\'?{TwoDigitYearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|[nd]?es[st]e)\\s+ano))\\b' MonthNumWithYearRegex = f'({YearRegex}(\\s*?)[/\\-\\.](\\s*?){MonthNumRegex})|({MonthNumRegex}(\\s*?)[/\\-](\\s*?){YearRegex})' WeekOfMonthRegex = f'(?(a|na\\s+)?(?primeira?|1a|segunda|2a|terceira|3a|[qc]uarta|4a|quinta|5a|[uú]ltima)\\s+semana\\s+{MonthSuffixRegex})' WeekOfYearRegex = f'(?(a|na\\s+)?(?primeira?|1a|segunda|2a|terceira|3a|[qc]uarta|4a|quinta|5a|[uú]ltima?)\\s+semana(\\s+d[oe]?)?\\s+({YearRegex}|(?pr[oó]ximo|[uú]ltimo|[nd]?es[st]e)\\s+ano))' @@ -97,7 +97,7 @@ class PortugueseDateTime: MonthEndRegex = f'({MonthRegex}\\s*(o)?\\s*$)' WeekDayEnd = f'{WeekDayRegex}\\s*,?\\s*$' WeekDayStart = f'^\\b$' - DateYearRegex = f'(?{YearRegex}|{TwoDigitYearRegex})' + DateYearRegex = f'(?{YearRegex}|\\\'?{TwoDigitYearRegex})' DateExtractor1 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*))?{DayRegex}((\\s*(de)|[/\\\\\\.\\- ])\\s*)?{MonthRegex}\\b' DateExtractor2 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*))?({DayRegex}(\\s*([/\\.\\-]|de)?\\s*{MonthRegex}|\\s+de\\s+{MonthNumRegex})(\\s*([,./-]|de|\\s+)\\s*){DateYearRegex}|{BaseDateTime.FourDigitYearRegex}\\s*[/\\.\\- ]\\s*{DayRegex}\\s*[/\\.\\- ]\\s*{MonthRegex})\\b' DateExtractor3 = f'\\b({WeekDayRegex}(\\s+|\\s*,\\s*))?{MonthRegex}(\\s*[/\\.\\- ]\\s*|\\s+de\\s+){DayRegex}(?!\\s*\\-\\s*\\d{{2}}\\b)((\\s*[/\\.\\- ]\\s*|\\s+de\\s+){DateYearRegex})?\\b' diff --git a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py index 77cda13a91..d92ee27e2f 100644 --- a/Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py +++ b/Python/libraries/recognizers-date-time/recognizers_date_time/resources/spanish_date_time.py @@ -53,7 +53,7 @@ class SpanishDateTime: DayBetweenRegex = f'\\b((entre(\\s+el)?)\\s+)({DayRegex})\\s*{RangeConnectorRegex}\\s*({DayRegex})\\s+{MonthSuffixRegex}((\\s+|\\s*,\\s*)((en|del?)\\s+)?{YearRegex})?\\b' SpecialYearPrefixes = f'((del\\s+)?calend[aá]rio|(?fiscal|escolar))' OneWordPeriodRegex = f'\\b(((((la|el)\\s+)?mes\\s+(({OfPrepositionRegex})\\s+)?)|((pr[oó]xim[oa]?|est[ea]|[uú]ltim[oa]?)\\s+))?({MonthRegex})|((el\\s+)?{RelativeRegex}\\s+)?(({SpecialYearPrefixes}\\s+)año|año\\s+{SpecialYearPrefixes})|(((la|el)\\s+)?((({RelativeRegex}\\s+)({DateUnitRegex}|(fin\\s+de\\s+)?semana|finde)(\\s+{RelativeSuffixRegex})?)|{DateUnitRegex}(\\s+{RelativeSuffixRegex}))|va\\s+de\\s+{DateUnitRegex}|((año|mes)(\\s+(a|hasta)\\s+la\\s+fecha)?|((el\\s+)?fin\\s+de\\s+)?semana|(el\\s+)?finde))\\b)' - MonthWithYearRegex = f'\\b((((pr[oó]xim[oa](s)?|est?[ae]|[uú]ltim[oa]?)\\s+)?{MonthRegex}|((el\\s+)?(?primero?|1(er|ro)|segundo|2do|tercero?|3(er|ro)|uarto|4to|quinto|5to|sexto|6to|s[eé]ptimo|7mo|octavo|8vo|noveno|9no|d[eé]cimo|10mo|und[eé]cimo|11mo|duod[eé]cimo|12mo|[uú]ltimo)\\s+mes(?=\\s+(del?|en))))((\\s+|(\\s*[,-]\\s*))((de(l|\\s+la)?|en)\\s+)?({YearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|este)\\s+año)|\\s+(del?|en)\\s+{TwoDigitYearRegex}))\\b' + MonthWithYearRegex = f'\\b((((pr[oó]xim[oa](s)?|est?[ae]|[uú]ltim[oa]?)\\s+)?{MonthRegex}|((el\\s+)?(?primero?|1(er|ro)|segundo|2do|tercero?|3(er|ro)|uarto|4to|quinto|5to|sexto|6to|s[eé]ptimo|7mo|octavo|8vo|noveno|9no|d[eé]cimo|10mo|und[eé]cimo|11mo|duod[eé]cimo|12mo|[uú]ltimo)\\s+mes(?=\\s+(del?|en))))((\\s+|(\\s*[,-]\\s*))((de(l|\\s+la)?|en)\\s+)?({YearRegex}|(?pr[oó]ximo(s)?|[uú]ltimo?|este)\\s+año)|\\s+(del?|en)\\s+\\\'?{TwoDigitYearRegex}))\\b' MonthNumWithYearRegex = f'\\b(({YearRegex}(\\s*?)[/\\-\\.~](\\s*?){MonthNumRegex})|({MonthNumRegex}(\\s*?)[/\\-\\.~](\\s*?){YearRegex}))\\b' WeekOfMonthRegex = f'(?(la\\s+)?(?primera?|1ra|segunda|2da|tercera?|3ra|cuarta|4ta|quinta|5ta|([12345](\\.)?ª)|[uú]ltima)\\s+semana\\s+{MonthSuffixRegex}((\\s+de)?\\s+({BaseDateTime.FourDigitYearRegex}|{RelativeRegex}\\s+año))?)\\b' WeekOfYearRegex = f'(?(la\\s+)?(?primera?|1ra|segunda|2da|tercera?|3ra|cuarta|4ta|quinta|5ta|[uú]ltima?|([12345]ª))\\s+semana(\\s+(del?|en))?\\s+({YearRegex}|(?pr[oó]ximo|[uú]ltimo|este)\\s+año))' @@ -108,16 +108,16 @@ class SpanishDateTime: MonthEndRegex = f'({MonthRegex}\\s*(el)?\\s*$)' WeekDayEnd = f'{WeekDayRegex}\\s*,?\\s*$' WeekDayStart = f'^\\b$' - DateYearRegex = f'(?{YearRegex}|(?{YearRegex}|(?2[0-4]|[0-1]?\\d)' HourNumRegex = f'\\b(?cero|una|dos|tres|cuatro|cinco|seis|siete|ocho|nueve|diez|once|doce)\\b' diff --git a/Python/libraries/recognizers-date-time/resource-definitions.json b/Python/libraries/recognizers-date-time/resource-definitions.json index 26f06bfbf8..f67482e337 100644 --- a/Python/libraries/recognizers-date-time/resource-definitions.json +++ b/Python/libraries/recognizers-date-time/resource-definitions.json @@ -114,6 +114,57 @@ "class TimeZoneDefinitions:" ], "footer": [ "# pylint: enable=line-too-long" ] + }, + { + "input": [ + "Dutch", "Dutch-DateTime" + ], + "output": "dutch_date_time", + "header": [ + "from .base_date_time import BaseDateTime", + "# pylint: disable=line-too-long", + "", + "", + "class DutchDateTime:" + ], + "footer": [ + "# pylint: enable=line-too-long" + ] + }, + { + "input": [ "Dutch", "Dutch-TimeZone" ], + "output": "dutch_time_zone", + "header": [ + "# pylint: disable=line-too-long", + "", + "", + "class TimeZoneDefinitions:" + ], + "footer": [ "# pylint: enable=line-too-long" ] + }, + { + "input": [ "Japanese", "Japanese-DateTime" ], + "output": "japanese_date_time", + "header": [ + "from .base_date_time import BaseDateTime", + "# pylint: disable=line-too-long", + "", + "", + "class JapaneseDateTime:" + ], + "footer": [ "# pylint: enable=line-too-long" ] + }, + { + "input": [ "Arabic", "Arabic-DateTime" ], + "output": "arabic_date_time", + "header": [ + "from .base_date_time import BaseDateTime", + "# pylint: disable=line-too-long", + "", + "", + "class ArabicDateTime:" + ], + "footer": [ "# pylint: enable=line-too-long" ] } ] } \ No newline at end of file diff --git a/Python/libraries/recognizers-date-time/setup.py b/Python/libraries/recognizers-date-time/setup.py index 49fda22c40..ea3783a53f 100644 --- a/Python/libraries/recognizers-date-time/setup.py +++ b/Python/libraries/recognizers-date-time/setup.py @@ -9,10 +9,10 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = 'recognizers-text-date-time' -VERSION = '1.0.0.a0' -REQUIRES = ['recognizers-text', 'recognizers-text-number', - 'recognizers-text-number-with-unit', 'regex', 'datedelta'] +NAME = 'recognizers-text-date-time-genesys' +VERSION = '1.0.77' +REQUIRES = ['recognizers-text-genesys', 'recognizers-text-number-genesys', + 'recognizers-text-number-with-unit-genesys', 'regex', 'datedelta', 'python-dateutil'] setup( name=NAME, diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/__init__.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/__init__.py new file mode 100644 index 0000000000..c27932f374 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/__init__.py @@ -0,0 +1,2 @@ +from .extractors import * +from .parsers import * \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/extractors.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/extractors.py new file mode 100644 index 0000000000..808807b1b7 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/extractors.py @@ -0,0 +1,85 @@ +from typing import Dict, List, Pattern + +from recognizers_text.culture import Culture +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility +from recognizers_number.culture import CultureInfo +from recognizers_number.number.models import NumberMode +from recognizers_number.number.arabic.extractors import ArabicNumberExtractor +from recognizers_number_with_unit.number_with_unit.constants import Constants +from recognizers_number_with_unit.number_with_unit.extractors import NumberWithUnitExtractorConfiguration +from recognizers_number_with_unit.resources.arabic_numeric_with_unit import ArabicNumericWithUnit +from recognizers_number_with_unit.resources.base_units import BaseUnits + + +class ArabicNumberWithUnitExtractorConfiguration(NumberWithUnitExtractorConfiguration): + @property + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + return None + + @property + def unit_num_extractor(self) -> Extractor: + return self._unit_num_extractor + + @property + def build_prefix(self) -> str: + return self._build_prefix + + @property + def build_suffix(self) -> str: + return self._build_suffix + + @property + def connector_token(self) -> str: + return None + + @property + def compound_unit_connector_regex(self) -> Pattern: + return self._compound_unit_connector_regex + + @property + def non_unit_regex(self) -> Pattern: + return self._pm_non_unit_regex + + @property + def ambiguous_unit_number_multiplier_regex(self) -> Pattern: + return None + + def expand_half_suffix(self, source, result, numbers): + pass + + def __init__(self, culture_info: CultureInfo): + if culture_info is None: + culture_info = CultureInfo(Culture.Arabic) + super().__init__(culture_info) + self._unit_num_extractor = ArabicNumberExtractor(NumberMode.Unit) + self._build_prefix = ArabicNumericWithUnit.BuildPrefix + self._build_suffix = ArabicNumericWithUnit.BuildSuffix + self._compound_unit_connector_regex = RegExpUtility.get_safe_reg_exp( + ArabicNumericWithUnit.CompoundUnitConnectorRegex) + self._pm_non_unit_regex = RegExpUtility.get_safe_reg_exp( + BaseUnits.PmNonUnitRegex) + + +class ArabicCurrencyExtractorConfiguration(ArabicNumberWithUnitExtractorConfiguration): + @property + def extract_type(self) -> str: + return Constants.SYS_UNIT_CURRENCY + + @property + def suffix_list(self) -> Dict[str, str]: + return self._suffix_list + + @property + def prefix_list(self) -> Dict[str, str]: + return self._prefix_list + + @property + def ambiguous_unit_list(self) -> List[str]: + return self._ambiguous_unit_list + + def __init__(self, culture_info: CultureInfo = None): + super().__init__(culture_info) + self._suffix_list = ArabicNumericWithUnit.CurrencySuffixList + self._prefix_list = ArabicNumericWithUnit.CurrencyPrefixList + self._ambiguous_unit_list = ArabicNumericWithUnit.AmbiguousCurrencyUnitList \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/parsers.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/parsers.py new file mode 100644 index 0000000000..303ae029a8 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/arabic/parsers.py @@ -0,0 +1,41 @@ +from recognizers_text.culture import Culture +from recognizers_text.extractor import Extractor +from recognizers_text.parser import Parser +from recognizers_number.culture import CultureInfo +from recognizers_number.number.arabic.extractors import ArabicNumberExtractor, NumberMode +from recognizers_number.number.parser_factory import AgnosticNumberParserFactory, ParserType +from recognizers_number.number.arabic.parsers import ArabicNumberParserConfiguration +from recognizers_number_with_unit.number_with_unit.parsers import NumberWithUnitParserConfiguration +from recognizers_number_with_unit.resources.arabic_numeric_with_unit import ArabicNumericWithUnit + + +class ArabicNumberWithUnitParserConfiguration(NumberWithUnitParserConfiguration): + @property + def internal_number_parser(self) -> Parser: + return self._internal_number_parser + + @property + def internal_number_extractor(self) -> Extractor: + return self._internal_number_extractor + + @property + def connector_token(self) -> str: + return None + + def __init__(self, culture_info: CultureInfo): + if culture_info is None: + culture_info = CultureInfo(Culture.Arabic) + super().__init__(culture_info) + self._internal_number_extractor = ArabicNumberExtractor( + NumberMode.DEFAULT) + self._internal_number_parser = AgnosticNumberParserFactory.get_parser( + ParserType.NUMBER, ArabicNumberParserConfiguration(culture_info)) + + +class ArabicCurrencyParserConfiguration(ArabicNumberWithUnitParserConfiguration): + def __init__(self, culture_info: CultureInfo = None): + super().__init__(culture_info) + self.add_dict_to_unit_map(ArabicNumericWithUnit.CurrencySuffixList) + self.add_dict_to_unit_map(ArabicNumericWithUnit.CurrencyPrefixList) + self.currency_name_to_iso_code_map = ArabicNumericWithUnit.CurrencyNameToIsoCodeMap + self.currency_fraction_code_list = ArabicNumericWithUnit.FractionalUnitNameToCodeMap \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/__init__.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/__init__.py new file mode 100644 index 0000000000..c27932f374 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/__init__.py @@ -0,0 +1,2 @@ +from .extractors import * +from .parsers import * \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/extractors.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/extractors.py new file mode 100644 index 0000000000..83ff689ccf --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/extractors.py @@ -0,0 +1,85 @@ +from typing import Dict, List, Pattern + +from recognizers_text.culture import Culture +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility +from recognizers_number.culture import CultureInfo +from recognizers_number.number.models import NumberMode +from recognizers_number.number.catalan.extractors import CatalanNumberExtractor +from recognizers_number_with_unit.number_with_unit.constants import Constants +from recognizers_number_with_unit.number_with_unit.extractors import NumberWithUnitExtractorConfiguration +from recognizers_number_with_unit.resources.catalan_numeric_with_unit import CatalanNumericWithUnit +from recognizers_number_with_unit.resources.base_units import BaseUnits + + +class CatalanNumberWithUnitExtractorConfiguration(NumberWithUnitExtractorConfiguration): + @property + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + return None + + @property + def unit_num_extractor(self) -> Extractor: + return self._unit_num_extractor + + @property + def build_prefix(self) -> str: + return self._build_prefix + + @property + def build_suffix(self) -> str: + return self._build_suffix + + @property + def connector_token(self) -> str: + return None + + @property + def compound_unit_connector_regex(self) -> Pattern: + return self._compound_unit_connector_regex + + @property + def non_unit_regex(self) -> Pattern: + return self._pm_non_unit_regex + + @property + def ambiguous_unit_number_multiplier_regex(self) -> Pattern: + return None + + def expand_half_suffix(self, source, result, numbers): + pass + + def __init__(self, culture_info: CultureInfo): + if culture_info is None: + culture_info = CultureInfo(Culture.Catalan) + super().__init__(culture_info) + self._unit_num_extractor = CatalanNumberExtractor(NumberMode.Unit) + self._build_prefix = CatalanNumericWithUnit.BuildPrefix + self._build_suffix = CatalanNumericWithUnit.BuildSuffix + self._compound_unit_connector_regex = RegExpUtility.get_safe_reg_exp( + CatalanNumericWithUnit.CompoundUnitConnectorRegex) + self._pm_non_unit_regex = RegExpUtility.get_safe_reg_exp( + BaseUnits.PmNonUnitRegex) + + +class CatalanCurrencyExtractorConfiguration(CatalanNumberWithUnitExtractorConfiguration): + @property + def extract_type(self) -> str: + return Constants.SYS_UNIT_CURRENCY + + @property + def suffix_list(self) -> Dict[str, str]: + return self._suffix_list + + @property + def prefix_list(self) -> Dict[str, str]: + return self._prefix_list + + @property + def ambiguous_unit_list(self) -> List[str]: + return self._ambiguous_unit_list + + def __init__(self, culture_info: CultureInfo = None): + super().__init__(culture_info) + self._suffix_list = CatalanNumericWithUnit.CurrencySuffixList + self._prefix_list = CatalanNumericWithUnit.CurrencyPrefixList + self._ambiguous_unit_list = CatalanNumericWithUnit.AmbiguousCurrencyUnitList \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/parsers.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/parsers.py new file mode 100644 index 0000000000..088fdf3b0e --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/catalan/parsers.py @@ -0,0 +1,41 @@ +from recognizers_text.culture import Culture +from recognizers_text.extractor import Extractor +from recognizers_text.parser import Parser +from recognizers_number.culture import CultureInfo +from recognizers_number.number.catalan.extractors import CatalanNumberExtractor, NumberMode +from recognizers_number.number.parser_factory import AgnosticNumberParserFactory, ParserType +from recognizers_number.number.catalan.parsers import CatalanNumberParserConfiguration +from recognizers_number_with_unit.number_with_unit.parsers import NumberWithUnitParserConfiguration +from recognizers_number_with_unit.resources.catalan_numeric_with_unit import CatalanNumericWithUnit + + +class CatalanNumberWithUnitParserConfiguration(NumberWithUnitParserConfiguration): + @property + def internal_number_parser(self) -> Parser: + return self._internal_number_parser + + @property + def internal_number_extractor(self) -> Extractor: + return self._internal_number_extractor + + @property + def connector_token(self) -> str: + return None + + def __init__(self, culture_info: CultureInfo): + if culture_info is None: + culture_info = CultureInfo(Culture.Catalan) + super().__init__(culture_info) + self._internal_number_extractor = CatalanNumberExtractor( + NumberMode.DEFAULT) + self._internal_number_parser = AgnosticNumberParserFactory.get_parser( + ParserType.NUMBER, CatalanNumberParserConfiguration(culture_info)) + + +class CatalanCurrencyParserConfiguration(CatalanNumberWithUnitParserConfiguration): + def __init__(self, culture_info: CultureInfo = None): + super().__init__(culture_info) + self.add_dict_to_unit_map(CatalanNumericWithUnit.CurrencySuffixList) + self.add_dict_to_unit_map(CatalanNumericWithUnit.CurrencyPrefixList) + self.currency_name_to_iso_code_map = CatalanNumericWithUnit.CurrencyNameToIsoCodeMap + self.currency_fraction_code_list = CatalanNumericWithUnit.FractionalUnitNameToCodeMap \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/__init__.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/__init__.py new file mode 100644 index 0000000000..d79a5447e6 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/__init__.py @@ -0,0 +1,2 @@ +from .extractors import * +from .parsers import * diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/extractors.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/extractors.py new file mode 100644 index 0000000000..fce647f78e --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/extractors.py @@ -0,0 +1,96 @@ +from typing import Dict, List, Pattern + +from recognizers_text.culture import Culture +from recognizers_text.extractor import Extractor +from recognizers_text.utilities import RegExpUtility +from recognizers_number.culture import CultureInfo +from recognizers_number.number.japanese.extractors import JapaneseNumberExtractor, JapaneseNumberExtractorMode +from recognizers_number_with_unit.number_with_unit.constants import Constants +from recognizers_number_with_unit.number_with_unit.extractors import NumberWithUnitExtractorConfiguration +from recognizers_number_with_unit.resources.japanese_numeric_with_unit import JapaneseNumericWithUnit +from recognizers_number_with_unit.resources.base_units import BaseUnits +from recognizers_number_with_unit.number_with_unit.utilities import CommonUtils + + +# pylint: disable=abstract-method +class JapaneseNumberWithUnitExtractorConfiguration(NumberWithUnitExtractorConfiguration): + + @property + def ambiguity_filters_dict(self) -> Dict[Pattern, Pattern]: + return JapaneseNumericWithUnit.AmbiguityFiltersDict + + @property + def unit_num_extractor(self) -> Extractor: + return self._unit_num_extractor + + @property + def build_prefix(self) -> str: + return self._build_prefix + + @property + def build_suffix(self) -> str: + return self._build_suffix + + @property + def connector_token(self) -> str: + return self._connector_token + + @property + def compound_unit_connector_regex(self) -> Pattern: + return self._compound_unit_connector_regex + + @property + def non_unit_regex(self) -> Pattern: + return self._pm_non_unit_regex + + @property + def half_unit_regex(self) -> Pattern: + return self._half_unit_regex + + @property + def ambiguous_unit_number_multiplier_regex(self) -> Pattern: + return None + + def expand_half_suffix(self, source, result, numbers): + return CommonUtils.expand_half_suffix(source, result, numbers, self.half_unit_regex) + + def __init__(self, culture_info: CultureInfo): + if culture_info is None: + culture_info = CultureInfo(Culture.Japanese) + super().__init__(culture_info) + self._unit_num_extractor = JapaneseNumberExtractor(JapaneseNumberExtractorMode.EXTRACT_ALL) + self._build_prefix = JapaneseNumericWithUnit.BuildPrefix + self._build_suffix = JapaneseNumericWithUnit.BuildSuffix + self._connector_token = JapaneseNumericWithUnit.ConnectorToken + self._compound_unit_connector_regex = RegExpUtility.get_safe_reg_exp( + JapaneseNumericWithUnit.CompoundUnitConnectorRegex) + self._pm_non_unit_regex = RegExpUtility.get_safe_reg_exp( + BaseUnits.PmNonUnitRegex) + self._half_unit_regex = RegExpUtility.get_safe_reg_exp(JapaneseNumericWithUnit.HalfUnitRegex) + + +# pylint: enable=abstract-method + +class JapaneseCurrencyExtractorConfiguration(JapaneseNumberWithUnitExtractorConfiguration): + @property + def extract_type(self) -> str: + return Constants.SYS_UNIT_CURRENCY + + @property + def suffix_list(self) -> Dict[str, str]: + return self._suffix_list + + @property + def prefix_list(self) -> Dict[str, str]: + return self._prefix_list + + @property + def ambiguous_unit_list(self) -> List[str]: + return self._ambiguous_unit_list + + def __init__(self, culture_info: CultureInfo = None): + super().__init__(culture_info) + self._suffix_list = JapaneseNumericWithUnit.CurrencySuffixList + self._prefix_list = JapaneseNumericWithUnit.CurrencyPrefixList + self._ambiguous_unit_list = JapaneseNumericWithUnit.CurrencyAmbiguousValues + diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/parsers.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/parsers.py new file mode 100644 index 0000000000..8c9e0810f7 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/japanese/parsers.py @@ -0,0 +1,46 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from recognizers_text.culture import Culture +from recognizers_text.extractor import Extractor +from recognizers_text.parser import Parser +from recognizers_number.culture import CultureInfo +from recognizers_number.number.japanese.extractors import JapaneseNumberExtractor, JapaneseNumberExtractorMode +from recognizers_number.number.parser_factory import AgnosticNumberParserFactory, ParserType +from recognizers_number.number.japanese.parsers import JapaneseNumberParserConfiguration +from recognizers_number_with_unit.number_with_unit.parsers import NumberWithUnitParserConfiguration +from recognizers_number_with_unit.resources.japanese_numeric_with_unit import JapaneseNumericWithUnit + + +class JapaneseNumberWithUnitParserConfiguration(NumberWithUnitParserConfiguration): + @property + def internal_number_parser(self) -> Parser: + return self._internal_number_parser + + @property + def internal_number_extractor(self) -> Extractor: + return self._internal_number_extractor + + @property + def connector_token(self) -> str: + return self._connector_token + + def __init__(self, culture_info: CultureInfo): + if culture_info is None: + culture_info = CultureInfo(Culture.Japanese) + super().__init__(culture_info) + self._internal_number_extractor = JapaneseNumberExtractor( + JapaneseNumberExtractorMode.EXTRACT_ALL) + self._internal_number_parser = AgnosticNumberParserFactory.get_parser( + ParserType.NUMBER, JapaneseNumberParserConfiguration(culture_info)) + self._connector_token = JapaneseNumericWithUnit.ConnectorToken + + +class JapaneseCurrencyParserConfiguration(JapaneseNumberWithUnitParserConfiguration): + def __init__(self, culture_info: CultureInfo = None): + super().__init__(culture_info) + self.add_dict_to_unit_map(JapaneseNumericWithUnit.CurrencySuffixList) + self.add_dict_to_unit_map(JapaneseNumericWithUnit.CurrencyPrefixList) + self.currency_name_to_iso_code_map = JapaneseNumericWithUnit.CurrencyNameToIsoCodeMap + self.currency_fraction_code_list = JapaneseNumericWithUnit.FractionalUnitNameToCodeMap + diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/models.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/models.py index 61f19c18a7..a4d859eea6 100644 --- a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/models.py +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/models.py @@ -43,7 +43,7 @@ def parse(self, query: str) -> List[ModelResult]: parse_results.append(j) else: parse_results.append(r) - + model_result = None for parse_result in parse_results: model_result = ModelResult() model_result.start = parse_result.start @@ -57,6 +57,8 @@ def parse(self, query: str) -> List[ModelResult]: if b_add: extraction_results.append(model_result) + if model_result: + break except Exception: pass diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/number_with_unit_recognizer.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/number_with_unit_recognizer.py index eaf9bccf0b..96d0606e52 100644 --- a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/number_with_unit_recognizer.py +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/number_with_unit_recognizer.py @@ -1,6 +1,3 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - from enum import IntFlag from typing import List from recognizers_text import Culture, Recognizer @@ -61,6 +58,12 @@ from .german.parsers import GermanCurrencyParserConfiguration from .italian.extractors import ItalianCurrencyExtractorConfiguration from .italian.parsers import ItalianCurrencyParserConfiguration +from .japanese.extractors import JapaneseCurrencyExtractorConfiguration +from .japanese.parsers import JapaneseCurrencyParserConfiguration +from .catalan.extractors import CatalanCurrencyExtractorConfiguration +from .catalan.parsers import CatalanCurrencyParserConfiguration +from recognizers_number_with_unit.number_with_unit.arabic.extractors import ArabicCurrencyExtractorConfiguration +from recognizers_number_with_unit.number_with_unit.arabic.parsers import ArabicCurrencyParserConfiguration class NumberWithUnitOptions(IntFlag): @@ -264,6 +267,37 @@ def initialize_configuration(self): ])) # endregion + # region Japanese + self.register_model('CurrencyModel', Culture.Japanese, lambda options: CurrencyModel([ + ExtractorParserModel( + BaseMergedUnitExtractor( + JapaneseCurrencyExtractorConfiguration()), + BaseMergedUnitParser(JapaneseCurrencyParserConfiguration())), + ExtractorParserModel( + NumberWithUnitExtractor( + EnglishCurrencyExtractorConfiguration()), + NumberWithUnitParser(EnglishCurrencyParserConfiguration())) + ])) + # endregion + + # region Catalan + self.register_model('CurrencyModel', Culture.Catalan, lambda options: CurrencyModel([ + ExtractorParserModel( + BaseMergedUnitExtractor( + CatalanCurrencyExtractorConfiguration()), + BaseMergedUnitParser(CatalanCurrencyParserConfiguration())) + ])) + # endregion + + # region Arabic + self.register_model('CurrencyModel', Culture.Arabic, lambda options: CurrencyModel([ + ExtractorParserModel( + BaseMergedUnitExtractor( + ArabicCurrencyExtractorConfiguration()), + BaseMergedUnitParser(ArabicCurrencyParserConfiguration())) + ])) + # endregion + def get_age_model(self, culture: str = None, fallback_to_default_culture: bool = True) -> Model: return self.get_model('AgeModel', culture, fallback_to_default_culture) @@ -300,4 +334,4 @@ def recognize_temperature(query: str, culture: str, options: NumberWithUnitOptio recognizer = NumberWithUnitRecognizer(culture, options) model = recognizer.get_temperature_model( culture, fallback_to_default_culture) - return model.parse(query) + return model.parse(query) \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/utilities.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/utilities.py index ac83a20c64..ee7c65b3b9 100644 --- a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/utilities.py +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/number_with_unit/utilities.py @@ -1,7 +1,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -from typing import Dict +from typing import Dict, List, Pattern +from recognizers_text import ExtractResult, RegExpUtility class DictionaryUtility(): @@ -53,3 +54,45 @@ def end(self) -> int: @end.setter def end(self, value) -> int: self._end = value + + +class CommonUtils: + # Expand patterns with 'half' suffix in CJK implementation. + @staticmethod + def expand_half_suffix(source: str, result: List[ExtractResult], numbers: List[ExtractResult], + half_unit_regex: Pattern) -> List[ExtractResult]: + if half_unit_regex and numbers: + match: List[ExtractResult] = [] + + for number in numbers: + if len(RegExpUtility.get_matches(half_unit_regex, number.text)) == 1: + match.append(number) + if len(match) > 0: + res: List[ExtractResult] = [] + for er in result: + start = int(er.start) + length = int(er.length) + match_suffix: List[ExtractResult] = [] + for mr in match: + # Take into account possible whitespaces between result and half unit. + if int(mr.start) - (start + length) >= 0: + sub_length = int(mr.start) - (start + length) + else: + sub_length = 0 + mid_str = source[start+length:sub_length] + if not mid_str and int(mr.start) - (start + length) >= 0: + match_suffix.append(mr) + + if len(match_suffix) == 1: + mr = match_suffix[0] + suffix_length = int(mr.start) + int(mr.length) - (start + length) + er.length += suffix_length + er.text += source[start+length:suffix_length] + tmp = ExtractResult() + tmp.data = er.data + er.data = [tmp, mr] + res.append(er) + result = res + return result + + diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/__init__.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/__init__.py index 4ec196c636..566ce494c4 100644 --- a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/__init__.py +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/__init__.py @@ -1,6 +1,3 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - from .base_numbers import BaseNumbers from .chinese_numeric_with_unit import ChineseNumericWithUnit from .english_numeric_with_unit import EnglishNumericWithUnit @@ -10,3 +7,6 @@ from .dutch_numeric_with_unit import DutchNumericWithUnit from .portuguese_numeric_with_unit import PortugueseNumericWithUnit from .spanish_numeric_with_unit import SpanishNumericWithUnit +from .japanese_numeric_with_unit import JapaneseNumericWithUnit +from .catalan_numeric_with_unit import CatalanNumericWithUnit +from .arabic_numeric_with_unit import ArabicNumericWithUnit diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/arabic_numeric_with_unit.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/arabic_numeric_with_unit.py new file mode 100644 index 0000000000..7710baaaa8 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/arabic_numeric_with_unit.py @@ -0,0 +1,636 @@ +from .base_numbers import BaseNumbers + + +# pylint: disable=line-too-long + + +class ArabicNumericWithUnit: + CurrencySuffixList = dict([("Abkhazian apsar", "أبخازية أبسار"), + ("Afghan afghani", "أفغاني أفغاني|؋|الأفغاني|أفغاني"), + ("Pul", "بول"), + ("Euro", "EUR|يورو|اليورو|€|يورو"), + ("Cent", "سنتا|سنت|-سنتا|-سنت"), + ("Albanian lek", "ليك الألباني|ليك|ليك"), + ("Qindarkë", "qindarkë|qindarkës|qindarke|qindarkes"), + ("Angolan kwanza", "كوانزا الأنغولية|kz|aoa|كوانزا|كوانزاس|الكوانزا الأنغولية"), + ("Armenian dram", "الدرام الأرمنية|الدراما الأرمنية"), + ("Aruban florin", "فلورين أروبي|ƒ|awg|فلورين أروبي"), + ("Bangladeshi taka", "تاكا بنجلاديشي|৳|bdt|تاكا|تاكاس|تاكا بنجلاديشي"), + ("Paisa", "بويشا|بيسا"), + ("Bhutanese ngultrum", "نولتروم بوتاني|نو.|btn"), + ("Chetrum", "شيتروم|شيتروم"), + ("Bolivian boliviano", + "بوليفيانو بوليفي|بوب|بكالوريوس|بوليفيا بوليفيانو|بوليفيا بوليفيا|بوليفيانو بوليفي"), + ("Bosnia and Herzegovina convertible mark", + "علامة البوسنة والهرسك القابلة للتحويل | بام"), + ("Fening", "fenings|fenings"), + ("Botswana pula", "بولا بوتسوانا|bwp|بولا|بولا|بولا بوتسوانا"), + ("Thebe", "ويكون"), + ("Brazilian real", "ريال برازيلي|r$|brl|ريال برازيلي|ريال برازيلي|ريال برازيلي"), + ("Bulgarian lev", "ليف بلغاري|bgn|лв|ليف بلغاريا|ليف بلغاري|ليف بلغاري"), + ("Stotinka", "ستوتينكي|ستوتينكا"), + ("Cambodian riel", "رييل كمبودي|khr|៛|رييل كمبودي|رييل كمبودي|رييل كمبودي"), + ("Cape Verdean escudo", "اسكودو الرأس الأخضر|cve"), + ("Costa Rican colón", + "القولون الكوستاريكي|الكولون الكوستاريكي|crc|₡|الكولون الكوستاريكي|الكولون الكوستاريكي|الكولون الكوستاريكي|الكولون الكوستاريكي|الكولون الكوستاريكي|الكولون الكوستاريكي"), + ("Salvadoran colón", + "svc|الكولون السلفادوري|الكولون السلفادوري|الكولون السلفادور|الكولون السلفادور|الكولون السلفادوري|الكولون السلفادوري|الكولون السلفادوري|الكولون السلفادور"), + ("Céntimo", "سنتيمو"), + ( + "Croatian kuna", "كونا كرواتية|kn|hrk|كونا كرواتيا|كونا كرواتية|كونا كرواتية"), + ("Lipa", "ليبا"), + ("Czech koruna", "الكورونا التشيكية|czk|kč|الكورونا التشيكية"), + ("Haléř", "هالي"), + ("Eritrean nakfa", "الناكفا الإريترية|nfk|ern|الناكفا الإريترية"), + ("Ethiopian birr", "بير إثيوبي|etb"), + ("Gambian dalasi", "gmd"), + ("Butut", "بوتات|بوتوت"), + ("Georgian lari", "لاري جورجي|لاري|جل|₾"), + ("Tetri", "تتري"), + ("Ghanaian cedi", "السيدي الغاني|ghs|₵|gh₵"), + ("Pesewa", "بيسيوا|بيسيوا"), + ("Guatemalan quetzal", "الكوازال الغواتيمالي|gtq|الكوازال الغواتيمالي"), + ("Haitian gourde", "غورد هايتي|htg"), + ("Honduran lempira", "لمبيرا هندوراس|hnl"), + ("Hungarian forint", + "فورنت مجري|huf|قدم|فورنت مجري|فورنت مجري|فورنت مجري"), + ("Fillér", "حشو"), + ("Iranian rial", "الريال الإيراني|irr|الريال الإيراني|الريال الإيراني|الريال الإيراني"), + ("Yemeni rial", "ريال يمني|يير|ريال يمني"), + ("Israeli new shekel", "₪|إيلس|أغورا"), + ("Lithuanian litas", "ltl|ليتاس الليتواني|ليتاس الليتواني|ليتاس الليتواني|ليتاس الليتواني"), + ("Japanese yen", "ين ياباني|ين ياباني|ين|-ين|¥|ين|ين ياباني|ين ياباني|ين ياباني"), + ("Kazakhstani tenge", "تنغي كازاخستاني|تنغي كازاخستاني|تنغي كازاخستاني|كزت"), + ("Kenyan shilling", "شلن كيني|كيس"), + ("North Korean won", "وون كوريا الشمالية|kpw|وون كوريا الشمالية"), + ("South Korean won", "وون كوريا الجنوبية|krw|وون كوريا الجنوبية"), + ("Korean won", "وون كوري|₩|وون كوري"), + ("Kyrgyzstani som", "سوم قيرغيزستاني|كجم"), + ("Uzbekitan som", "السوم الأوزبكي|uzs"), + ("Lao kip", "لاو كيب|لاك|₭ن|₭"), + ("Att", "أت"), + ("Lesotho loti", "لوتي ليسوتو|lsl|لوتي"), + ("Sente", "استماع|استماع"), + ("South African rand", + "راند جنوب أفريقيا|زار|راند جنوب أفريقيا|راند جنوب أفريقيا|راند جنوب أفريقيا"), + ("Macanese pataca", "باتاكا ماكاوية|ممسحة$|ممسحة"), + ("Avo", "تجنب|تجنب"), + ("Macedonian denar", "دينار مقدوني|mkd|ден"), + ("Deni", "ديني"), + ("Malagasy ariary", "ارياري مدغشقر|mga"), + ("Iraimbilanja", "iraimbilanja"), + ("Malawian kwacha", "كواشا ملاوية|mk|mwk"), + ("Tambala", "تامبالا"), + ("Malaysian ringgit", + "رينغيت ماليزيا|rm|مير|رينغيت ماليزيا|رينغيت ماليزيا|رينغيت ماليزيا"), + ("Mauritanian ouguiya", + "أوقية موريتانية|أم|مرو|أوقية موريتانية|أوقية موريتانية|أوقية موريتانية"), + ("Khoums", "الخمس"), + ("Mongolian tögrög", + "توجروج منغولي|mnt|₮|توجروج منغوليا|توجروج منغوليا|توجروج منغولي|توجروج منغولي|توجروج منغولي|توجروج منغولي|توجروج منغوليا|توجروج منغولي"), + ("Mozambican metical", + "ميتيكال موزمبيق|mt|mzn|ميتيكال موزمبيق|ميتيكال موزمبيق|ميتيكال موزمبيق"), + ("Burmese kyat", "كيات البورمية|ks|mmk"), + ("Pya", "بيا"), + ("Nicaraguan córdoba", "كوردوبا النيكاراغوية|نيو"), + ("Nigerian naira", + "نايرا نيجيري|نايرا|ngn|₦|نايرا نيجيري|نايرا نيجيري|نايرا نيجيري"), + ("Kobo", "كوبو"), + ("Turkish lira", "الليرة التركية|try|tl|الليرة التركية|الليرة التركية|الليرة التركية"), + ("Kuruş", "kuruş"), + ("Omani rial", "ريال عماني|عمر|ر.ع."), + ("Panamanian balboa", "بالبوا البنمي|ب/.|pab"), + ("Centesimo", "سنتيسيمو"), + ("Papua New Guinean kina", "بابوا غينيا الجديدة كينا|كينا|pgk"), + ("Toea", "إلى عصام"), + ("Paraguayan guaraní", "غواراني باراغواي|₲|pyg"), + ("Peruvian sol", "سول بيرو|النعال|سول|سول بيرو الجديد"), + ("Polish złoty", + "زلوتي|زلوتي بولندي|zł|pln|زلوتي|زلوتي بولندي|زلوتي بولندا|زلوتي بولندا"), + ("Grosz", "جروزي|جروز|جروزي"), + ("Qatari riyal", "ريال قطري|قار|ريال قطري|ريال قطري|ريال قطري"), + ("Saudi riyal", "الريال السعودي|الريال|الريال السعودي"), + ("Riyal", "ريال|ريال|ريال|﷼"), + ("Dirham", "درهم|درهم|درهم"), + ("Halala", "هللة|هللة"), + ("Samoan tālā", "تالا ساموا|تالا|تالا|ws$|ساموا|غرب|تالا ساموا"), + ("Sene", "سيني"), + ("São Tomé and Príncipe dobra", "ساو تومي وبرينسيبي دوبرا|دوبراس|دوبرا"), + ("Sierra Leonean leone", "ليون سيراليوني|sll|ليون|le"), + ("Peseta", "بيزيتا|بيسيتا"), + ("Netherlands guilder", + "فلورين|جلدر جزر الأنتيل|ang|جولدن هولندا|الغيلدر|الغيلدر|-الغيلدر|-الغيلدر|الغيلدر الهولندي|الغيلدر الهولندي|fl"), + ("Swazi lilangeni", "ليلانجيني سوازي|ليلانجيني|szl|إيمالانجيني"), + ("Tajikistani somoni", "السوموني الطاجيكي|tjs|السوموني"), + ("Diram", "درام|درم"), + ("Thai baht", "باهت تايلاندي|฿|thb|باهت"), + ("Satang", "ساتانغ|ساتانغ"), + ("Tongan paʻanga", "بانجا تونجا|بانجا|بانجا تونجا|باانجانج"), + ("Seniti", "سينيتي"), + ("Ukrainian hryvnia", + "هريفنيا أوكرانية|هريفنيا|uah|₴|هريفنيا أوكرانيا|هريفنيا أوكرانيا|هريفنيا أوكرانية"), + ("Vanuatu vatu", "فانواتو فاتو|فاتو|فوف"), + ("Venezuelan bolívar", + "بوليفار فنزويلا|بوليفار فنزويلا|bs.f.|vef|بوليفار فويرتي|بوليفار فنزويلا|بوليفار فنزويلا|بوليفار فنزويلا|بوليفار فنزويلا|بوليفار فنزويلا|بوليفار فنزويلا|بوليفار فنزويلا"), + ("Vietnamese dong", + "دونج فيتنام|vnd|دونج|دونج فيتنام|دونج فيتنام|دونج فيتنام"), + ("Zambian kwacha", "كواشا زامبيا|zk|zmw|كواشا زامبيا|كواشا|كواشا زامبيا"), + ("Moroccan dirham", "درهم مغربي|mad|د.م."), + ("United Arab Emirates dirham", "درهم الإمارات العربية المتحدة|د.إ|aed"), + ("Azerbaijani manat", "مانات أذربيجان|azn"), + ("Turkmenistan manat", "مانات تركمانستان|مانات تركمانستان الجديد|tmt"), + ("Manat", "مانات|مانات"), + ("Qəpik", "qəpik"), + ("Somali shilling", + "شلن صومالي|شلن صومالي|شيلين صومالي|-شيلين صومالي|scellino|shilin|sh.so.|sos"), + ("Somaliland shilling", "شلن صوماليلاند|شلن صوماليلاند|سوماليلاند شيلين"), + ("Tanzanian shilling", + "شلن تنزاني|شلن تنزاني|tsh|tzs|شلن تنزاني|شلن تنزاني"), + ("Ugandan shilling", + "شلن أوغندي|شلن أوغندي|ugx|شلن أوغندي|شلن أوغندي"), + ("Romanian leu", "ليو الروماني|ليو|رون|ليو رومانيا"), + ("Moldovan leu", "ليو مولدوفا|mdl|ليو مولدوفا"), + ("Leu", "ليو"), + ("Ban", "بني|-حظر|حظر"), + ("Nepalese rupee", "روبية نيبالية|روبية نيبالية|npr"), + ("Pakistani rupee", "الروبية الباكستانية|الروبية الباكستانية|pkr"), + ("Indian rupee", "روبية هندية|روبية هندية|inr|₹|روبية هندية|روبية هندية"), + ("Seychellois rupee", "روبية سيشيلية|روبية سيشيلية|scr|sr|sre"), + ("Mauritian rupee", "روبية موريشيوسية|روبية موريشيوسية|مور"), + ("Maldivian rufiyaa", + "روفية جزر المالديف|روفية جزر المالديف|mvr|.य|روفية جزر المالديف|روفية جزر المالديف"), + ("Sri Lankan rupee", "روبية سريلانكية|روبية سريلانكية|lkr|රු|ரூ"), + ("Indonesian rupiah", "الروبية الإندونيسية|الروبية|بيراك|RP|IDR"), + ("Rupee", "روبية|روبية|رس"), + ("Danish krone", "الكرونة الدنماركية|dkk|الكرونة الدنماركية|الكرونة الدنماركية|الكرونة الدنماركية"), + ("Norwegian krone", "كرونة نرويجية|نوك|كرونة نرويجية|كرونة نرويجية|كرونة نرويجية"), + ("Faroese króna", "الكرونا الفارويزية|الكرونا الفارويزية"), + ("Icelandic króna", "الكرونا الايسلندية|isk|الكرونا الايسلندية|الكرونا الايسلندية|الكرونا الايسلندية"), + ("Swedish krona", "كرونة سويدية|سيك|كرونا سويدية"), + ("Krone", "كرونة|كرونا|كرونا|كرونة|كرونات|kr|-kr"), + ("Øre", "أوري|أويرا|إيرير"), + ("West African CFA franc", + "فرنك غرب أفريقيا|xof|فرنك غرب أفريقيا|فرنك غرب أفريقيا|فرنك غرب أفريقيا"), + ("Central African CFA franc", + "فرنك وسط أفريقيا|xaf|فرنك وسط أفريقيا|فرنك وسط أفريقيا|فرنك وسط أفريقيا"), + ("Comorian franc", "فرنك جزر القمر|كمف"), + ("Congolese franc", "الفرنك الكونغولي|cdf"), + ("Burundian franc", "الفرنك البوروندي|bif"), + ("Djiboutian franc", "الفرنك الجيبوتي|djf"), + ("CFP franc", "فرنك CFP|xpf"), + ("Guinean franc", "الفرنك الغيني|gnf"), + ("Swiss franc", "فرنك سويسري|فرنك سويسري|فرنك سويسري|فرنك سويسري."), + ("Rwandan franc", "الفرنك الرواندي|rwf|rf|r₣|frw"), + ("Belgian franc", "الفرنك البلجيكي|bi.|b.fr.|bef|الفرنك البلجيكي"), + ("Rappen", "رابن|-رابين"), + ("Franc", "فرنك|فرنك|فرنك|fs"), + ("Centime", "سنتيم|سنتيم|سانتيم"), + ("Russian ruble", + "روبل روسي|₽|فرك|روبل روسي|روسيا ₽|روسي ₽|روبل روسي|روبل روسي"), + ("New Belarusian ruble", + "روبل بيلاروسي جديد|byn|روبل بيلاروسي جديد|روبل بيلاروسي جديد|روبل بيلاروسي جديد"), + ("Old Belarusian ruble", + "روبل بيلاروسي قديم|بير|روبل بيلاروسي قديم|روبل بيلاروسي قديم|روبل بيلاروسي قديم"), + ("Transnistrian ruble", "روبل ترانسنيستريا|prb|Р."), + ("Belarusian ruble", "روبل بيلاروسي|روبل بيلاروسي|روبل بيلاروسيا|روبل بيلاروسي"), + ("Kopek", "كوبيك|كوبيك"), + ("Kapyeyka", "kapyeyka"), + ("Ruble", "rأوبلس|روبل|ر"), + ( + "Algerian dinar", "دينار جزائري|د.ج|dzd|دينار جزائري|دينار جزائري|دينار جزائري"), + ("Bahraini dinar", "دينار بحريني|دينار بحريني|bhd|.د.ب"), + ("Santeem", "سانتيم|سانتيم"), + ("Iraqi dinar", "دينار عراقي|دينار عراقي|دينار عراقي|دينار عراقي|iqd|ع.د"), + ("Jordanian dinar", + "دينار أردني|دينار أردني|د.ا|جود|دينار أردني|دينار أردني"), + ("Kuwaiti dinar", "دينار كويتي|دينار كويتي|كود|د.ك"), + ("Libyan dinar", "دينار ليبي|دينار ليبي|دينار ليبي|دينار ليبي|ليد"), + ("Serbian dinar", + "دينار صربي|دينار صربي|دين.|rsd|дин.|دينار صربيا|دينار صربيا"), + ("Tunisian dinar", "دينار تونسي|دينار تونسي|tnd|دينار تونسي|دينار تونسي"), + ("Yugoslav dinar", "دينار يوغوسلافي|دينار يوغوسلافي|يون"), + ("Dinar", "دينار|دينار|دينار|-دينار|-دينار"), + ("Fils", "فلس|فولوس|-فلس|-فيل"), + ("Para", "بارا|نابا"), + ("Millime", "مليم|مليم"), + ("Argentine peso", "بيزو أرجنتيني|ars|بيزو أرجنتيني|بيزو أرجنتيني|بيزو أرجنتيني"), + ("Chilean peso", "بيزو شيلي|بيزو تشيلي|clp|بيزو شيلي|بيزو تشيلي"), + ("Colombian peso", "البيزو الكولومبي|البيزو الكولومبي|شرطي|البيزو الكولومبي|البيزو الكولومبي"), + ("Cuban convertible peso", + "البيزو الكوبي القابل للتحويل|البيزو الكوبي القابل للتحويل|cuc|البيزو الكوبي القابل للتحويل|البيزو الكوبي القابل للتحويل"), + ("Cuban peso", "بيزو كوبي | بيزو كوبي | كوب | بيزو كوبا | بيزو كوبا"), + ("Dominican peso", "بيزو دومينيكي|بيزو دومينيكي|dop|بيزو دومينيكا|بيزو دومينيكا"), + ("Mexican peso", + "البيزو المكسيكي|البيزو المكسيكي|mxn|البيزو المكسيكي|البيزو المكسيكي|mxn$|mxn $|mex$"), + ("Philippine peso", "بيزو|بيزو فلبيني|بيزو فلبيني|₱|php"), + ("Uruguayan peso", "بيزو أوروغواي|بيزو أوروغواي|uyu₱|php"), + ("Peso", "بيزو|بيزو"), + ("Centavo", "سنتافو|سنتافو"), + ("Alderney pound", "جنيه ألدرني|جنيه ألدرني|جنيه ألدرني"), + ("British pound", + "الجنيه البريطاني|الجنيه الاسترليني|الجنيه الاسترليني|الجنيه الاسترليني|الجنيه الاسترليني|الجنيه الاسترليني|الجنيه الاسترليني|الجنيه الاسكتلندي|الجنيه الاسكتلندي"), + ("Guernsey pound", "جنيه جيرنسي|جيرنسي جنيه استرليني|ggp"), + ("Ascension pound", "جنيه الصعود|جنيه الصعود|جنيه الصعود"), + ("Saint Helena pound", "جنيه سانت هيلينا|جنيه سانت هيلينا|جنيه سانت هيلينا جنيه استرليني|shp"), + ("Egyptian pound", + "جنيه مصري|جنيه مصري|جنيه إسترليني|egp|ج.م|جنيه مصري|جنيه مصري"), + ("Falkland Islands pound", + "جنيه جزر فوكلاند|جنيه جزر فوكلاند|جنيه جزر فوكلاند|جنيه استرليني|fkp|جنيه جزيرة فوكلاند|جنيه جزيرة فوكلاند|جنيه جزيرة فوكلاند"), + ("Gibraltar pound", "جنيه جبل طارق|جنيه جبل طارق|جنيه جبل طارق|gip"), + ("Manx pound", "جنيه مانكس|جنيه مانكس|جنيه مانكس|عفريت"), + ("Jersey pound", "جنيه جيرسي | جنيه جيرسي | جنيه إسترليني جيرسي | جيب"), + ("Lebanese pound", + "ليرة لبنانية|ليرة لبنانية|ليرة لبنانية|ليرة لبنانية|ليرة لبنانية|ليرة لبنانية|ليرة لبنانية|ل.ل"), + ("South Georgia and the South Sandwich Islands pound", + "جورجيا الجنوبية وجزر ساندويتش الجنوبية جنيه إسترليني|جورجيا الجنوبية وجزر ساندويتش الجنوبية جنيه إسترليني|جورجيا الجنوبية وجزر ساندويتش الجنوبية جنيه إسترليني"), + ("South Sudanese pound", + "جنيه جنوب السودان|جنيه جنوب السودان|جنيه جنوب السودان|ssp|جنيه جنوب السودان|جنيه جنوب السودان|جنيه جنوب السودان"), + ("Sudanese pound", + "جنيه سوداني|جنيه سوداني|جنيه سوداني|ج.س.|sdg|جنيه سوداني|جنيه سوداني|جنيه سوداني"), + ("Syrian pound", + "ليرة سورية|ليرة سورية|ليرة سورية|ل.س|syp|ليرة سورية|ليرة سورية|ليرة سورية"), + ("Tristan da Cunha pound", + "جنيه تريستان دا كونيا|جنيه تريستان دا كونيا|جنيه تريستان دا كونيا"), + ("Pound", "جنيه|جنيه|-جنيه|-جنيه|جنيه إسترليني"), + ("Pence", "بنس"), + ("Shilling", "شلن|شلن|شيلنجي|ش"), + ("Penny", "بينس|بيني"), + ("United States dollar", + "دولارات الولايات المتحدة|دولار الولايات المتحدة|الولايات المتحدة $|الولايات المتحدة. دولار|الولايات المتحدة. دولار|دولار أمريكي|دولار أمريكي|USD|دولار أمريكي|دولار أمريكي|دولار أمريكي|دولار أمريكي|دولار أمريكي|دولار أمريكي|دولار أمريكي|USD$"), + ("East Caribbean dollar", + "دولار شرق الكاريبي|دولار شرق الكاريبي|دولار شرق الكاريبي $|xcd"), + ("Australian dollar", + "دولار أسترالي|دولار أسترالي|دولار أسترالي|أسترالي$|AUD|دولار أسترالي|دولار أسترالي|أسترالي $|أسترالي$"), + ("Bahamian dollar", + "دولار بهامي|دولار بهامي|دولار بهامي $|دولار بهامي$|bsd|دولار بهامي|دولار بهامي|باهامي $|باهامي$"), + ("Barbadian dollar", "دولار بربادوسي|دولار بربادوسي|دولار بربادوسي|bbd"), + ("Belize dollar", "دولار بليز|دولار بليز|دولار بليز|bzd"), + ("Bermudian dollar", + "دولار برمودي|دولار برمودي|دولار برمودي|دولار برمودي|دولار برمودي|دولار برمودي|دولار برمودي"), + ("British Virgin Islands dollar", + "دولار جزر فيرجن البريطانية|دولار جزر فيرجن البريطانية|جزر فيرجن البريطانية $|bvi$|دولار جزر فيرجن|دولار جزر فيرجن|جزر فيرجن $|دولار جزر فيرجن|دولار جزيرة فيرجن|دولار جزيرة فيرجن $"), + ("Brunei dollar", "دولار بروناي|دولار بروناي $|مليار دولار"), + ("Sen", "سين"), + ("Singapore dollar", "دولار سنغافوري|دولار سنغافوري|دولار سنغافوري $|s$|sgd"), + ("Canadian dollar", + "دولار كندي|دولار كندي|دولار كندي|دولار كندي|can$|c$|دولار كندي|دولار كندي|كندا$"), + ("Cayman Islands dollar", + "دولار جزر كايمان|دولار جزر كايمان|جزر كايمان $|kyd|ci$|دولار جزر كايمان|دولارات جزر كايمان|دولار جزر كايمان $"), + ("New Zealand dollar", + "دولار نيوزيلندي|دولار نيوزيلندي|نيوزيلندا $|nz$|nzd|كيوي"), + ("Cook Islands dollar", + "دولار جزر كوك|دولار جزر كوك|جزر كوك $|دولار جزر كوك|دولار جزيرة كوك|جزيرة كوك $"), + ("Fijian dollar", + "دولار فيجي|دولار فيجي|دولار فيجي|دولار فيجي|دولار فيجي|دولار فيجي|دولار فيجي"), + ("Guyanese dollar", "دولار جوياني|دولار جوياني|gyd|gy$"), + ("Hong Kong dollar", + "دولار هونج كونج|دولار هونج كونج|دولار هونج كونج|$hk$|hkd|دولار هونج كونج|دولار هونج كونج|دولار هونج كونج|دولار هونج كونج|دولار هونج كونج"), + ("Jamaican dollar", + "دولار جامايكي|دولار جامايكي|دولار جامايكي|j$|دولار جامايكي|دولار جامايكي|جامايكا $|JMD"), + ("Kiribati dollar", "دولار كيريباتي|دولار كيريباتي|دولار كيريباتي"), + ("Liberian dollar", + "دولار ليبيري|دولار ليبيري|دولار ليبيري|دولار ليبيري|دولار ليبيري|ليبيري $|ليرة لبنانية"), + ("Micronesian dollar", "دولار ميكرونيزي | دولار ميكرونيزي | دولار ميكرونيزي"), + ("Namibian dollar", + "دولار ناميبي|دولار ناميبي|دولار ناميبي|ناد|n$|دولار ناميبي|دولار ناميبي|ناميبيا $"), + ("Nauruan dollar", "دولار ناورو|دولار ناورو|دولار ناورو"), + ("Niue dollar", "دولار نيوي|دولار نيوي|دولار نيوي"), + ("Palauan dollar", "دولار بالاو | دولار بالاو | دولار بالاو"), + ("Pitcairn Islands dollar", + "دولارات جزر بيتكيرن|دولار جزر بيتكيرن|دولارات جزر بيتكيرن $|دولار جزيرة بيتكيرن|دولار جزيرة بيتكيرن|دولار جزيرة بيتكيرن $"), + ("Solomon Islands dollar", + "دولار جزر سليمان|دولار جزر سليمان|جزر سليمان $|si$|sbd|دولار جزر سليمان|دولار جزيرة سليمان|جزر سليمان $"), + ("Surinamese dollar", "دولار سورينام|دولار سورينامي|دولار سورينام|ريال سعودي"), + ("New Taiwan dollar", "دولار تايواني جديد|دولار تايواني جديد|nt$|twd|ntd"), + ("Trinidad and Tobago dollar", + "دولار ترينداد وتوباغو|دولار ترينداد وتوباغو|دولار ترينداد وتوباغو $|ترينداد $|دولار ترينداد|دولار ترينداد|دولار ترينيدادي|دولار ترينيدادي|دولار ترينيدادي $|ttd"), + ("Tuvaluan dollar", "دولار توفالو|دولار توفالو|دولار توفالو"), + ("Dollar", "دولار|دولار|$"), + ("Chinese yuan", "يوان|كواي|يوان صيني|رنمينبي|cny|رنمينبي|¥|元"), + ("Fen", "الفين"), + ("Jiao", "جياو|ماو"), + ("Finnish markka", "سومن ماركا|ماركا الفنلندية|فينسك مارك|فيم|ماركا|ماركا"), + ("Penni", "بينيا|بيني"), + ("Bitcoin", "بيتكوين|بيتكوينز|btc|xbt|₿"), + ("Millibitcoin", "ميلي بيتكوين| ميلي بيتكوين | ميلي بيتكوين | ميلي بيتكوين"), + ("Satoshi", "ساتوشي|ساتوشي")]) + CurrencyNameToIsoCodeMap = dict([("Afghan afghani", "AFN"), + ("Euro", "EUR"), + ("Albanian lek", "ALL"), + ("Angolan kwanza", "AOA"), + ("Armenian dram", "AMD"), + ("Aruban florin", "AWG"), + ("Bangladeshi taka", "BDT"), + ("Bhutanese ngultrum", "BTN"), + ("Bolivian boliviano", "BOB"), + ("Bosnia and Herzegovina convertible mark", "BAM"), + ("Botswana pula", "BWP"), + ("Brazilian real", "BRL"), + ("Bulgarian lev", "BGN"), + ("Cambodian riel", "KHR"), + ("Cape Verdean escudo", "CVE"), + ("Costa Rican colón", "CRC"), + ("Croatian kuna", "HRK"), + ("Czech koruna", "CZK"), + ("Eritrean nakfa", "ERN"), + ("Ethiopian birr", "ETB"), + ("Gambian dalasi", "GMD"), + ("Georgian lari", "GEL"), + ("Ghanaian cedi", "GHS"), + ("Guatemalan quetzal", "GTQ"), + ("Haitian gourde", "HTG"), + ("Honduran lempira", "HNL"), + ("Hungarian forint", "HUF"), + ("Iranian rial", "IRR"), + ("Yemeni rial", "YER"), + ("Israeli new shekel", "ILS"), + ("Japanese yen", "JPY"), + ("Kazakhstani tenge", "KZT"), + ("Kenyan shilling", "KES"), + ("North Korean won", "KPW"), + ("South Korean won", "KRW"), + ("Kyrgyzstani som", "KGS"), + ("Lao kip", "LAK"), + ("Lesotho loti", "LSL"), + ("South African rand", "ZAR"), + ("Macanese pataca", "MOP"), + ("Macedonian denar", "MKD"), + ("Malagasy ariary", "MGA"), + ("Malawian kwacha", "MWK"), + ("Malaysian ringgit", "MYR"), + ("Mauritanian ouguiya", "MRO"), + ("Mongolian tögrög", "MNT"), + ("Mozambican metical", "MZN"), + ("Burmese kyat", "MMK"), + ("Nicaraguan córdoba", "NIO"), + ("Nigerian naira", "NGN"), + ("Turkish lira", "TRY"), + ("Omani rial", "OMR"), + ("Panamanian balboa", "PAB"), + ("Papua New Guinean kina", "PGK"), + ("Paraguayan guaraní", "PYG"), + ("Peruvian sol", "PEN"), + ("Polish złoty", "PLN"), + ("Qatari riyal", "QAR"), + ("Saudi riyal", "SAR"), + ("Samoan tālā", "WST"), + ("São Tomé and Príncipe dobra", "STN"), + ("Sierra Leonean leone", "SLL"), + ("Swazi lilangeni", "SZL"), + ("Tajikistani somoni", "TJS"), + ("Thai baht", "THB"), + ("Ukrainian hryvnia", "UAH"), + ("Vanuatu vatu", "VUV"), + ("Venezuelan bolívar", "VEF"), + ("Zambian kwacha", "ZMW"), + ("Moroccan dirham", "MAD"), + ("United Arab Emirates dirham", "AED"), + ("Azerbaijani manat", "AZN"), + ("Turkmenistan manat", "TMT"), + ("Somali shilling", "SOS"), + ("Tanzanian shilling", "TZS"), + ("Ugandan shilling", "UGX"), + ("Romanian leu", "RON"), + ("Moldovan leu", "MDL"), + ("Nepalese rupee", "NPR"), + ("Pakistani rupee", "PKR"), + ("Indian rupee", "INR"), + ("Seychellois rupee", "SCR"), + ("Mauritian rupee", "MUR"), + ("Maldivian rufiyaa", "MVR"), + ("Sri Lankan rupee", "LKR"), + ("Indonesian rupiah", "IDR"), + ("Danish krone", "DKK"), + ("Norwegian krone", "NOK"), + ("Icelandic króna", "ISK"), + ("Swedish krona", "SEK"), + ("West African CFA franc", "XOF"), + ("Central African CFA franc", "XAF"), + ("Comorian franc", "KMF"), + ("Congolese franc", "CDF"), + ("Burundian franc", "BIF"), + ("Djiboutian franc", "DJF"), + ("CFP franc", "XPF"), + ("Guinean franc", "GNF"), + ("Swiss franc", "CHF"), + ("Franc", "CHF"), + ("Rwandan franc", "RWF"), + ("Russian ruble", "RUB"), + ("Transnistrian ruble", "PRB"), + ("New Belarusian ruble", "BYN"), + ("Algerian dinar", "DZD"), + ("Bahraini dinar", "BHD"), + ("Iraqi dinar", "IQD"), + ("Jordanian dinar", "JOD"), + ("Kuwaiti dinar", "KWD"), + ("Libyan dinar", "LYD"), + ("Serbian dinar", "RSD"), + ("Tunisian dinar", "TND"), + ("Argentine peso", "ARS"), + ("Chilean peso", "CLP"), + ("Colombian peso", "COP"), + ("Cuban convertible peso", "CUC"), + ("Cuban peso", "CUP"), + ("Dominican peso", "DOP"), + ("Mexican peso", "MXN"), + ("Uruguayan peso", "UYU"), + ("British pound", "GBP"), + ("Saint Helena pound", "SHP"), + ("Egyptian pound", "EGP"), + ("Falkland Islands pound", "FKP"), + ("Gibraltar pound", "GIP"), + ("Manx pound", "IMP"), + ("Jersey pound", "JEP"), + ("Lebanese pound", "LBP"), + ("South Sudanese pound", "SSP"), + ("Sudanese pound", "SDG"), + ("Syrian pound", "SYP"), + ("United States dollar", "USD"), + ("Australian dollar", "AUD"), + ("Bahamian dollar", "BSD"), + ("Barbadian dollar", "BBD"), + ("Belize dollar", "BZD"), + ("Bermudian dollar", "BMD"), + ("Brunei dollar", "BND"), + ("Singapore dollar", "SGD"), + ("Canadian dollar", "CAD"), + ("Cayman Islands dollar", "KYD"), + ("New Zealand dollar", "NZD"), + ("Fijian dollar", "FJD"), + ("Guyanese dollar", "GYD"), + ("Hong Kong dollar", "HKD"), + ("Jamaican dollar", "JMD"), + ("Liberian dollar", "LRD"), + ("Namibian dollar", "NAD"), + ("Solomon Islands dollar", "SBD"), + ("Surinamese dollar", "SRD"), + ("New Taiwan dollar", "TWD"), + ("Trinidad and Tobago dollar", "TTD"), + ("Tuvaluan dollar", "TVD"), + ("Chinese yuan", "CNY"), + ("Rial", "__RI"), + ("Shiling", "__S"), + ("Som", "__SO"), + ("Dirham", "__DR"), + ("Dinar", "_DN"), + ("Dollar", "__D"), + ("Manat", "__MA"), + ("Rupee", "__R"), + ("Krone", "__K"), + ("Krona", "__K"), + ("Crown", "__K"), + ("Frank", "__F"), + ("Mark", "__M"), + ("Ruble", "__RB"), + ("Peso", "__PE"), + ("Pound", "__P"), + ("Tristan da Cunha pound", "_TP"), + ("South Georgia and the South Sandwich Islands pound", "_SP"), + ("Somaliland shilling", "_SS"), + ("Pitcairn Islands dollar", "_PND"), + ("Palauan dollar", "_PD"), + ("Niue dollar", "_NID"), + ("Nauruan dollar", "_ND"), + ("Micronesian dollar", "_MD"), + ("Kiribati dollar", "_KID"), + ("Guernsey pound", "_GGP"), + ("Faroese króna", "_FOK"), + ("Cook Islands dollar", "_CKD"), + ("British Virgin Islands dollar", "_BD"), + ("Ascension pound", "_AP"), + ("Alderney pound", "_ALP"), + ("Abkhazian apsar", "_AA"), + ("Bitcoin", "_XBT")]) + FractionalUnitNameToCodeMap = dict([("Jiao", "JIAO"), + ("Kopek", "KOPEK"), + ("Pul", "PUL"), + ("Cent", "CENT"), + ("Qindarkë", "QINDARKE"), + ("Penny", "PENNY"), + ("Santeem", "SANTEEM"), + ("Cêntimo", "CENTIMO"), + ("Centavo", "CENTAVO"), + ("Luma", "LUMA"), + ("Qəpik", "QƏPIK"), + ("Fils", "FILS"), + ("Poisha", "POISHA"), + ("Kapyeyka", "KAPYEYKA"), + ("Centime", "CENTIME"), + ("Chetrum", "CHETRUM"), + ("Paisa", "PAISA"), + ("Fening", "FENING"), + ("Thebe", "THEBE"), + ("Sen", "SEN"), + ("Stotinka", "STOTINKA"), + ("Fen", "FEN"), + ("Céntimo", "CENTIMO"), + ("Lipa", "LIPA"), + ("Haléř", "HALER"), + ("Øre", "ØRE"), + ("Piastre", "PIASTRE"), + ("Santim", "SANTIM"), + ("Oyra", "OYRA"), + ("Butut", "BUTUT"), + ("Tetri", "TETRI"), + ("Pesewa", "PESEWA"), + ("Fillér", "FILLER"), + ("Eyrir", "EYRIR"), + ("Dinar", "DINAR"), + ("Agora", "AGORA"), + ("Tïın", "TIIN"), + ("Chon", "CHON"), + ("Jeon", "JEON"), + ("Tyiyn", "TYIYN"), + ("Att", "ATT"), + ("Sente", "SENTE"), + ("Dirham", "DIRHAM"), + ("Rappen", "RAPPEN"), + ("Avo", "AVO"), + ("Deni", "DENI"), + ("Iraimbilanja", "IRAIMBILANJA"), + ("Tambala", "TAMBALA"), + ("Laari", "LAARI"), + ("Khoums", "KHOUMS"), + ("Ban", "BAN"), + ("Möngö", "MONGO"), + ("Pya", "PYA"), + ("Kobo", "KOBO"), + ("Kuruş", "KURUS"), + ("Baisa", "BAISA"), + ("Centésimo", "CENTESIMO"), + ("Toea", "TOEA"), + ("Sentimo", "SENTIMO"), + ("Grosz", "GROSZ"), + ("Sene", "SENE"), + ("Halala", "HALALA"), + ("Para", "PARA"), + ("Öre", "ORE"), + ("Diram", "DIRAM"), + ("Satang", "SATANG"), + ("Seniti", "SENITI"), + ("Millime", "MILLIME"), + ("Tennesi", "TENNESI"), + ("Kopiyka", "KOPIYKA"), + ("Tiyin", "TIYIN"), + ("Hào", "HAO"), + ("Ngwee", "NGWEE"), + ("Millibitcoin", "MILLIBITCOIN"), + ("Satoshi", "SATOSHI")]) + CompoundUnitConnectorRegex = f'(?ًا و|أيضا|واو العطف|و)' + MultiplierRegex = f'\\s*\\b(ألف|مليون|مليار|تريليون)s?\\b' + CurrencyPrefixList = dict([("Dobra", "ديسيبل | الأمراض المنقولة جنسيا"), + ("Dollar", "$"), + ("Brazilian Real", "ريال $"), + ("United States dollar", "الولايات المتحدة $|us$|us $|u.s. $|u.s $|usd$"), + ("East Caribbean dollar", "شرق الكاريبي $"), + ("Mexican peso", "mxn$|mxn $|mex$"), + ("Australian dollar", "أسترالي $|أستراليا $"), + ("Bahamian dollar", "الباهامية $|البهامية $"), + ("Barbadian dollar", "بربادوسي $|بربادين $"), + ("Belize dollar", "بليز $"), + ("Bermudian dollar", "برمودي $"), + ("British Virgin Islands dollar", + "جزر فيرجن البريطانية $|bvi$|جزر فيرجن $|جزيرة فيرجن $|جزيرة فيرجن البريطانية $"), + ("Brunei dollar", "بروناي $|ب$"), + ("Sen", "سين"), + ("Singapore dollar", "سنغافورة $|s$"), + ("Canadian dollar", "الكندي $|can$|c$|c $|canada $"), + ("Cayman Islands dollar", "جزر كايمان $|ci$|جزيرة كايمان $"), + ("New Zealand dollar", "نيوزيلندا $|nz$|nz $"), + ("Cook Islands dollar", "جزر كوك $|جزيرة كوك $"), + ("Fijian dollar", "فيجي $|فيجي $"), + ("Guyanese dollar", "gy$|gy $|g$|g $"), + ("Hong Kong dollar", "هونج كونج $|هونج كونج$|هكد|هونج كونج $"), + ("Indian rupee", "₹"), + ("Jamaican dollar", "الجامايكي $|j$|جامايكا $"), + ("Kiribati dollar", "كيريباتي $"), + ("Liberian dollar", "ليبيريا $|ليبيريا $"), + ("Micronesian dollar", "ميكرونيزيا $"), + ("Namibian dollar", "الناميبي $|nad|n$|ناميبيا $"), + ("Nauruan dollar", "ناورو $"), + ("Niue dollar", "نيو $"), + ("Palauan dollar", "بالاو $"), + ("Pitcairn Islands dollar", "جزر بيتكيرن $|جزيرة بيتكيرن $"), + ("Solomon Islands dollar", "جزر سليمان $|si$|si $|جزيرة سليمان $"), + ("Surinamese dollar", "سورينام $|سورينام $"), + ("New Taiwan dollar", "NT$|نت $"), + ("Trinidad and Tobago dollar", "ترينيداد وتوباغو $|ترينيداد $|ترينيداد $"), + ("Tuvaluan dollar", "توفالو $"), + ("Samoan tālā", "ws$"), + ("Chinese yuan", "¥"), + ("Japanese yen", "¥"), + ("Euro", "€"), + ("Pound", "£"), + ("Costa Rican colón", "₡"), + ("Turkish lira", "₺"), + ("Bitcoin", "₿|btc|xbt")]) + AmbiguousCurrencyUnitList = [r'din.', r'kiwi', r'kina', r'kobo', r'lari', r'lipa', r'napa', r'para', r'sfr.', + r'taka', r'tala', r'toea', r'vatu', r'yuan', r'all', r'ang', r'ban', r'bob', r'btn', + r'byr', r'cad', r'cop', r'cup', r'dop', r'gip', r'jod', r'kgs', r'lak', r'lei', r'mga', + r'mop', r'nad', r'omr', r'pul', r'sar', r'sbd', r'scr', r'sdg', r'sek', r'sen', r'sol', + r'sos', r'std', r'try', r'yer', r'yen', r'db', r'pen', r'ron', r'mad', r'zar', r'gel', + r'satoshi', r'satoshis'] + BuildPrefix = f'(?<=(\\s|^))' + BuildSuffix = f'(?=(\\s|\\W|$))' + +# pylint: enable=line-too-long diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/catalan_numeric_with_unit.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/catalan_numeric_with_unit.py new file mode 100644 index 0000000000..399320b9c5 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/catalan_numeric_with_unit.py @@ -0,0 +1,634 @@ +from .base_numbers import BaseNumbers +# pylint: disable=line-too-long + + +class CatalanNumericWithUnit: + CurrencySuffixList = dict([("Dòlar", "dòlar|dòlars|dolar|dolars"), + ("Pes", "pes|pesos"), + ("Ruble", "ruble|rubles"), + ("Lliura", "lliura|lliures"), + ("Florín", "florín|florines"), + ("Dinar", "dinar|dinars"), + ("Franc", "franc|francs"), + ("Rupia", "rupia|rupies"), + ("Escut", "escut|escuts"), + ("Xelín", "xíling|xílins"), + ("Lira", "lira|lires"), + ("Centau", "centavo|centavos"), + ("Cèntim", "cèntim|cèntims"), + ("Centèsim", "centèsim|centèsims"), + ("Penique", "penique|peniques"), + ("Euro", "euro|euros|€|eur"), + ("Cèntim d'Euro", "cèntim d'euro|cèntims d'euros"), + ("Dòlar del Carib Oriental", + "dòlar del carib oriental|dòlars del carib oriental|ec$|xcd"), + ("Centau del Carib Oriental", "centau del carib oriental|centaus del carib oriental"), + ("Franc CFA d'Àfrica Occidental", + "franc cfa d'Àfrica occidental|francs cfa d'Àfrica occidental|fcfa|xof"), + ("Cèntim de CFA d'Àfrica Occidental", + "cèntim de cfa d'Àfrica occidental|cèntims de cfa d'Àfrica occidental"), + ("Franc CFA d'Àfrica Central", + "franc cfa d'Àfrica central|francs cfa d'Àfrica central|xaf"), + ("Cèntim de CFA d'Àfrica Central", + "cèntim de cfa d'Àfrica central|cèntims de cfa d'Àfrica central"), + ("Apsar", "apsar|apsares"), + ("Afgani afganès", "afgani afganès|؋|afn|afganis|afgani"), + ("Pul", "pul|puls"), + ("Lek albanès", "lek|lekë|lekes|lek albanès"), + ("Qindarka", "qindarka|qindarkë|qindarkas"), + ("Kwanza angoleño", + "kwanza angoleño|kwanzas angoleños|kwanza angoleño|kwanzas angoleño|kwanzas|aoa|kz"), + ("Cêntimo angoleño", "cêntimo angoleño|cêntimo|cêntimos"), + ("Florí antillano neerlandès", + "florí antillano neerlandès|florins antillano neerlandès|ƒ antillano neerlandès|ang|naƒ"), + ("Cent antillano neerlandès", "cent|centen"), + ("Riyal saudita", "riial saudita|riials saudita|sar"), + ("Halalà saudita", "halalà saudita|hallalah"), + ("Dinar algerià", "dinar algerià|dinars algerians|dzd"), + ("Cèntim algerià", "cèntim algerià|cèntims algerians"), + ("Pes argentí", "pes argentí|pesos argentins|ar$|ars"), + ("Centau argentí", "centau argentí|centaus argentins|ctv.|ctius."), + ("Dram armeni", "dram armeni|dram armenis|dram|դր."), + ("Luma armeni", "luma armeni|luma armenis"), + ("Florín arubeño", "florín arubeño|florines arubeños|ƒ arubeños|aƒ|awg"), + ("Yotin arubeño", "yotin arubeño|yotines arubeños"), + ("Dòlar australià", "dòlar australià|dòlars australians|a$|aud"), + ("Centau australià", "centau australià|centaus australians"), + ("Manat àzeri", "manat àzeri|man|azn"), + ("Qəpik azerí", "qəpik azerí|qəpik"), + ("Dòlar bahameño", "dòlar bahameño|dòlars bahameños|b$|bsd"), + ("Centau bahameño", "centavo bahameño|centavos bahameños"), + ("Dinar bahreiní", "dinar bahreiní|dinars bahrainis|bhd"), + ("Fil bahrainí", "fil bahrainí|fils bahrainis"), + ("Taka bangladeshí", "taka bangladeshí|taques bangladeshí|bdt"), + ("Poisha bangladeshí", "poisha bangladeshí|poishas bangladeshí"), + ("Dòlar de Barbats", "dòlar de barbats|dòlars de barbats|bbd"), + ("Centau de Barbados", "centau de barbados|centavos de barbados"), + ("Dòlar de Belize", "Dòlar de Belize|dòlars de Belize|bz$|bzd"), + ("Centau bel·liceny", "centau bel·liceny|centaus bel·licins"), + ("Dòlar bermudeño", "dòlar bermudeño|dòlars bermudeños|bd$|bmd"), + ("Centau bermudeño", "centavo bermudeño|centavos bermudeños"), + ("Ruble bielorus", "ruble bielorus|rubles bielorus|byr"), + ("Kòpek bielorus", "kopek bielorús|kopek bielorus|kap"), + ("Kyat birmà", "kyat birmà|kyats birmans|mmk"), + ("Pya birmà", "pia birmà|pies birmans"), + ("Bolivià", "bolivià|bolivians|bob|bs"), + ("Centíssim Bolivià", "centèssim bolivià|centèsims bolivians"), + ("Marc bosniohercegoví", + "marc convertible|marc bosniohercegoví|marcs convertibles|marcs bosniohercegovins|bam"), + ("Feningas bosniohercegoví", + "feninga convertible|feninga bosniohercegovina|feninges convertibles"), + ("Pula", "pula|bwp"), + ("Thebe", "thebe"), + ("Real brasiler", "real brasiler|reals brasilers|r$|brl"), + ("Centau brasiler", "centavo brasiler|centavos brasilers"), + ("Dòlar de Brunei", "dòlar de brunei|dòlars de brunei|bnd"), + ("Sen de Brunéi", "sense de brunéi"), + ("Lev búlgar", "lev búlgar|lleva búlgars|lv|bgn"), + ("Stotinki búlgar", "stotinka búlgar|stotinki búlgars"), + ("Franc de Burundi", "franc de burundi|francs de burundi|fbu|fib"), + ("Cèntim Burundi", "cèntim burundi|cèntims burundies"), + ("Ngultrum butanès", "ngultrum butanès|ngultrum butanesos|btn"), + ("Chetrum butanès", "chetrum butanès|chetrum butanesos"), + ("Escut capverdià", "escut capverdià|escuts capverdians|cve"), + ("Riel cambodjà", "riel cambodjà|riels cambodjans|khr"), + ("Dòlar canadenc", "dòlar canadenc|dòlars canadencs|c$|cad"), + ("Centau canadenc", "centau canadenc|centaus canadencs"), + ("Pes xilè", "pes xilè|pesos xilens|cpl"), + ("Yuan xinès", "yuan xinès|iuans xinesos|yuan|iuans|renminbi|rmb|cny|¥"), + ("Pes colombià", "pes colombià|pesos colombians|cop|col$"), + ("Centau colombià", "centau colombià|centaus colombians"), + ("Franc comorà", "franc comorà|francs comorans|kmf|₣"), + ("Franc congolès", "franc congolès|francs congolesos|cdf"), + ("Cèntim congolès", "cèntim congolès|cèntims congolesos"), + ("Won nord-coreà", "won nord-coreà|wŏn nord-coreà|wŏn nord-coreans|kpw"), + ("Chon nord-coreà", + "chon nord-coreà|chŏn nord-coreà|chŏn nord-coreans|chon nord-coreans"), + ("Won sud-coreà", "wŏn sud-coreà|won sud-coreà|wŏnes sud-coreans|wons sud-coreans|krw"), + ("Chon sud-coreà", "chon sud-coreà|chŏn sud-coreà|chon sud-coreans|chon sud-coreans"), + ("Coló costarricense", "còlon costarricenc|culls costarricencs|crc"), + ("Kuna croat", "kuna croat|kuna croat|hrk"), + ("Llipa croata", "llipa croata|lipa croates"), + ("Pes cubà", "pes cubà|pesos cubans|cup"), + ("Pes cubà convertible", "pes cubà convertible|pesos cubans convertible|cuc"), + ("Corona danesa", "corona danesa|corones daneses|dkk"), + ("Lliura egípcia", "lliura egípcia|lliures egípcies|egp|l.e."), + ("Piastra egípcia", "piastra egípcia|piastres egípcies"), + ("Coló salvadorenc", "coló salvadorenc|colons salvadorencs|svc"), + ("Dirham dels Unió dels Emirats Àrabs", + "dirham|dirhams|dirham dels emirats Àrabs units|aed|dhs"), + ("Nakfa", "nakfa|nfk|ern"), + ("Cèntim de Nakfa", "cèntim de nakfa|cèntims de nakfa"), + ("Pesseta", "pesseta|pessetes|pts.|ptes.|esp"), + ("Dòlar nord-americà", "dòlar nord-americà|dòlars nord-americans|usd|u$d|us$"), + ("Corona estonia", "corona estonia|corones estonias|eek"), + ("Senti estonia", "senti estonia|senti estonias"), + ("Birr etíop", "birr etíop|birr etíops|br|etb"), + ("Santim etíop", "santim etíop|santim etíops"), + ("Pes filipí", "pes filipino|pes pes filipins|php"), + ("Marc finlandès", "marc finlandès|marcs finlandesos"), + ("Dòlar fiyià", "dòlar fiyià|dòlars fiyians|fj$|fjd"), + ("Centau fiyiano", "centavo fiyiano|centavos fiyianos"), + ("Dalasi", "dalasi|gmd"), + ("Bututs", "butut|bututs"), + ("Lari georgià", "lari georgià|lari georgians|gel"), + ("Tetri georgià", "tetri georgià|tetri georgians"), + ("Cedi", "cedi|ghs|gh₵"), + ("Pesewa", "pesewa"), + ("Lliura gibraltarenya", "lliura gibraltareña|lliures gibraltarenyes|gip"), + ("Penique gibraltareña", "penique gibraltareña|peniques gibraltareñas"), + ( + "Quetzal guatemalenc", "quetzal guatemalenc|quetzals guatemalencs|quetzal|quetzals|gtq"), + ("Centau guatemalenc", "centau guatemalenc|centaus guatemalencs"), + ("Lliura de Guernsey", "lliura de guernsey|lliures de guernsey|ggp"), + ("Penique de Guernsey", "penique de guernsey|peniques de guernsey"), + ("Franc guineà", "franc guineà|francs guineans|gnf|fg"), + ("Cèntim guineà", "cèntim guineà|cèntims guineans"), + ("Dòlar guyanès", "dòlar guyanès|dòlars guyanesos|gyd|gy"), + ("Gourde haitiano", "gourde haitiano|gourde haitians|htg"), + ("Cèntim haitià", "cèntim haitià|cèntims haitians"), + ("Lempira hondureny", "lempira hondureny|lempira hondurenys|hnl"), + ("Centau hondureny", "centavo hondureny|centavos hondureny"), + ("Dòlar de Hong Kong", "dòlar de hong kong|dòlars de hong kong|hk$|hkd"), + ("Forint hongarès", "forint hongarès|forint hongarès|huf"), + ("Rúpia índia", "rupia índia|rupies índies|inr"), + ("Paisa índia", "paisa índia|paise índies"), + ("Rúpia indonèsia", "rupia indonèsia|rupies indonèsies|idr"), + ("Sen indonèsia", "sense indonèsia|sense indonèsies"), + ("Rial iranià", "rial iranià|rial iranies|irr"), + ("Dinar iraquià", "dinar iraquià|dinars iraquís|iqd"), + ("Fil iraquià", "fil iraquià|fils iraquís"), + ("Lliura manesa", "lliura manesa|lliures maneses|imp"), + ("Penique manes", "penique manes|peniques manesos"), + ("Corona islandesa", "corona islandesa|corones islandeses|isk|ikr"), + ("Aurar islandes", "aurar islandes|aurar islandesos"), + ("Dòlar de les Illes Caiman", + "dòlar de les illes caiman|dòlars de les illes caiman|ci$|kyd"), + ("Dòlar de les Illes Cook", "dòlar de les illes cook|dòlars de les illes cook"), + ("Corona feroesa", "corona feroesa|corones feroeses|fkr"), + ("Lliura malvinenca", "lliura malvinenca|lliures malvinenques|fk£|fkp"), + ("Dòlar de les Illes Salomó", + "dòlar de les illes salomón|dòlars de les illes salomón|sbd"), + ("Nou shéquel", "nou shéquel|nous shéquel|ils"), + ("Agorot", "agorot"), + ("Dòlar jamaiquí", "dòlar jamaiquí|dòlars jamaiquins|j$|ja$|jmd"), + ("ien", "ien|iens|jpy"), + ("Lliura de Jersey", "lliura de jersei|lliures de jersei|jep"), + ("Dinar jordà", "dinar jordà|dinars jordans|jd|jod"), + ("Piastra jordà", "piastra jordà|piastres jordans"), + ("Tenge kazakh", "tenge|tenge kazakh|kzt"), + ("Xelín kenià", "xíling kenià|xílings kenyans|ksh|kes"), + ("Som kirguís", "som kirguís|kgs"), + ("Tyiyn", "tyiyn"), + ("Dòlar de Kiribati", "dòlar de kiribati|dòlars de kiribati"), + ("Dinar kuwaití", "dinar kuwaití|dinars kuwaití"), + ("Kip laosià", "kip|kip laosià|kip laosians|lak"), + ("Att laosià", "att|att laosià|att laosians"), + ("Loti", "loti|maloti|lsl"), + ("Sent", "sent|llisent"), + ("Lliura libanesa", "lliura libanesa|lliures libaneses|lbp"), + ("Dòlar liberià", "dòlar liberià|dòlars liberians|l$|lrd"), + ("Dinar libi", "dinar libi|dinars libis|ld|lyd"), + ("Dirham libi", "dirham libi|dirhams libis"), + ("Lites lituana", "lites lituana|litai lituanes|ltl"), + ("Pataca macaense", "pataca macaense|pataques macaenses|mop$|mop"), + ("Avo macaense", "avo macaense|aus macaenses"), + ("Ho macaense", "ho macaense|ho macaenses"), + ("Denar macedoni", "denar macedoni|denare macedoni|den|mkd"), + ("Deni macedoni", "deni macedoni|deni macedonis"), + ("Ariary malgaixos", "ariary malgaixos|ariary malgaixos|mga"), + ("Iraimbilanja malgaixos", "iraimbilanja malgaixos|iraimbilanja malgaixos"), + ("Ringgit malai", "ringgit malai|ringgit malais|rm|myr"), + ("Sen malayo", "sen malayo|sen malais"), + ("Kwacha malauí", "kwacha malauí|mk|mwk"), + ("Tamba malauí", "tamba malauí"), + ("Rúpia de Maldives", "rupia de maldives|rupies de maldives|mvr"), + ("Dirham marroquí", "dirham marroquí|dirhams marroquins|mad"), + ("Rúpia de Maurici", "rupia de Maurici|rupies de Maurici|mur"), + ("Uguiya", "uguiya|uguiyas|mro"), + ("Jum", "jum|jums"), + ("Pes mexicà", "pes mexicà|pesos mexicans|mxn|mxn$|mxn $|mex$"), + ("Centau mexicà", "centau mexicà|centaus mexicans"), + ("Leu moldau", "leu moldau|llei moldaus|mdl"), + ("Ban moldau", "ban moldau|bani moldaus"), + ("Tugrik mongol", "tugrik mongol|tugrik|tugrik mongols|tug|mnt"), + ("Metical moçambiquès", + "metical|metical moçambiquès|meticals|meticals moçambiquesos|mtn|mzn"), + ("Dram de Nagorno Karabaj", "dram de nagorno karabaj|drams de nagorno karabaj"), + ("Luma de Nagorno Karabakh", "luma de nagorn karabakh"), + ("Dòlar namibi", "dòlar namibi|dòlars namibis|n$|nad"), + ("Centau namibi", "centau namibi|centaus namibis"), + ("Rúpia nepalès", "rupia nepalesa|rupies nepales|npr"), + ("Païsa nepalès", "païssa nepalesa|països nepalesos"), + ("Còrdova nicaragüenc", "còrdova nicaragüenc|còrdoves nicaragüencs|ni"), + ("Centau nicaragüenc", "centau nicaragüenc|centaus nicaragüencs"), + ("Naira", "naira|ngn"), + ("Kobo", "kobo"), + ("Corona noruega", "corona noruega|corones noruegues|nok"), + ("Franc CFP", "franc cfp|francs cfp|xpf"), + ("Dòlar neozelandès", + "dòlar neozelandès|dòlars neozelandesos|dòlar de nova zelanda|dòlars de nova zelanda|nz$|nzd"), + ("Centau neozelandès", + "centau neozelandès|centau de nova zelanda|centaus de nova zelanda|centaus neozelandesos"), + ("Rial omaní", "rial omaní|rials omanies|omr"), + ("Baisa omaní", "baisa omaní|baisa omanies"), + ("Florí neerlandès", "florí neerlandès|florins neerlandesos|nlg"), + ("Rúpia pakistanesa", "rupia pakistanesa|rupies pakistaneses|pkr"), + ("Païsa pakistanesa", "paisa pakistanesa|països pakistanesos"), + ("Balboa panameny", "balboa panameny|balboa panamenys|pab"), + ("Centíssim panameny", "centèsim panameny|centèsims panamenys"), + ("Kina", "kina|pkg|pgk"), + ("Toea", "toea"), + ("Guaraní", "guaraní|guaranies|gs|pyg"), + ("Sol", "sol|sols|nou sol|pen|s#."), + ("Cèntim de sol", "cèntim de sol|cèntims de sol"), + ("Złoty", "złoty|esloti|eslotis|zł|pln"), + ("Groszy", "groszy"), + ("Riyal qatarià", "riyal qatarià|riyal qatarià|qr|qar"), + ("Dirham qatarià", "dirham qatarià|dirhams qataries"), + ("Lliura esterlina", "lliura esterlina|lliures esterlines|gbp"), + ("Corona txeca", "corona txeca|corones txeques|kc|czk"), + ("Pes dominicà", "pes dominicà|pesos dominicans|rd$|dop"), + ("Centau dominicà", "centau dominicà|centaus dominicans"), + ("Franc ruandès", "franc ruandès|francs ruandesos|rf|rwf"), + ("Cèntim ruandès", "cèntim ruandès|cèntims ruandesos"), + ("Leu romanès", "leu romanès|llei romanesos|rom"), + ("Ban romanès", "ban romanès|bani romanesos"), + ("Ruble rus", "ruble rus|rubles russos|rub"), + ("Kopek rus", "kopek rus|kopeks russos"), + ("Tala", "tala|tālā|ws$|sat|wst"), + ("Sene", "sene"), + ("Lliura de Santa Helena", "lliura de santa hel·lena|lliures de santa hel·lena|shp"), + ("Penique de Santa Helena", "penique de santa hel·lena|peniques de santa hel·lena"), + ("Dobra", "dobra"), + ("Dinar serbi", "dinar serbi|dinars serbis|rsd"), + ("Per a serbi", "per a serbi|per a serbis"), + ("Rúpia de Seychelles", "rupia de seychelles|rupies de seychelles|scr"), + ("Centau de Seychelles", "centau de seychelles|centaus de seychelles"), + ("Leone", "leone|li|sll"), + ("Dòlar de Singapur", "dòlar de singapur|dòlars de singapur|sgb"), + ("Centau de Singapur", "centau de Singapur|centaus de Singapur"), + ("Lliura siriana", "lliura siriana|lliures sirianes|s£|syp"), + ("Piastra siriana", "piastra siriana|piastres sirianes"), + ("Xelin somali", "xíling somali|xílings somalis|sos"), + ("Centau somali", "centau somali|centaus somalies"), + ("Xelín somalilandès", "xíling somalilandès|xílings somalilandesos"), + ("Centau somalilandès", "centau somalilandès|centaus somalilandesos"), + ("Rúpia de Sri Lanka", "rupia de Sri Lanka|rupies de Sri Lanka|lkr"), + ("Cèntim de Sri Lanka", "cèntim de Sri Lanka|cèntims de Sri Lanka"), + ("Lilangeni", "lilangeni|emalangeni|szl"), + ("Rand sud-africà", "rand|rand sud-africà|tsar"), + ("Lliura sudanesa", "lliura sudanesa|lliures sudaneses|sdg"), + ("Piastra sudanesa", "piastra sudanesa|piastres sudaneses"), + ("Lliura sursudanesa", "lliura sursudanesa|lliures sursudanesa|ssp"), + ("Piastra sursudanesa", "piastra sursudanesa|piastres sursudaneses"), + ("Corona sueca", "corona sueca|corones sueques|sek"), + ("Franc suís", "franc suís|francs suïssos|sfr|chf"), + ("Rappen suís", "rappen suís|rappens suïssos"), + ("Dòlar surinamés", "òolar surinamés|dòlars surinamesos|srd"), + ("Centau surinamés", "centau surinamés|centaus surinamés"), + ("Baht tailandès", "baht tailandès|baht tailandesos|thb"), + ("Satang tailandès", "satang tailandès|satang tailandesos"), + ("Nou dòlar taiwanès", "nou dòlar taiwanès|dòlar taiwanès|dòlars taiwanesos|twd"), + ("Centau taiwanès", "centau taiwanès|centaus taiwanesos"), + ("Xelín tanzano", "xíling tanzano|xílings tanzanos|tzs"), + ("Centau tanzano", "centavo tanzano|centavos tanzanos"), + ("Somoni tayiko", "somoni tayiko|somoni|tjs"), + ("Diram", "diram|dirams"), + ("Paʻanga", "dòlar tongan|dòlars tongans|paʻanga|pa'anga|top"), + ("Seniti", "seniti"), + ("Ruble de Transnistria", "ruble de transnistria|rubles de transnistria"), + ("Kopek de Transnistria", "kopek de transnistria|kopeks de transnistria"), + ("Dòlar trinitenc", "dòlar trinitenc|dòlars trinitencs|ttd"), + ("Centau trinitense", "centavo trinitense|centavos trinitenses"), + ("Dinar tunisià", "dinar tunisià|dinars tunisians|tnd"), + ("Millime tunisià", "millime tunisià|millimes tunisians"), + ("Lira turca", "lira turca|lires turques|try"), + ("Kuruş turca", "kuruş turca|kuruş turques"), + ("Manat turcman", "manat turcmen|manat turkmenos|tmt"), + ("Tennesi turcman", "tennesi turcman|tenge turcman"), + ("Dòlar tuvaluà", "dòlar tuvaluà|dòlars tuvaluans"), + ("Centau tuvaluà", "centau tuvaluà|centaus tuvaluans"), + ("Grivna", "grivna|grivnas|uah"), + ("Kopiyka", "kopiyka|kopeks"), + ("Xelín ugandès", "xíling ugandès|xílings ugandesos|ugx"), + ("Centau ugandès", "centau ugandès|centaus ugandesos"), + ("Pes uruguaià", "pes uruguaià|pesos uruguaians|uyu"), + ("Centèssim uruguaià", "centèsim uruguaià|centèsims uruguaians"), + ("Som uzbeko", "som uzbeko|som uzbekos|uzs"), + ("Tiyin uzbeko", "tiyin uzbeko|tiyin uzbekos"), + ("Vatu", "vatu|vuv"), + ("Bolívar fort", "bolívar fort|bolívar|bolívars|vef"), + ("Cèntim de bolívar", "cèntim de bolívar|cèntims de bolívar"), + ("Đồng vietnamita", "Đồng vietnamita|dong vietnamita|dong vietnamites|vnd"), + ("Hào vietnamita", "Hào vietnamita|hao vietnamita|hao vietnamites"), + ("Rial iemenita", "rial iemenit|rials iemenites|yer"), + ("Fils iemenita", "fils iemenita|fils iemenites"), + ("Franc gibutià", "franc gibutià|francs gibutians|djf"), + ("Dinar iugoslau", "dinar iugoslau|dinars iugoslaus|yud"), + ("Kwacha zambià", "kwacha zambià|kwacha zambians|zmw"), + ("Ngwee zambià", "ngwee zambià|ngwee zambians"), + ("Bitcoin", "bitcoin|bitcoins|btc|xbt|₿"), + ("Millibitcoin", "millibitcoin|millibitcoins|milibitcoin|milibitcoins"), + ("Satoshi", "satoshi|satoshis")]) + CurrencyNameToIsoCodeMap = dict([("Afgani afganès", "AFN"), + ("Euro", "EUR"), + ("Lek albanès", "ALL"), + ("Kwanza angolès", "AOA"), + ("Dram armeni", "AMD"), + ("Florín arubeño", "AWG"), + ("Taka bangladeshí", "BDT"), + ("Ngultrum butanès", "BTN"), + ("Bolivià", "BOB"), + ("Marc bosniohercegoví", "BAM"), + ("Pula", "BWP"), + ("Real brasiler", "BRL"), + ("Lev búlgar", "BGN"), + ("Riel cambodjà", "KHR"), + ("Escut caboverdià", "CVE"), + ("Coló costarricense", "CRC"), + ("Kuna croata", "HRK"), + ("Corona txeca", "CZK"), + ("Nakfa", "ERN"), + ("Birr etíop", "ETB"), + ("Dalasi", "GMD"), + ("Lari georgià", "GEL"), + ("Cedi", "GHS"), + ("Quetzal guatemalenc", "GTQ"), + ("Gourde haitià", "HTG"), + ("Lempira hondureny", "HNL"), + ("Forint hongarès", "HUF"), + ("Rial iranià", "IRR"), + ("Rial iemenita", "YER"), + ("Nou shéquel", "ILS"), + ("Ien", "JPY"), + ("Tenge kazakh", "KZT"), + ("Xelín kenià", "KES"), + ("Won nord-coreà", "KPW"), + ("Won sud-coreà", "KRW"), + ("Som kirguís", "KGS"), + ("Kip laosià", "LAK"), + ("Loti", "LSL"), + ("Rand sud-africà", "ZAR"), + ("Pataca macaense", "MOP"), + ("Denar macedoni", "MKD"), + ("Ariary malgaix", "MGA"), + ("Kwacha malauí", "MWK"), + ("Ringgit malai", "MYR"), + ("Uguiya", "MRO"), + ("Tugrik mongol", "MNT"), + ("Metical moçambiquès", "MZN"), + ("Kyat birmà", "MMK"), + ("Còrdova nicaragüenc", "NIO"), + ("Naira", "NGN"), + ("Lira turca", "TRY"), + ("Rial omaní", "OMR"), + ("Balboa panameny", "PAB"), + ("Kina", "PGK"), + ("Guaraní", "PYG"), + ("Sol", "PEN"), + ("Złoty", "PLN"), + ("Riyal qatarià", "QAR"), + ("Riyal saudita", "SAR"), + ("Tala", "WST"), + ("Són Tomé and Príncep dobra", "STN"), + ("Leone", "SLL"), + ("Lilangeni", "SZL"), + ("Somoni tayiko", "TJS"), + ("Baht tailandès", "THB"), + ("Grivna", "UAH"), + ("Vatu", "VUV"), + ("Bolívar fort", "VEF"), + ("Kwacha zambià", "ZMW"), + ("Dirham marroquí", "MAD"), + ("Dirham dels Unió dels Emirats Àrabs", "AED"), + ("Manat azerí", "AZN"), + ("Manat turkmè", "TMT"), + ("Xelin somali", "SOS"), + ("Xelín tanzano", "TZS"), + ("Xelín ugandès", "UGX"), + ("Leu romanès", "RON"), + ("Leu moldau", "MDL"), + ("Rúpia nepalesa", "NPR"), + ("Rupia pakistanesa", "PKR"), + ("Rúpia índia", "INR"), + ("Rúpia de Seychelles", "SCR"), + ("Rúpia de Maurici", "MUR"), + ("Rúpia de Maldives", "MVR"), + ("Rúpia de Sri Lanka", "LKR"), + ("Rupia indonèsia", "IDR"), + ("Corona danesa", "DKK"), + ("Corona noruega", "NOK"), + ("Corona islandesa", "ISK"), + ("Corona sueca", "SEK"), + ("Franc CFA d'Àfrica Occidental", "XOF"), + ("Franc CFA d'Àfrica Central", "XAF"), + ("Franc comorà", "KMF"), + ("Franc congolès", "CDF"), + ("Burundian franc", "BIF"), + ("Franc gibutià", "DJF"), + ("Franco CFP", "XPF"), + ("Franc guineà", "GNF"), + ("Franc suís", "CHF"), + ("Franc ruandès", "RWF"), + ("Ruble rus", "RUB"), + ("Transnistrian ruble", "PRB"), + ("New Belarusian ruble", "BYN"), + ("Dinar algerià", "DZD"), + ("Dinar bahrainès", "BHD"), + ("Dinar iraquià", "IQD"), + ("Dinar jordà", "JOD"), + ("Kuwaiti dinar", "KWD"), + ("Dinar libi", "LYD"), + ("Dinar serbi", "RSD"), + ("Dinar tunisià", "TND"), + ("Pes argentí", "ARS"), + ("Xilean pes", "CLP"), + ("Pes colombià", "COP"), + ("Pes cubà convertible", "CUC"), + ("Pes cubà", "CUP"), + ("Pes dominicà", "DOP"), + ("Pes mexicà", "MXN"), + ("Pes uruguaià", "UYU"), + ("Lliura esterlina", "GBP"), + ("Lliura de Santa Helena", "SHP"), + ("Lliura egípcia", "EGP"), + ("Lliura malvinenca", "FKP"), + ("Lliura gibraltarenya", "GIP"), + ("Lliura manesa", "IMP"), + ("Lliura de Jersey", "JEP"), + ("Lliura libanesa", "LBP"), + ("Lliura sursudanesa", "SSP"), + ("Lliura sudanesa", "SDG"), + ("Lliura siriana", "SYP"), + ("Dòlar nord-americà", "USD"), + ("Dòlar australià", "AUD"), + ("Dòlar de Bahama", "BSD"), + ("Dòlar de Barbados", "BBD"), + ("Dòlar bel·liceny", "BZD"), + ("Dòlar bermudeny", "BMD"), + ("Dòlar de Brunéi", "BND"), + ("Dòlar de Singapur", "SGD"), + ("Dòlar canadenc", "CAD"), + ("Dòlar de les Illes Caiman", "KYD"), + ("Dòlar neozelandès", "NZD"), + ("Dòlar fiyià", "FJD"), + ("Dòlar guyanès", "GYD"), + ("Dòlar de Hong Kong", "HKD"), + ("Dòlar jamaiquí", "JMD"), + ("Dòlar liberià", "LRD"), + ("Dòlar namíbi", "NAD"), + ("Dòlar de les Illes Salomó", "SBD"), + ("Dòlar surinamés", "SRD"), + ("Nou dòlar taiwanès", "TWD"), + ("Dòlar trinitenc", "TTD"), + ("Tuvaluan dollar", "TVD"), + ("Yuan xinès", "CNY"), + ("Rial", "__RI"), + ("Xelín", "__S"), + ("Som", "__SO"), + ("Dirham", "__DR"), + ("Dinar", "_DN"), + ("Dòlar", "__D"), + ("Manat", "__MA"), + ("Rupia", "__R"), + ("Corona", "__K"), + ("Franco", "__F"), + ("Marc", "__M"), + ("Ruble", "__RB"), + ("Pes", "__PE"), + ("Lliura", "__P"), + ("Tristan dóna Cunha lliura", "_TP"), + ("South Georgia and the South Sandwich Islands lliura", "_SP"), + ("Somaliland xíling", "_SS"), + ("Pitcairn Islands dòlar", "_PND"), + ("Palauan dòlar", "_PD"), + ("Niu dòlar", "_NID"), + ("Nauruan dòlar", "_ND"), + ("Micronesian dòlar", "_MD"), + ("Kiribati dòlar", "_KID"), + ("Guernsey lliura", "_GGP"), + ("Faroese corona", "_FOK"), + ("Cook Islands dòlar", "_CKD"), + ("British Virgin Islands dòlar", "_BD"), + ("Ascensió lliura", "_AP"), + ("Alderney lliura", "_ALP"), + ("Abkhazian apsar", "_AA"), + ("Bitcoin", "_XBT")]) + FractionalUnitNameToCodeMap = dict([("Jiao", "JIAO"), + ("Kópek", "KOPEK"), + ("Kopek", "KOPEK"), + ("Pul", "PUL"), + ("Cent", "CENT"), + ("Qindarka", "QINDARKE"), + ("Penique", "PENNY"), + ("Santeem", "SANTEEM"), + ("Cêntimo", "CENT"), + ("Centau", "CENT"), + ("Luma", "LUMA"), + ("Qəpik", "QƏPIK"), + ("Fils", "FILS"), + ("Poisha", "POISHA"), + ("Kapyeyka", "KAPYEYKA"), + ("Kopyeyka", "KOPYEYKA"), + ("Centime", "CENTIME"), + ("Chetrum", "CHETRUM"), + ("Païsa", "PAISA"), + ("Feningas", "FENING"), + ("Thebe", "THEBE"), + ("Sen", "SEN"), + ("Stotinka", "STOTINKA"), + ("Fen", "FEN"), + ("Cèntim", "CENT"), + ("Lipa", "LIPA"), + ("Haléř", "HALER"), + ("Øre", "ØRE"), + ("Piastre", "PIASTRE"), + ("Santim", "SANTIM"), + ("Oyra", "OYRA"), + ("Butut", "BUTUT"), + ("Tetri", "TETRI"), + ("Pesewa", "PESEWA"), + ("Filler", "FILLER"), + ("Eyrir", "EYRIR"), + ("Dinar", "DINAR"), + ("Agora", "AGORA"), + ("Tiın", "TIIN"), + ("Chon", "CHON"), + ("Jeon", "JEON"), + ("Tyiyn", "TYIYN"), + ("Att", "ATT"), + ("Sent", "SENT"), + ("Dirham", "DIRHAM"), + ("Rappen", "RAPPEN"), + ("Avo", "AVO"), + ("Deni", "DENI"), + ("Iraimbilanja", "IRAIMBILANJA"), + ("Tambala", "TAMBALA"), + ("Laari", "LAARI"), + ("Khoums", "KHOUMS"), + ("Ban", "BAN"), + ("Möngö", "MONGO"), + ("Pya", "PIA"), + ("Kobo", "KOBO"), + ("Kuruş", "KURUS"), + ("Baisa", "BAISSA"), + ("Centíssim", "CENTESIM"), + ("Toea", "TOEA"), + ("Sentim", "SENTIM"), + ("Grosz", "GROSZ"), + ("Sene", "SENE"), + ("Halala", "HALALA"), + ("Per", "PER"), + ("Öre", "ORE"), + ("Diram", "DIRAM"), + ("Satang", "SATANG"), + ("Seniti", "SENITI"), + ("Millime", "MILLIME"), + ("Tennesi", "TENNESI"), + ("Kopiyka", "KOPIYKA"), + ("Tiyin", "TIYIN"), + ("Hào", "HAO"), + ("Ngwee", "NGWEE"), + ("Millibitcoin", "MILLIBITCOIN"), + ("Satoshi", "SATOSHI")]) + CompoundUnitConnectorRegex = f'(?i|amb)' + MultiplierRegex = f'\\s*\\b(((mil\\s+)?el meu|bi|quatri|quinti|sexti|sèpti)ll[oó]n|mil)(és)?\\b' + CurrencyPrefixList = dict([("Dobra", "db|std"), + ("Dòlar", "$|dòlar|dòlars|dolar|dolars"), + ("Dòlar nord-americà", "us$|u$d|usd"), + ("Dòlar del Carib Oriental", "ec$|xcd"), + ("Dòlar australià", "a$|aud"), + ("Dòlar de Bahama", "b$|bsd"), + ("Dòlar de Barbados", "bds$|bbd"), + ("Dòlar bel·liceny", "bz$|bzd"), + ("Dòlar bermudeny", "bd$|bmd"), + ("Dòlar de Brunéi", "brunèi $|bnd"), + ("Dòlar de Singapur", "s$|sgd"), + ("Dòlar canadenc", "c$|can$|cad"), + ("Dòlar de les Illes Caiman", "ci$|kyd"), + ("Dòlar neozelandès", "nz$|nzd"), + ("Dòlar fiià", "fj$|fjd"), + ("Dòlar guyanès", "gi$|gyd"), + ("Dòlar de Hong Kong", "hk$|hkd"), + ("Dòlar jamaiquí", "j$|ja$|jmd"), + ("Dòlar liberià", "l$|lrd"), + ("Dòlar namíbi", "n$|nad"), + ("Dòlar de les Illes Salomó", "si$|sbd"), + ("Nou dòlar taiwanès", "nt$|twd"), + ("Pes mexicà", "mxn|mxn$|mxn $|mex$"), + ("Real brasiler", "r$|brl"), + ("Guaraní", "₲|gs.|pyg"), + ("Dòlar trinitenc", "tt$|ttd"), + ("Yuan xinès", "\|cny|rmb"), + ("Ien", "\|jpy"), + ("Euro", "€|eur"), + ("Florín", "ƒ"), + ("Lliura", "£"), + ("Coló costarricense", "₡"), + ("Lira turca", "₺"), + ("Bitcoin", "₿|btc|xbt")]) + AmbiguousCurrencyUnitList = [r'le', r'db', r'std'] + BuildPrefix = f'(?<=(\\s|^|\\P{{L}}))' + BuildSuffix = f'(?=(\\s|\\P{{L}}|$))' +# pylint: enable=line-too-long \ No newline at end of file diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/italian_numeric_with_unit.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/italian_numeric_with_unit.py index a9a591e451..3a9db02d54 100644 --- a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/italian_numeric_with_unit.py +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/italian_numeric_with_unit.py @@ -541,7 +541,7 @@ class ItalianNumericWithUnit: ("Millibitcoin", "MILLIBITCOIN"), ("Satoshi", "SATOSHI")]) CompoundUnitConnectorRegex = f'(?e)' - CurrencyPrefixList = dict([("Dollar", "$"), + CurrencyPrefixList = dict([("Dollar", "$|dollari"), ("United States dollar", "$ stati uniti|us$|us $|u.s. $|u.s $"), ("East Caribbean dollar", "east caribbean $"), ("Australian dollar", "$ australiano|$ australia"), diff --git a/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/japanese_numeric_with_unit.py b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/japanese_numeric_with_unit.py new file mode 100644 index 0000000000..6327912260 --- /dev/null +++ b/Python/libraries/recognizers-number-with-unit/recognizers_number_with_unit/resources/japanese_numeric_with_unit.py @@ -0,0 +1,599 @@ +# ------------------------------------------------------------------------------ +# +# This code was generated by a tool. +# Changes to this file may cause incorrect behavior and will be lost if +# the code is regenerated. +# +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# ------------------------------------------------------------------------------ + +from .base_numbers import BaseNumbers +# pylint: disable=line-too-long + + +class JapaneseNumericWithUnit: + AgeAmbiguousValues = [r'歳'] + AgeSuffixList = dict([("Year", "歳"), + ("Month", "ヶ月"), + ("Week", "週間|週"), + ("Day", "日間|日齢|日大")]) + BuildPrefix = '' + BuildSuffix = '' + ConnectorToken = '' + CheckFirstSuffix = True + CurrencySuffixList = dict([("Afghan afghani", "アフガニ"), + ("Pul", "プル"), + ("Euro", "ユーロ"), + ("Cent", "セント"), + ("Albanian lek", "アルバニアレク|アルバニア・レク|レク"), + ("Angolan kwanza", "アンゴラクワンザ|アンゴラ・クワンザ|クワンザ"), + ("Armenian dram", "アルメニアドラム|アルメニア・ドラム|ドラム"), + ("Aruban florin", "アルバ・フロリン|フロリン"), + ("Bangladeshi taka", "タカ|バングラデシュ・タカ"), + ("Paisa", "パイサ"), + ("Bhutanese ngultrum", "ニュルタム|ブータン・ニュルタム|ブータンニュルタム"), + ("Chetrum", "チェルタム"), + ("Bolivian boliviano", "ボリビアーノ"), + ("Bosnia and Herzegovina convertible mark", "兌換マルク"), + ("Botswana pula", "ボツワナ・プラ|ボツワナプラ|プラ"), + ("Thebe", "テベ"), + ("Brazilian real", "ブラジル・レアル|ブラジルレアル|レアル"), + ("Bulgarian lev", "ブルガリア・レフ|ブルガリアレフ|レフ"), + ("Stotinka", "ストティンカ"), + ("Cambodian riel", "カンボジア・リエル|カンボジアリエル|リエル"), + ("Cape Verdean escudo", "カーボベルデ・エスクード"), + ("Croatian kuna", "クロアチアクーナ|クロアチア・クーナ|クーナ"), + ("Lipa", "リパ"), + ("Eritrean nakfa", "エリトリア・ナクファ|エリトリアナクファ|ナクファ"), + ("Ethiopian birr", "エチオピア・ブル|エチオピアブル|ブル"), + ("Gambian dalasi", "ガンビア・ダラシ|ガンビアダラシ|ダラシ"), + ("Butut", "ブトゥツ"), + ("Georgian lari", "ジョージア・ラリ|ジョージアラリ|ラリ"), + ("Tetri", "テトリ"), + ("Ghanaian cedi", "ガーナ・セディ|ガーナセディ|セディ"), + ("Pesewa", "ペセワ"), + ("Guatemalan quetzal", "グアテマラ・ケツァル|グアテマラケツァル|ケツァル"), + ("Haitian gourde", "ハイチ・グールド|ハイチグールド|グールド"), + ("Honduran lempira", "ホンジュラス・レンピラ|ホンジュラスレンピラ|レンピラ"), + ("Hungarian forint", "ハンガリー・フォリント|ハンガリーフォリント|フォリント"), + ("Iranian rial", "イラン・リアル"), + ("Yemeni rial", "イエメン・リアル"), + ("Israeli new shekel", "₪|ils|イスラエル・新シェケル|イスラエル新シェケル"), + ("Japanese yen", "円"), + ("Sen", "銭"), + ("Kazakhstani tenge", "テンゲ|カザフスタン・テンゲ|カザフスタンテンゲ"), + ("Kenyan shilling", "ケニア・シリング"), + ("North Korean won", "北朝鮮ウォン"), + ("South Korean won", "韓国ウォン"), + ("Korean won", "₩"), + ("Kyrgyzstani som", "キルギス・ソム|ソム"), + ("Lao kip", "キップ|ラオス・キップ|ラオスキップ"), + ("Att", "att"), + ("Lesotho loti", "ロチ|レソト・ロチ|レソトロチ"), + ("South African rand", "ランド|南アフリカ・ランド|南アフリカランド"), + ("Macedonian denar", "マケドニア・デナール"), + ("Deni", "デニ"), + ("Malagasy ariary", "アリアリ|マダガスカル・アリアリ|マダガスカルアリアリ"), + ("Iraimbilanja", "イライムビランジャ"), + ("Malawian kwacha", "マラウイ・クワチャ"), + ("Tambala", "タンバラ"), + ("Malaysian ringgit", "リンギット|マレーシア・リンギット"), + ("Mauritanian ouguiya", "ウギア|モーリタニア・ウギア|モーリタニアウギア"), + ("Khoums", "コウム"), + ("Mozambican metical", "メティカル|モザンビーク・メティカル|モザンビークメティカル"), + ("Burmese kyat", "チャット|ミャンマー・チャット|ミャンマーチャット"), + ("Pya", "ピャー"), + ("Nigerian naira", "ナイラ|ナイジェリア・ナイラ|ナイジェリアナイラ"), + ("Kobo", "コボ"), + ("Turkish lira", "トルコリラ"), + ("Kuruş", "クルシュ"), + ("Omani rial", "オマーン・リアル"), + ("Panamanian balboa", "バルボア|パナマ・バルボア|パナマバルボア"), + ("Centesimo", "センテシモ"), + ("Papua New Guinean kina", "キナ|パプア・ニューギニア・キナ"), + ("Toea", "トエア"), + ("Peruvian sol", "ヌエボ・ソル"), + ("Polish złoty", "ズウォティ|ポーランド・ズウォティ|ポーランドズウォティ"), + ("Grosz", "グロシュ"), + ("Qatari riyal", "カタール・リヤル"), + ("Saudi riyal", "サウジアラビア・リヤル"), + ("Riyal", "リヤル"), + ("Dirham", "ディルハム"), + ("Halala", "ハララ"), + ("Samoan tālā", "タラ|サモア・タラ|サモアタラ"), + ("Sierra Leonean leone", "レオン|シエラレオネ・レオン|シエラレオネレオン"), + ("Peseta", "ペセタ"), + ("Swazi lilangeni", "リランゲニ|スワジランド・リランゲニ|スワジランドリランゲニ"), + ("Tajikistani somoni", "ソモニ|タジキスタン・ソモニ|タジキスタンソモニ"), + ("Thai baht", "バーツ|タイ・バーツ|タイバーツ"), + ("Satang", "サタン"), + ("Tongan paʻanga", "パアンガ|トンガ・パアンガ|トンガパアンガ"), + ("Ukrainian hryvnia", "フリヴニャ|ウクライナ・フリヴニャ|ウクライナフリヴニャ"), + ("Vanuatu vatu", "バツ|バヌアツ・バツ|バヌアツバツ"), + ("Vietnamese dong", "ドン|ベトナム・ドン|ベトナムドン"), + ("Indonesian rupiah", "ルピア|インドネシア・ルピア|インドネシアルピア"), + ("Netherlands guilder", "オランダ・ユーロ"), + ("Surinam florin", "スリナムフロリン"), + ("Zambian kwacha", "ザンビア・クワチャ"), + ("Moroccan dirham", "モロッコ・ディルハム"), + ("United Arab Emirates dirham", "UAEディルハム"), + ("Azerbaijani manat", "アゼルバイジャン・マナト"), + ("Turkmenistan manat", "トルクメニスタン・マナト"), + ("Manat", "マナト"), + ("Somali shilling", "ソマリア・シリング"), + ("Somaliland shilling", "ソマリランド・シリング"), + ("Tanzanian shilling", "タンザニア・シリング"), + ("Ugandan shilling", "ウガンダ・シリング"), + ("Romanian leu", "ルーマニア・レウ"), + ("Moldovan leu", "モルドバ・レウ"), + ("Leu", "レウ"), + ("Ban", "バン"), + ("Nepalese rupee", "ネパール・ルピー"), + ("Pakistani rupee", "パキスタン・ルピー"), + ("Indian rupee", "インド・ルピー"), + ("Seychellois rupee", "セーシェル・ルピー"), + ("Mauritian rupee", "モーリシャス・ルピー"), + ("Maldivian rufiyaa", "ルフィヤ|モルディブ・ルフィヤ|モルディブルフィヤ"), + ("Sri Lankan rupee", "スリランカ・ルピー"), + ("Rupee", "ルピー"), + ("Czech koruna", "チェコ・コルナ"), + ("Danish krone", "デンマーク・クローネ"), + ("Norwegian krone", "ノルウェー・クローネ"), + ("Faroese króna", "フェロー・クローネ"), + ("Icelandic króna", "アイスランド・クローナ"), + ("Swedish krona", "スウェーデン・クローナ"), + ("Krone", "クローナ"), + ("Øre", "オーレ"), + ("West African CFA franc", "西アフリカCFAフラン"), + ("Central African CFA franc", "中央アフリカCFAフラン"), + ("Comorian franc", "コモロ・フラン"), + ("Congolese franc", "コンゴ・フラン"), + ("Burundian franc", "ブルンジ・フラン"), + ("Djiboutian franc", "ジブチ・フラン"), + ("CFP franc", "CFPフラン"), + ("Guinean franc", "ギニア・フラン"), + ("Swiss franc", "スイス・フラン|スイスフラン"), + ("Rwandan franc", "ルワンダ・フラン"), + ("Belgian franc", "ベルギー・フラン"), + ("Rappen", "Rappen"), + ("Franc", "フラン"), + ("Centime", "サンチーム"), + ("Russian ruble", "ロシア・ルーブル"), + ("Transnistrian ruble", "沿ドニエストル・ルーブル"), + ("Belarusian ruble", "ベラルーシ・ルーブル"), + ("Kopek", "カペイカ"), + ("Ruble", "ルーブル"), + ("Algerian dinar", "アルジェリア・ディナール"), + ("Bahraini dinar", "バーレーン・ディナール"), + ("Iraqi dinar", "イラク・ディナール"), + ("Jordanian dinar", "ヨルダン・ディナール"), + ("Kuwaiti dinar", "クウェート・ディナール"), + ("Libyan dinar", "リビア・ディナール"), + ("Serbian dinar", "セルビア・ディナール"), + ("Tunisian dinar", "チュニジア・ディナール"), + ("Dinar", "ディナール"), + ("Fils", "フィルス"), + ("Para", "パラ"), + ("Millime", "ミリム"), + ("Argentine peso", "アルゼンチン・ペソ"), + ("Chilean peso", "チリ・ペソ"), + ("Colombian peso", "コロンビア・ペソ"), + ("Cuban peso", "兌換ペソ"), + ("Dominican peso", "ドミニカ・ペソ"), + ("Mexican peso", "メキシコ・ペソ"), + ("Philippine peso", "フィリピン・ペソ"), + ("Uruguayan peso", "ウルグアイ・ペソ"), + ("Peso", "ペソ"), + ("Centavo", "センターボ"), + ("Alderney pound", "オルダニーポンド"), + ("British pound", "UKポンド"), + ("Guernsey pound", "ガーンジー・ポンド"), + ("Saint Helena pound", "セントヘレナ・ポンド"), + ("Egyptian pound", "エジプト・ポンド"), + ("Falkland Islands pound", "フォークランド諸島ポンド"), + ("Gibraltar pound", "ジブラルタル・ポンド"), + ("Manx pound", "マン島ポンド"), + ("Jersey pound", "ジャージー・ポンド"), + ("Lebanese pound", "レバノン・ポンド"), + ("South Sudanese pound", "南スーダン・ポンド"), + ("Sudanese pound", "スーダン・ポンド"), + ("Syrian pound", "シリア・ポンド"), + ("Pound", "ポンド"), + ("Pence", "ペンス"), + ("Shilling", "シリング"), + ("United States dollar", "米ドル|USドル|ドル"), + ("East Caribbean dollar", "東カリブ・ドル"), + ("Australian dollar", "オーストラリア・ドル|オーストラリアドル"), + ("Bahamian dollar", "バハマ・ドル"), + ("Barbadian dollar", "バルバドス・ドル"), + ("Belize dollar", "ベリーズ・ドル"), + ("Bermudian dollar", "バミューダ・ドル"), + ("Brunei dollar", "ブルネイ・ドル"), + ("Singapore dollar", "シンガポール・ドル"), + ("Canadian dollar", "カナダ・ドル"), + ("Cayman Islands dollar", "ケイマン諸島・ドル"), + ("New Zealand dollar", "ニュージーランド・ドル"), + ("Cook Islands dollar", "クックアイランド・ドル"), + ("Fijian dollar", "フィジー・ドル|フィジー・ドル"), + ("Guyanese dollar", "ガイアナ・ドル|ガイアナ・ドル"), + ("Hong Kong dollar", "香港ドル"), + ("Macau Pataca", "マカオ・パタカ|マカオ・パタカ"), + ("New Taiwan dollar", "ニュー台湾ドル|ニュー台湾ドル|台湾ドル"), + ("Jamaican dollar", "ジャマイカ・ドル|ジャマイカドル"), + ("Kiribati dollar", "キリバス・ドル"), + ("Liberian dollar", "リベリア・ドル|リベリアドル"), + ("Namibian dollar", "ナミビア・ドル|ナミビアドル"), + ("Surinamese dollar", "スリナム・ドル|スリナムドル"), + ("Trinidad and Tobago dollar", "トリニダード・トバゴ・ドル|トリニダードトバゴ・ドル"), + ("Tuvaluan dollar", "ツバル・ドル|ツバルドル"), + ("Dollar", "どる|$"), + ("Chinese yuan", "人民元|元"), + ("Fen", "分"), + ("Jiao", "角"), + ("Finnish markka", "フィンランド・マルカ"), + ("Penni", "ペニー")]) + CurrencyNameToIsoCodeMap = dict([("Afghan afghani", "AFN"), + ("Euro", "EUR"), + ("Albanian lek", "ALL"), + ("Angolan kwanza", "AOA"), + ("Armenian dram", "AMD"), + ("Aruban florin", "AWG"), + ("Bangladeshi taka", "BDT"), + ("Bhutanese ngultrum", "BTN"), + ("Bolivian boliviano", "BOB"), + ("Bosnia and Herzegovina convertible mark", "BAM"), + ("Botswana pula", "BWP"), + ("Brazilian real", "BRL"), + ("Bulgarian lev", "BGN"), + ("Cambodian riel", "KHR"), + ("Cape Verdean escudo", "CVE"), + ("Costa Rican colón", "CRC"), + ("Croatian kuna", "HRK"), + ("Czech koruna", "CZK"), + ("Eritrean nakfa", "ERN"), + ("Ethiopian birr", "ETB"), + ("Gambian dalasi", "GMD"), + ("Georgian lari", "GEL"), + ("Ghanaian cedi", "GHS"), + ("Guatemalan quetzal", "GTQ"), + ("Haitian gourde", "HTG"), + ("Honduran lempira", "HNL"), + ("Hungarian forint", "HUF"), + ("Iranian rial", "IRR"), + ("Yemeni rial", "YER"), + ("Israeli new shekel", "ILS"), + ("Japanese yen", "JPY"), + ("Kazakhstani tenge", "KZT"), + ("Kenyan shilling", "KES"), + ("North Korean won", "KPW"), + ("South Korean won", "KRW"), + ("Kyrgyzstani som", "KGS"), + ("Lao kip", "LAK"), + ("Lesotho loti", "LSL"), + ("South African rand", "ZAR"), + ("Macanese pataca", "MOP"), + ("Macedonian denar", "MKD"), + ("Malagasy ariary", "MGA"), + ("Malawian kwacha", "MWK"), + ("Malaysian ringgit", "MYR"), + ("Mauritanian ouguiya", "MRO"), + ("Mongolian tögrög", "MNT"), + ("Mozambican metical", "MZN"), + ("Burmese kyat", "MMK"), + ("Nicaraguan córdoba", "NIO"), + ("Nigerian naira", "NGN"), + ("Turkish lira", "TRY"), + ("Omani rial", "OMR"), + ("Panamanian balboa", "PAB"), + ("Papua New Guinean kina", "PGK"), + ("Paraguayan guaraní", "PYG"), + ("Peruvian sol", "PEN"), + ("Polish złoty", "PLN"), + ("Qatari riyal", "QAR"), + ("Saudi riyal", "SAR"), + ("Samoan tālā", "WST"), + ("São Tomé and Príncipe dobra", "STD"), + ("Sierra Leonean leone", "SLL"), + ("Swazi lilangeni", "SZL"), + ("Tajikistani somoni", "TJS"), + ("Thai baht", "THB"), + ("Ukrainian hryvnia", "UAH"), + ("Vanuatu vatu", "VUV"), + ("Venezuelan bolívar", "VEF"), + ("Zambian kwacha", "ZMW"), + ("Moroccan dirham", "MAD"), + ("United Arab Emirates dirham", "AED"), + ("Azerbaijani manat", "AZN"), + ("Turkmenistan manat", "TMT"), + ("Somali shilling", "SOS"), + ("Tanzanian shilling", "TZS"), + ("Ugandan shilling", "UGX"), + ("Romanian leu", "RON"), + ("Moldovan leu", "MDL"), + ("Nepalese rupee", "NPR"), + ("Pakistani rupee", "PKR"), + ("Indian rupee", "INR"), + ("Seychellois rupee", "SCR"), + ("Mauritian rupee", "MUR"), + ("Maldivian rufiyaa", "MVR"), + ("Sri Lankan rupee", "LKR"), + ("Indonesian rupiah", "IDR"), + ("Danish krone", "DKK"), + ("Norwegian krone", "NOK"), + ("Icelandic króna", "ISK"), + ("Swedish krona", "SEK"), + ("West African CFA franc", "XOF"), + ("Central African CFA franc", "XAF"), + ("Comorian franc", "KMF"), + ("Congolese franc", "CDF"), + ("Burundian franc", "BIF"), + ("Djiboutian franc", "DJF"), + ("CFP franc", "XPF"), + ("Guinean franc", "GNF"), + ("Swiss franc", "CHF"), + ("Rwandan franc", "RWF"), + ("Russian ruble", "RUB"), + ("Transnistrian ruble", "PRB"), + ("Belarusian ruble", "BYN"), + ("Algerian dinar", "DZD"), + ("Bahraini dinar", "BHD"), + ("Iraqi dinar", "IQD"), + ("Jordanian dinar", "JOD"), + ("Kuwaiti dinar", "KWD"), + ("Libyan dinar", "LYD"), + ("Serbian dinar", "RSD"), + ("Tunisian dinar", "TND"), + ("Argentine peso", "ARS"), + ("Chilean peso", "CLP"), + ("Colombian peso", "COP"), + ("Cuban convertible peso", "CUC"), + ("Cuban peso", "CUP"), + ("Dominican peso", "DOP"), + ("Mexican peso", "MXN"), + ("Uruguayan peso", "UYU"), + ("British pound", "GBP"), + ("Saint Helena pound", "SHP"), + ("Egyptian pound", "EGP"), + ("Falkland Islands pound", "FKP"), + ("Gibraltar pound", "GIP"), + ("Manx pound", "IMP"), + ("Jersey pound", "JEP"), + ("Lebanese pound", "LBP"), + ("South Sudanese pound", "SSP"), + ("Sudanese pound", "SDG"), + ("Syrian pound", "SYP"), + ("United States dollar", "USD"), + ("Australian dollar", "AUD"), + ("Bahamian dollar", "BSD"), + ("Barbadian dollar", "BBD"), + ("Belize dollar", "BZD"), + ("Bermudian dollar", "BMD"), + ("Brunei dollar", "BND"), + ("Singapore dollar", "SGD"), + ("Canadian dollar", "CAD"), + ("Cayman Islands dollar", "KYD"), + ("New Zealand dollar", "NZD"), + ("Fijian dollar", "FJD"), + ("Guyanese dollar", "GYD"), + ("Hong Kong dollar", "HKD"), + ("Jamaican dollar", "JMD"), + ("Liberian dollar", "LRD"), + ("Namibian dollar", "NAD"), + ("Solomon Islands dollar", "SBD"), + ("Surinamese dollar", "SRD"), + ("New Taiwan dollar", "TWD"), + ("Trinidad and Tobago dollar", "TTD"), + ("Tuvaluan dollar", "TVD"), + ("Chinese yuan", "CNY"), + ("Rial", "__RI"), + ("Shiling", "__S"), + ("Som", "__SO"), + ("Dirham", "__DR"), + ("Dinar", "_DN"), + ("Dollar", "__D"), + ("Manat", "__MA"), + ("Rupee", "__R"), + ("Krone", "__K"), + ("Krona", "__K"), + ("Crown", "__K"), + ("Frank", "__F"), + ("Mark", "__M"), + ("Ruble", "__RB"), + ("Peso", "__PE"), + ("Pound", "__P"), + ("Tristan da Cunha pound", "_TP"), + ("South Georgia and the South Sandwich Islands pound", "_SP"), + ("Somaliland shilling", "_SS"), + ("Pitcairn Islands dollar", "_PND"), + ("Palauan dollar", "_PD"), + ("Niue dollar", "_NID"), + ("Nauruan dollar", "_ND"), + ("Micronesian dollar", "_MD"), + ("Kiribati dollar", "_KID"), + ("Guernsey pound", "_GGP"), + ("Faroese króna", "_FOK"), + ("Cook Islands dollar", "_CKD"), + ("British Virgin Islands dollar", "_BD"), + ("Ascension pound", "_AP"), + ("Alderney pound", "_ALP"), + ("Abkhazian apsar", "_AA")]) + FractionalUnitNameToCodeMap = dict([("Jiao", "JIAO"), + ("Kopek", "KOPEK"), + ("Pul", "PUL"), + ("Cent", "CENT"), + ("Qindarkë", "QINDARKE"), + ("Penny", "PENNY"), + ("Santeem", "SANTEEM"), + ("Cêntimo", "CENTIMO"), + ("Centavo", "CENTAVO"), + ("Luma", "LUMA"), + ("Qəpik", "QƏPIK"), + ("Fils", "FILS"), + ("Poisha", "POISHA"), + ("Kapyeyka", "KAPYEYKA"), + ("Centime", "CENTIME"), + ("Chetrum", "CHETRUM"), + ("Paisa", "PAISA"), + ("Fening", "FENING"), + ("Thebe", "THEBE"), + ("Sen", "SEN"), + ("Stotinka", "STOTINKA"), + ("Fen", "FEN"), + ("Céntimo", "CENTIMO"), + ("Lipa", "LIPA"), + ("Haléř", "HALER"), + ("Øre", "ØRE"), + ("Piastre", "PIASTRE"), + ("Santim", "SANTIM"), + ("Oyra", "OYRA"), + ("Butut", "BUTUT"), + ("Tetri", "TETRI"), + ("Pesewa", "PESEWA"), + ("Fillér", "FILLER"), + ("Eyrir", "EYRIR"), + ("Dinar", "DINAR"), + ("Agora", "AGORA"), + ("Tïın", "TIIN"), + ("Chon", "CHON"), + ("Jeon", "JEON"), + ("Tyiyn", "TYIYN"), + ("Att", "ATT"), + ("Sente", "SENTE"), + ("Dirham", "DIRHAM"), + ("Rappen", "RAPPEN"), + ("Avo", "AVO"), + ("Deni", "DENI"), + ("Iraimbilanja", "IRAIMBILANJA"), + ("Tambala", "TAMBALA"), + ("Laari", "LAARI"), + ("Khoums", "KHOUMS"), + ("Ban", "BAN"), + ("Möngö", "MONGO"), + ("Pya", "PYA"), + ("Kobo", "KOBO"), + ("Kuruş", "KURUS"), + ("Baisa", "BAISA"), + ("Centésimo", "CENTESIMO"), + ("Toea", "TOEA"), + ("Sentimo", "SENTIMO"), + ("Grosz", "GROSZ"), + ("Sene", "SENE"), + ("Halala", "HALALA"), + ("Para", "PARA"), + ("Öre", "ORE"), + ("Diram", "DIRAM"), + ("Satang", "SATANG"), + ("Seniti", "SENITI"), + ("Millime", "MILLIME"), + ("Tennesi", "TENNESI"), + ("Kopiyka", "KOPIYKA"), + ("Tiyin", "TIYIN"), + ("Hào", "HAO"), + ("Ngwee", "NGWEE")]) + CompoundUnitConnectorRegex = f'(?と)' + CurrencyPrefixList = dict([("Dollar", "$"), + ("United States dollar", "us$"), + ("British Virgin Islands dollar", "bvi$"), + ("Brunei dollar", "b$"), + ("Sen", "sen"), + ("Singapore dollar", "s$"), + ("Canadian dollar", "can$|c$|c $"), + ("Cayman Islands dollar", "ci$"), + ("New Zealand dollar", "nz$|nz $"), + ("Guyanese dollar", "gy$|gy $|g$|g $"), + ("Hong Kong dollar", "hk$|hkd|hk $"), + ("Jamaican dollar", "j$"), + ("Namibian dollar", "nad|n$|n $"), + ("Solomon Islands dollar", "si$|si $"), + ("New Taiwan dollar", "nt$|nt $"), + ("Samoan tālā", "ws$"), + ("Chinese yuan", "¥|人民元"), + ("Japanese yen", "¥|\\"), + ("Turkish lira", "₺"), + ("Euro", "€"), + ("Pound", "£"), + ("Costa Rican colón", "₡")]) + CurrencyAmbiguousValues = [r'円', r'銭', r'分', r'レク', r'プル', r'ブル', r'\\', r'元'] + DimensionSuffixList = dict([("Meter", "米|公尺|m|メートル"), + ("Kilometer", "千米|公里|km|キロメートル"), + ("Decimeter", "分米|公寸|dm|デシメートル"), + ("Millimeter", "ミリ"), + ("Centimeter", "釐米|厘米|公分|cm|センチ"), + ("Micrometer", "毫米|公釐|mm"), + ("Microns", "微米"), + ("Picometer", "皮米|ピクトメーター|pm"), + ("Nanometer", "纳米"), + ("Mile", "英里|マイル"), + ("Inch", "英寸|インチ"), + ("Foot", "呎|英尺|フィート"), + ("Yard", "码"), + ("Knot", "海里"), + ("Light year", "光年"), + ("Meter per second", "米每秒|米/秒|m/s|秒速メートル|毎秒メートル"), + ("Kilometer per hour", "公里每小时|千米每小时|公里/小时|千米/小时|km/h|時速キロメートル"), + ("Kilometer per minute", "公里每分钟|千米每分钟|公里/分钟|千米/分钟|km/min|分速キロメートル"), + ("Kilometer per second", "公里每秒|千米每秒|公里/秒|千米/秒|km/s|秒速キロメートル|毎秒キロメートル"), + ("Mile per hour", "英里每小时|英里/小时|時速マイル"), + ("Foot per second", "英尺每小时|英尺/小时"), + ("Foot per minute", "英尺每分钟|英尺/分钟"), + ("Yard per minute", "码每分|码/分"), + ("Yard per second", "码每秒|码/秒"), + ("Square centimetre", "平方厘米"), + ("Square decimeter", "平方分米"), + ("Square meter", "平方米|平方メートル"), + ("Square kilometer", "平方公里|平方キロメートル"), + ("Acre", "英亩|公亩|エーカー"), + ("Hectare", "公顷"), + ("Mu", "亩|市亩|ムー"), + ("Liter", "公升|升|l"), + ("Milliliter", "毫升|ml|ミリリットル"), + ("Cubic meter", "立方米"), + ("Cubic decimeter", "立方分米"), + ("Cubic millimeter", "立方毫米"), + ("Cubic foot", "立方英尺|立方フィート"), + ("Gallon", "加仑|ガロン"), + ("Pint", "品脱"), + ("Dou", "市斗|斗"), + ("Dan", "市石|石"), + ("Kilogram", "千克|公斤|kg|キログラム"), + ("Gram", "克|g"), + ("Milligram", "毫克|mg"), + ("Microgram", "微克|μg"), + ("Ton", "公吨|吨|t|トン"), + ("Metric ton", "メートルトン"), + ("Pound", "磅|ポンド"), + ("Ounce", "盎司|オンス"), + ("Jin", "市斤|斤"), + ("Liang", "两"), + ("Barrel", "桶"), + ("Pot", "罐"), + ("Bit", "比特|位|b|bit|ビット"), + ("Kilobit", "千比特|千位|kb|Kb"), + ("Megabit", "兆比特|兆位|mb|Mb|メガバイト"), + ("Gigabit", "十亿比特|千兆比特|十亿位|千兆位|gb|Gb"), + ("Terabit", "万亿比特|兆兆比特|万亿位|兆兆位|tb|Tb"), + ("Petabit", "千兆兆比特|千万亿比特|千兆兆位|千万亿位|pb|Pb"), + ("Byte", "字节|byte|Byte"), + ("Kilobyte", "千字节|kB|KB"), + ("Megabyte", "兆字节|mB|MB"), + ("Gigabyte", "十亿字节|千兆字节|gB|GB"), + ("Terabyte", "万亿字节|兆兆字节|tB|TB"), + ("Petabyte", "千兆兆字节|千万亿字节|pB|PB")]) + DimensionPrefixList = dict([("split_unit", "時速|分速|秒速|毎秒")]) + DimensionAmbiguousValues = [r'丈', r'位', r'克', r'分', r'升', r'寸', r'尺', r'斗', r'斤', r'桶', r'毫', r'石', r'码', r'磅', r'米', r'罐', r'里', r'm', r'km', r'dm', r'cm', r'mm', r'l', r'ml', r'kg', r'mg', r'g', r't', r'b', r'byte', r'kb', r'mb', r'gb', r'tb', r'pb', r'時速', r'トン'] + AmbiguityFiltersDict = dict([("五角", "五角大楼"), + ("普尔", "标准普尔")]) + TemperatureSuffixList = dict([("F", "華氏|華氏温度|華氏温度の|°f"), + ("K", "开尔文温度|开氏度|凯氏度|K|k"), + ("R", "兰氏温度|°r"), + ("C", "摂氏|摂氏温度|°c|℃"), + ("Degree", "度")]) + TemperaturePrefixList = dict([("F", "華氏|華氏温度|華氏温度の|华氏"), + ("K", "开氏温度|开氏"), + ("R", "兰氏温度|兰氏"), + ("C", "摂氏温度|摂氏")]) + TemperatureAmbiguousValues = [r'度', r'k'] + HalfUnitRegex = f'半' +# pylint: enable=line-too-long diff --git a/Python/libraries/recognizers-number-with-unit/resource-definitions.json b/Python/libraries/recognizers-number-with-unit/resource-definitions.json index 7d54b7a36d..95a7a27388 100644 --- a/Python/libraries/recognizers-number-with-unit/resource-definitions.json +++ b/Python/libraries/recognizers-number-with-unit/resource-definitions.json @@ -129,6 +129,18 @@ "class DutchNumericWithUnit:" ], "footer": [ "# pylint: enable=line-too-long" ] + }, + { + "input": [ "Japanese", "Japanese-NumbersWithUnit" ], + "output": "japanese_numeric_with_unit", + "header": [ + "from .base_numbers import BaseNumbers", + "# pylint: disable=line-too-long", + "", + "", + "class JapaneseNumericWithUnit:" + ], + "footer": [ "# pylint: enable=line-too-long" ] } ] } diff --git a/Python/libraries/recognizers-number-with-unit/setup.py b/Python/libraries/recognizers-number-with-unit/setup.py index 4870dbdba9..fa695e41a2 100644 --- a/Python/libraries/recognizers-number-with-unit/setup.py +++ b/Python/libraries/recognizers-number-with-unit/setup.py @@ -9,9 +9,9 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = "recognizers-text-number-with-unit" -VERSION = "1.0.0.a0" -REQUIRES = ['recognizers-text', 'recognizers-text-number', 'regex'] +NAME = "recognizers-text-number-with-unit-genesys" +VERSION = "1.0.77" +REQUIRES = ['recognizers-text-genesys', 'recognizers-text-number-genesys', 'regex'] setup( name=NAME, diff --git a/Python/libraries/recognizers-number/recognizers_number/culture.py b/Python/libraries/recognizers-number/recognizers_number/culture.py index 2ab7a448f0..db303bda39 100644 --- a/Python/libraries/recognizers-number/recognizers_number/culture.py +++ b/Python/libraries/recognizers-number/recognizers_number/culture.py @@ -7,6 +7,7 @@ SUPPORTED_CULTURES = { Culture.English: LongFormatMode.DOUBLE_COMMA_DOT, Culture.Chinese: None, + Culture.Catalan: LongFormatMode.DOUBLE_DOT_COMMA, Culture.SpanishMexican: LongFormatMode.DOUBLE_COMMA_DOT, Culture.Spanish: LongFormatMode.DOUBLE_DOT_COMMA, Culture.German: LongFormatMode.DOUBLE_DOT_COMMA, diff --git a/Python/libraries/recognizers-number/recognizers_number/number/__init__.py b/Python/libraries/recognizers-number/recognizers_number/number/__init__.py index b5a15da061..9315f4bb97 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/__init__.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/__init__.py @@ -13,6 +13,8 @@ from .japanese import * from .italian import * from .portuguese import * +from .catalan import * +from .arabic import * from .number_recognizer import * from .parser_factory import * from .utilities import * diff --git a/Python/libraries/recognizers-number/recognizers_number/number/arabic/__init__.py b/Python/libraries/recognizers-number/recognizers_number/number/arabic/__init__.py new file mode 100644 index 0000000000..d79a5447e6 --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/number/arabic/__init__.py @@ -0,0 +1,2 @@ +from .extractors import * +from .parsers import * diff --git a/Python/libraries/recognizers-number/recognizers_number/number/arabic/extractors.py b/Python/libraries/recognizers-number/recognizers_number/number/arabic/extractors.py new file mode 100644 index 0000000000..83cdf48c9a --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/number/arabic/extractors.py @@ -0,0 +1,366 @@ +from re import Pattern +from typing import List, Optional + +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.extractors import ReVal, ReRe, BaseNumberExtractor, BasePercentageExtractor +from recognizers_number.number.models import NumberMode, LongFormatMode +from recognizers_number.number.number_options import NumberOptions +from recognizers_number.resources.arabic_numeric import ArabicNumeric +from recognizers_number.number.constants import Constants + + +class ArabicNumberExtractor(BaseNumberExtractor): + + @property + def ambiguity_filters_dict(self) -> List[ReRe]: + return self.__ambiguity_filters_dict + + @property + def ambiguous_fraction_connectors(self) -> Pattern: + return self._ambiguous_fraction_connectors + + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def relative_reference(self) -> Pattern: + return self._relative_reference + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM + + @property + def _negative_number_terms(self) -> Pattern: + return self.__negative_number_terms + + def __init__(self, mode: NumberMode = NumberMode.DEFAULT): + self._ambiguous_fraction_connectors = ( + RegExpUtility.get_safe_reg_exp(ArabicNumeric.AmbiguousFractionConnectorsRegex)) + self._relative_reference = RegExpUtility.get_safe_reg_exp(ArabicNumeric.RelativeOrdinalRegex) + self.__negative_number_terms = RegExpUtility.get_safe_reg_exp(ArabicNumeric.NegativeNumberTermsRegex) + self.__regexes: List[ReVal] = list() + + # Add Cardinal + cardinal_ex: Optional[ArabicCardinalExtractor] = None + if mode is NumberMode.PURE_NUMBER: + cardinal_ex = ArabicCardinalExtractor(ArabicNumeric.PlaceHolderDefault) + elif mode is NumberMode.CURRENCY: + self.__regexes.append( + ReVal(re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.CurrencyRegex), val='IntegerNum')) + + if not cardinal_ex: + cardinal_ex = ArabicCardinalExtractor() + + self.__regexes.extend(cardinal_ex.regexes) + + # Add Fraction + fraction_ex = ArabicFractionExtractor(mode) + self.regexes.extend(fraction_ex.regexes) + + # Do not filter the ambiguous number cases like 'that one' in NumberWithUnit, otherwise they can't be resolved. + ambiguity_filters_dict: List[ReRe] = list() + + if mode is not NumberMode.Unit: + for key, value in ArabicNumeric.AmbiguityFiltersDict.items(): + ambiguity_filters_dict.append( + ReRe(reKey=RegExpUtility.get_safe_reg_exp(key), reVal=RegExpUtility.get_safe_reg_exp(value)) + ) + self.__ambiguity_filters_dict = ambiguity_filters_dict + + +class ArabicCardinalExtractor(BaseNumberExtractor): + + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_CARDINAL + + def __init__(self, placeholder: str = ArabicNumeric.PlaceHolderDefault): + self.__regexes: List[ReVal] = list() + + # Add Integer Regexes + int_extract = ArabicIntegerExtractor(placeholder) + self.__regexes.extend(int_extract.regexes) + + # Add Double Regexes + dou_extract = ArabicDoubleExtractor(placeholder) + self.__regexes.extend(dou_extract.regexes) + + +class ArabicIntegerExtractor(BaseNumberExtractor): + + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_INTEGER + + def __init__(self, placeholder: str = ArabicNumeric.PlaceHolderDefault): + self.__regexes = [ + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.NumbersWithPlaceHolder(placeholder) + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.NumbersWithSuffix, regex.S + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.RoundNumberIntegerRegexWithLocks + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.NumbersWithDozenSuffix + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.AllIntRegexWithLocks + ), + val=f'Integer{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.AllIntRegexWithDozenSuffixLocks + ), + val=f'Integer{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.INTEGER_COMMA, placeholder) + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.INTEGER_DOT, placeholder) + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.INTEGER_BLANK, placeholder) + ), + val='IntegerNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.INTEGER_NO_BREAK_SPACE, placeholder) + ), + val='IntegerNum' + ), + ] + + +class ArabicDoubleExtractor(BaseNumberExtractor): + + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_DOUBLE + + def __init__(self, placeholder: str): + self.__regexes = [ + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleDecimalPointRegex(placeholder) + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleWithoutIntegralRegex(placeholder) + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleWithMultiplierRegex + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleWithRoundNumber + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleAllFloatRegex + ), + val=f'Double{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleExponentialNotationRegex + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleCaretExponentialNotationRegex + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.DOUBLE_COMMA_DOT, placeholder) + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.DOUBLE_NUM_BLANK_DOT, placeholder) + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + self._generate_format_regex(LongFormatMode.DOUBLE_NO_BREAK_SPACE_DOT, placeholder) + ), + val='DoubleNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp( + ArabicNumeric.DoubleWithThousandMarkRegex(placeholder) + ), + val='DoubleNum' + ), + ] + + +class ArabicFractionExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_FRACTION + + def __init__(self, mode): + self.__regexes = [ + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionNotationWithSpacesRegex), + val='FracNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionNotationWithSpacesRegex2), + val='FracNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionNotationRegex), + val='FracNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionNounRegex), + val=f'Frac{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionNounWithArticleRegex), + val=f'Frac{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionWithOrdinalPrefix), + val=f'Frac{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionWithPartOfPrefix), + val=f'Frac{ArabicNumeric.LangMarker}' + ) + ] + + # Not add FractionPrepositionRegex when the mode is Unit to avoid wrong recognize cases like "$1000 over 3" + if mode is not NumberMode.Unit: + if NumberOptions.PERCENTAGE_MODE: + self.__regexes.append( + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionPrepositionWithinPercentModeRegex), + val=f'Frac{ArabicNumeric.LangMarker}' + ) + ) + else: + self.__regexes.append( + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionPrepositionRegex), + val=f'Frac{ArabicNumeric.LangMarker}' + ) + ) + + +class ArabicOrdinalExtractor(BaseNumberExtractor): + + @property + def ambiguous_fraction_connectors(self): + return self._ambiguous_fraction_connectors + + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def relative_reference(self): + return self._relative_reference + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_ORDINAL + + def __init__(self): + self._ambiguous_fraction_connectors = ( + RegExpUtility.get_safe_reg_exp(ArabicNumeric.AmbiguousFractionConnectorsRegex)) + self._relative_reference = RegExpUtility.get_safe_reg_exp(ArabicNumeric.RelativeOrdinalRegex) + + self.__regexes: List[ReVal] = [ + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.OrdinalNumericRegex), + val='OrdinalNum' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.OrdinalEnglishRegex), + val=f'Ordinal{ArabicNumeric.LangMarker}' + ), + ReVal( + re=RegExpUtility.get_safe_reg_exp(ArabicNumeric.OrdinalRoundNumberRegex), + val=f'Ordinal{ArabicNumeric.LangMarker}' + ), + ] + + +class ArabicPercentageExtractor(BasePercentageExtractor): + + def get_definitions(self) -> List[str]: + regex_strs = [ + ArabicNumeric.NumberWithSuffixPercentage, + ArabicNumeric.NumberWithPrefixPercentage + ] + + if NumberOptions.PERCENTAGE_MODE: + regex_strs.append(ArabicNumeric.FractionNumberWithSuffixPercentage) + regex_strs.append(ArabicNumeric.NumberWithPrepositionPercentage) + + return regex_strs + + def __init__(self): + super().__init__(ArabicNumberExtractor(NumberMode.DEFAULT)) diff --git a/Python/libraries/recognizers-number/recognizers_number/number/arabic/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/arabic/parsers.py new file mode 100644 index 0000000000..a715522043 --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/number/arabic/parsers.py @@ -0,0 +1,139 @@ +from re import Pattern +from typing import List, Dict, Optional, Any + + +from recognizers_text.utilities import RegExpUtility +from recognizers_text.culture import Culture +from recognizers_number.culture import CultureInfo +from recognizers_number.number.parsers import BaseNumberParserConfiguration +from recognizers_number.resources.arabic_numeric import ArabicNumeric + + +class ArabicNumberParserConfiguration(BaseNumberParserConfiguration): + @property + def cardinal_number_map(self) -> Dict[str, int]: + return self._cardinal_number_map + + @property + def ordinal_number_map(self) -> Dict[str, int]: + return self._ordinal_number_map + + @property + def round_number_map(self) -> Dict[str, int]: + return self._round_number_map + + @property + def culture_info(self) -> CultureInfo: + return self._culture_info + + @property + def digital_number_regex(self) -> Pattern: + return self._digital_number_regex + + @property + def fraction_marker_token(self) -> str: + return self._fraction_marker_token + + @property + def negative_number_sign_regex(self) -> Pattern: + return self._negative_number_sign_regex + + @property + def half_a_dozen_regex(self) -> Pattern: + return self._half_a_dozen_regex + + @property + def half_a_dozen_text(self) -> str: + return self._half_a_dozen_text + + @property + def lang_marker(self) -> str: + return self._lang_marker + + @property + def non_decimal_separator_char(self) -> str: + return self._non_decimal_separator_char + + @property + def decimal_separator_char(self) -> str: + return self._decimal_separator_char + + @property + def word_separator_token(self) -> str: + return self._word_separator_token + + @property + def written_decimal_separator_texts(self) -> List[str]: + return self._written_decimal_separator_texts + + @property + def written_group_separator_texts(self) -> List[str]: + return self._written_group_separator_texts + + @property + def written_integer_separator_texts(self) -> List[str]: + return self._written_integer_separator_texts + + @property + def written_fraction_separator_texts(self) -> List[str]: + return self._written_fraction_separator_texts + + @property + def non_standard_separator_variants(self) -> List[str]: + return self._non_standard_separator_variants + + @property + def is_multi_decimal_separator_culture(self) -> bool: + return self._is_multi_decimal_separator_culture + + @property + def round_multiplier_regex(self) -> Pattern: + return self._round_multiplier_regex + + def __init__(self, culture_info: Optional[CultureInfo]=None): + if culture_info is None: + culture_info = CultureInfo(Culture.Arabic) + + self._culture_info = culture_info + self._lang_marker = ArabicNumeric.LangMarker + self._is_compound_number_language = ArabicNumeric.CompoundNumberLanguage + self._is_multi_decimal_separator_culture = ArabicNumeric.MultiDecimalSeparatorCulture + + self._decimal_separator_char = ArabicNumeric.DecimalSeparatorChar + self._fraction_marker_token = ArabicNumeric.FractionMarkerToken + self._non_decimal_separator_char = ArabicNumeric.NonDecimalSeparatorChar + self._half_a_dozen_text = ArabicNumeric.HalfADozenText + self._word_separator_token = ArabicNumeric.WordSeparatorToken + self._non_standard_separator_variants = [] + + self._written_decimal_separator_texts = ArabicNumeric.WrittenDecimalSeparatorTexts + self._written_group_separator_texts = ArabicNumeric.WrittenGroupSeparatorTexts + self._written_integer_separator_texts = ArabicNumeric.WrittenIntegerSeparatorTexts + self._written_fraction_separator_texts = ArabicNumeric.WrittenFractionSeparatorTexts + + self._cardinal_number_map = ArabicNumeric.CardinalNumberMap + self._ordinal_number_map = ArabicNumeric.OrdinalNumberMap + self._relative_reference_offset_map = ArabicNumeric.RelativeReferenceOffsetMap + self._relative_reference_relative_to_map = ArabicNumeric.RelativeReferenceRelativeToMap + self._round_number_map = ArabicNumeric.RoundNumberMap + + self._half_a_dozen_regex = RegExpUtility.get_safe_reg_exp(ArabicNumeric.HalfADozenRegex) + self._digital_number_regex = RegExpUtility.get_safe_reg_exp(ArabicNumeric.DigitalNumberRegex) + self._negative_number_sign_regex = RegExpUtility.get_safe_reg_exp(ArabicNumeric.NegativeNumberSignRegex) + self._fraction_preposition_regex = RegExpUtility.get_safe_reg_exp(ArabicNumeric.FractionPrepositionRegex) + + self.non_decimal_separator_text = '' + + @staticmethod + def get_lang_specific_int_value(match_strs: List[str]) -> (bool, int): + result = (False, 0) + + # @TODO "و" should be moved to Arabic YAML file. + + # Workaround to solve "و" which means "and" before rounded number in Arabic. + # ألف و مائة = one thousand and one hundred # + # But in Arabic there is no integer before hundred, because it's 100 by default. + if len(match_strs) == 1 and match_strs[0] == "و": + result = (True, 1) + + return result diff --git a/Python/libraries/recognizers-number/recognizers_number/number/catalan/__init__.py b/Python/libraries/recognizers-number/recognizers_number/number/catalan/__init__.py new file mode 100644 index 0000000000..c27932f374 --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/number/catalan/__init__.py @@ -0,0 +1,2 @@ +from .extractors import * +from .parsers import * \ No newline at end of file diff --git a/Python/libraries/recognizers-number/recognizers_number/number/catalan/extractors.py b/Python/libraries/recognizers-number/recognizers_number/number/catalan/extractors.py new file mode 100644 index 0000000000..6de5c4d24b --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/number/catalan/extractors.py @@ -0,0 +1,196 @@ +from typing import Pattern, List, NamedTuple + +from recognizers_text.utilities import RegExpUtility +from recognizers_number.number.models import NumberMode, LongFormatMode +from recognizers_number.resources.catalan_numeric import CatalanNumeric +from recognizers_number.number.extractors import ReVal, ReRe, BaseNumberExtractor, BasePercentageExtractor +from recognizers_number.number.constants import Constants + + +class CatalanNumberExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def ambiguity_filters_dict(self) -> List[ReRe]: + return self.__ambiguity_filters_dict + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM + + def __init__(self, mode: NumberMode = NumberMode.DEFAULT): + self.__regexes: List[ReVal] = list() + cardinal_ex: CatalanCardinalExtractor = None + + if mode is NumberMode.PURE_NUMBER: + cardinal_ex = CatalanCardinalExtractor( + CatalanNumeric.PlaceHolderPureNumber) + elif mode is NumberMode.CURRENCY: + self.__regexes.append( + ReVal(re=CatalanNumeric.CurrencyRegex, val='IntegerNum')) + + if cardinal_ex is None: + cardinal_ex = CatalanCardinalExtractor() + + self.__regexes.extend(cardinal_ex.regexes) + + fraction_ex = CatalanFractionExtractor(mode) + self.__regexes.extend(fraction_ex.regexes) + + ambiguity_filters_dict: List[ReRe] = list() + + if mode != NumberMode.Unit: + for key, value in CatalanNumeric.AmbiguityFiltersDict.items(): + ambiguity_filters_dict.append(ReRe(reKey=RegExpUtility.get_safe_reg_exp(key), + reVal=RegExpUtility.get_safe_reg_exp(value))) + self.__ambiguity_filters_dict = ambiguity_filters_dict + + +class CatalanCardinalExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ReVal]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_CARDINAL + + def __init__(self, placeholder: str = CatalanNumeric.PlaceHolderDefault): + self.__regexes: List[ReVal] = list() + + # Add integer regexes + integer_ex = CatalanIntegerExtractor(placeholder) + self.__regexes.extend(integer_ex.regexes) + + # Add double regexes + double_ex = CatalanDoubleExtractor(placeholder) + self.__regexes.extend(double_ex.regexes) + + +class CatalanIntegerExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ + NamedTuple('re_val', [('re', Pattern), ('val', str)])]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_INTEGER + + def __init__(self, placeholder: str = CatalanNumeric.PlaceHolderDefault): + self.__regexes = [ + ReVal( + re=CatalanNumeric.NumbersWithPlaceHolder(placeholder), + val='IntegerNum'), + ReVal( + re=CatalanNumeric.NumbersWithSuffix, + val='IntegerNum'), + ReVal( + re=self._generate_format_regex(LongFormatMode.INTEGER_DOT, + placeholder), + val='IntegerNum'), + ReVal( + re=self._generate_format_regex(LongFormatMode.INTEGER_BLANK, + placeholder), + val='IntegerNum'), + ReVal( + re=self._generate_format_regex( + LongFormatMode.INTEGER_NO_BREAK_SPACE, placeholder), + val='IntegerNum'), + ReVal( + re=CatalanNumeric.RoundNumberIntegerRegexWithLocks, + val='IntegerNum'), + ReVal( + re=CatalanNumeric.NumbersWithDozenSuffix, + val='IntegerNum'), + ReVal( + re=CatalanNumeric.AllIntRegexWithLocks, + val='IntegerCat'), + ] + + +class CatalanDoubleExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ + NamedTuple('re_val', [('re', Pattern), ('val', str)])]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_DOUBLE + + def __init__(self, placeholder: str = CatalanNumeric.PlaceHolderDefault): + self.__regexes = [ + ReVal( + re=CatalanNumeric.DoubleDecimalPointRegex(placeholder), + val='DoubleNum'), + ReVal( + re=CatalanNumeric.DoubleWithoutIntegralRegex(placeholder), + val='DoubleNum'), + ReVal( + re=CatalanNumeric.DoubleWithMultiplierRegex, + val='DoubleNum'), + ReVal( + re=CatalanNumeric.DoubleWithRoundNumber, + val='DoubleNum'), + ReVal( + re=CatalanNumeric.DoubleAllFloatRegex, + val='DoubleCat'), + ReVal( + re=CatalanNumeric.DoubleExponentialNotationRegex, + val='DoublePow'), + ReVal( + re=CatalanNumeric.DoubleCaretExponentialNotationRegex, + val='DoublePow'), + ReVal( + re=self._generate_format_regex(LongFormatMode.DOUBLE_DOT_COMMA, + placeholder), + val='DoubleNum'), + ReVal( + re=self._generate_format_regex( + LongFormatMode.DOUBLE_NO_BREAK_SPACE_COMMA, + placeholder), + val='DoubleNum') + ] + + +class CatalanFractionExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ + NamedTuple('re_val', [('re', Pattern), ('val', str)])]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_FRACTION + + def __init__(self, mode): + self.__regexes = [] + + +class CatalanOrdinalExtractor(BaseNumberExtractor): + @property + def regexes(self) -> List[ + NamedTuple('re_val', [('re', Pattern), ('val', str)])]: + return self.__regexes + + @property + def _extract_type(self) -> str: + return Constants.SYS_NUM_ORDINAL + + def __init__(self): + self.__regexes = [ + ReVal( + re=CatalanNumeric.OrdinalSuffixRegex, + val='OrdinalNum') + ] + + +class CatalanPercentageExtractor(BasePercentageExtractor): + def __init__(self): + super().__init__(CatalanNumberExtractor()) + + def get_definitions(self) -> List[str]: + return [] \ No newline at end of file diff --git a/Python/libraries/recognizers-number/recognizers_number/number/catalan/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/catalan/parsers.py new file mode 100644 index 0000000000..f9076b8a0a --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/number/catalan/parsers.py @@ -0,0 +1,123 @@ +from typing import Dict, Pattern, List +import regex + +from recognizers_text.utilities import RegExpUtility +from recognizers_text.culture import Culture +from recognizers_text.parser import ParseResult +from recognizers_number.culture import CultureInfo +from recognizers_number.number.parsers import BaseNumberParserConfiguration +from recognizers_number.resources.catalan_numeric import CatalanNumeric + + +class CatalanNumberParserConfiguration(BaseNumberParserConfiguration): + @property + def cardinal_number_map(self) -> Dict[str, int]: + return self._cardinal_number_map + + @property + def ordinal_number_map(self) -> Dict[str, int]: + return self._ordinal_number_map + + @property + def round_number_map(self) -> Dict[str, int]: + return self._round_number_map + + @property + def culture_info(self): + return self._culture_info + + @property + def digital_number_regex(self) -> Pattern: + return self._digital_number_regex + + @property + def fraction_marker_token(self) -> str: + return self._fraction_marker_token + + @property + def negative_number_sign_regex(self) -> Pattern: + return self._negative_number_sign_regex + + @property + def half_a_dozen_regex(self) -> Pattern: + return self._half_a_dozen_regex + + @property + def half_a_dozen_text(self) -> str: + return self._half_a_dozen_text + + @property + def lang_marker(self) -> str: + return self._lang_marker + + @property + def non_decimal_separator_char(self) -> str: + return self._non_decimal_separator_char + + @property + def decimal_separator_char(self) -> str: + return self._decimal_separator_char + + @property + def word_separator_token(self) -> str: + return self._word_separator_token + + @property + def written_decimal_separator_texts(self) -> List[str]: + return self._written_decimal_separator_texts + + @property + def written_group_separator_texts(self) -> List[str]: + return self._written_group_separator_texts + + @property + def written_integer_separator_texts(self) -> List[str]: + return self._written_integer_separator_texts + + @property + def written_fraction_separator_texts(self) -> List[str]: + return self._written_fraction_separator_texts + + @property + def non_standard_separator_variants(self) -> List[str]: + return self._non_standard_separator_variants + + @property + def is_multi_decimal_separator_culture(self) -> bool: + return self._is_multi_decimal_separator_culture + + @property + def round_multiplier_regex(self) -> Pattern: + return self._round_multiplier_regex + + def __init__(self, culture_info=None): + if culture_info is None: + culture_info = CultureInfo(Culture.Catalan) + + self._culture_info = culture_info + self._lang_marker = CatalanNumeric.LangMarker + self._decimal_separator_char = CatalanNumeric.DecimalSeparatorChar + self._fraction_marker_token = None + self._non_decimal_separator_char = CatalanNumeric.NonDecimalSeparatorChar + self._half_a_dozen_text = CatalanNumeric.HalfADozenText + self._word_separator_token = CatalanNumeric.WordSeparatorToken + + self._written_decimal_separator_texts = CatalanNumeric.WrittenDecimalSeparatorTexts + self._written_group_separator_texts = CatalanNumeric.WrittenGroupSeparatorTexts + self._written_integer_separator_texts = CatalanNumeric.WrittenIntegerSeparatorTexts + self._written_fraction_separator_texts = None + self._non_standard_separator_variants = CatalanNumeric.NonStandardSeparatorVariants + self._is_multi_decimal_separator_culture = CatalanNumeric.MultiDecimalSeparatorCulture + + ordinal_number_map: Dict[str, int] = dict( + CatalanNumeric.OrdinalNumberMap) + self._cardinal_number_map = CatalanNumeric.CardinalNumberMap + self._ordinal_number_map = ordinal_number_map + self._round_number_map = CatalanNumeric.RoundNumberMap + self._negative_number_sign_regex = RegExpUtility.get_safe_reg_exp( + CatalanNumeric.NegativeNumberSignRegex) + self._half_a_dozen_regex = RegExpUtility.get_safe_reg_exp( + CatalanNumeric.HalfADozenRegex) + self._digital_number_regex = RegExpUtility.get_safe_reg_exp( + CatalanNumeric.DigitalNumberRegex) + self._round_multiplier_regex = None diff --git a/Python/libraries/recognizers-number/recognizers_number/number/chinese/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/chinese/parsers.py index 297c51ddf9..475f41aa01 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/chinese/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/chinese/parsers.py @@ -9,15 +9,14 @@ from recognizers_text.utilities import RegExpUtility from recognizers_text.culture import Culture -from recognizers_text.extractor import ExtractResult from recognizers_text.parser import ParseResult from recognizers_number.resources.chinese_numeric import ChineseNumeric from recognizers_number.number.cjk_parsers import CJKNumberParser -from recognizers_number.number.parsers import BaseNumberParser, NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParser, BaseNumberParserConfiguration from recognizers_number.culture import CultureInfo -class ChineseNumberParserConfiguration(NumberParserConfiguration): +class ChineseNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return dict() diff --git a/Python/libraries/recognizers-number/recognizers_number/number/cjk_parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/cjk_parsers.py index 4241cd4a53..822c14b490 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/cjk_parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/cjk_parsers.py @@ -8,17 +8,15 @@ import copy import regex -from recognizers_text.utilities import RegExpUtility from recognizers_text.culture import Culture from recognizers_text.extractor import ExtractResult from recognizers_text.parser import ParseResult -from recognizers_number.number.parsers import BaseNumberParser, NumberParserConfiguration -from recognizers_number.culture import CultureInfo +from recognizers_number.number.parsers import BaseNumberParser, BaseNumberParserConfiguration getcontext().prec = 15 -class CJKNumberParserConfiguration(NumberParserConfiguration): +class CJKNumberParserConfiguration(BaseNumberParserConfiguration): @property @abstractmethod def zero_to_nine_map(self) -> Dict[str, int]: @@ -348,12 +346,12 @@ def int_parse(self, source: ExtractResult) -> ParseResult: def ord_parse(self, source: ExtractResult) -> ParseResult: result = ParseResult(source) - source_text = source.text[1:] + # source_text = source.text[1:] - if regex.search(self.config.digit_num_regex, source_text) is not None: - result.value = self.get_digit_value(source_text, 1) + if regex.search(self.config.digit_num_regex, source.text) is not None: + result.value = self.get_digit_value(source.text, 1) else: - result.value = self.get_int_value(source_text) + result.value = self.get_int_value(source.text) result.resolution_str = self.__format(result.value) return result diff --git a/Python/libraries/recognizers-number/recognizers_number/number/dutch/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/dutch/parsers.py index 4e18b30844..765b8aee63 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/dutch/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/dutch/parsers.py @@ -7,11 +7,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.dutch_numeric import DutchNumeric -class DutchNumberParserConfiguration(NumberParserConfiguration): +class DutchNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map @@ -129,28 +129,7 @@ def __init__(self, culture_info=None): # Same behavior as the base but also handles numbers such as tweeënhalf and tweeëneenhalf def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[str]: - frac_words: List[str] = list() - tokens_len = len(tokens) - i = 0 - while i < tokens_len: - if '-' in tokens[i]: - splited_tokens = tokens[i].split('-') - if len(splited_tokens) == 2 and splited_tokens[1] in self.ordinal_number_map: - frac_words.append(splited_tokens[0]) - frac_words.append(splited_tokens[1]) - else: - frac_words.append(tokens[i]) - elif i < tokens_len - 2 and tokens[i + 1] == '-': - if tokens[i + 2] in self.ordinal_number_map: - frac_words.append(tokens[i]) - frac_words.append(tokens[i + 2]) - else: - frac_words.append( - tokens[i] + tokens[i + 1] + tokens[i + 2]) - i += 2 - else: - frac_words.append(tokens[i]) - i += 1 + frac_words: List[str] = super().normalize_token_set(tokens, context) # The following piece of code is needed to compute the fraction pattern number+'ënhalf' # e.g. 'tweeënhalf' ('two and a half'). Similarly for "ëneenhalf", e.g. tweeëneenhalf. @@ -166,8 +145,7 @@ def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[s frac_words.append(DutchNumeric.OneHalfTokens[0]) frac_words.append(DutchNumeric.OneHalfTokens[1]) length = 4 - elif self._fraction_units_regex.search(word): - m = self._fraction_units_regex.search(word) + elif m := self._fraction_units_regex.search(word): if m.group("onehalf"): frac_words[idx] = DutchNumeric.OneHalfTokens[0] frac_words.append(self._written_fraction_separator_texts[0]) @@ -188,20 +166,3 @@ def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[s frac_words.insert(fracLen - length, DutchNumeric.WordSeparatorToken) return frac_words - - def resolve_composite_number(self, number_str: str) -> int: - if '-' in number_str: - numbers = number_str.split('-') - ret = 0 - for num in numbers: - if num in self.ordinal_number_map: - ret += self.ordinal_number_map[num] - elif num in self.cardinal_number_map: - ret += self.cardinal_number_map[num] - return ret - elif number_str in self.ordinal_number_map: - return self.ordinal_number_map[number_str] - elif number_str in self.cardinal_number_map: - return self.cardinal_number_map[number_str] - - return 0 diff --git a/Python/libraries/recognizers-number/recognizers_number/number/english/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/english/parsers.py index cdf4e798f0..8c1d43160a 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/english/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/english/parsers.py @@ -7,11 +7,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.english_numeric import EnglishNumeric -class EnglishNumberParserConfiguration(NumberParserConfiguration): +class EnglishNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map @@ -122,46 +122,3 @@ def __init__(self, culture_info=None): EnglishNumeric.DigitalNumberRegex) self._round_multiplier_regex = RegExpUtility.get_safe_reg_exp( EnglishNumeric.RoundMultiplierRegex) - - def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[str]: - frac_words: List[str] = list() - tokens_len = len(tokens) - i = 0 - while i < tokens_len: - if '-' in tokens[i]: - splited_tokens = tokens[i].split('-') - if len(splited_tokens) == 2 and splited_tokens[1] in self.ordinal_number_map: - frac_words.append(splited_tokens[0]) - frac_words.append(splited_tokens[1]) - else: - frac_words.append(tokens[i]) - elif i < tokens_len - 2 and tokens[i + 1] == '-': - if tokens[i + 2] in self.ordinal_number_map: - frac_words.append(tokens[i]) - frac_words.append(tokens[i + 2]) - else: - frac_words.append( - tokens[i] + tokens[i + 1] + tokens[i + 2]) - i += 2 - else: - frac_words.append(tokens[i]) - i += 1 - - return frac_words - - def resolve_composite_number(self, number_str: str) -> int: - if '-' in number_str: - numbers = number_str.split('-') - ret = 0 - for num in numbers: - if num in self.ordinal_number_map: - ret += self.ordinal_number_map[num] - elif num in self.cardinal_number_map: - ret += self.cardinal_number_map[num] - return ret - elif number_str in self.ordinal_number_map: - return self.ordinal_number_map[number_str] - elif number_str in self.cardinal_number_map: - return self.cardinal_number_map[number_str] - - return 0 diff --git a/Python/libraries/recognizers-number/recognizers_number/number/extractors.py b/Python/libraries/recognizers-number/recognizers_number/number/extractors.py index 4f7c7b2d5b..caea762ec3 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/extractors.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/extractors.py @@ -38,7 +38,7 @@ def _negative_number_terms(self) -> Pattern: pass def extract(self, source: str) -> List[ExtractResult]: - if source is None or len(source.strip()) is 0: + if source is None or len(source.strip()) == 0: return list() result: List[ExtractResult] = list() match_source = dict() diff --git a/Python/libraries/recognizers-number/recognizers_number/number/french/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/french/parsers.py index f39dfe6d76..ac0c52e042 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/french/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/french/parsers.py @@ -8,11 +8,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.french_numeric import FrenchNumeric -class FrenchNumberParserConfiguration(NumberParserConfiguration): +class FrenchNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map @@ -125,28 +125,7 @@ def __init__(self, culture_info=None): FrenchNumeric.RoundMultiplierRegex) def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[str]: - frac_words: List[str] = list() - tokens_len = len(tokens) - i = 0 - while i < tokens_len: - if '-' in tokens[i]: - splited_tokens = tokens[i].split('-') - if len(splited_tokens) == 2 and splited_tokens[1] in self.ordinal_number_map: - frac_words.append(splited_tokens[0]) - frac_words.append(splited_tokens[1]) - else: - frac_words.append(tokens[i]) - elif i < tokens_len - 2 and tokens[i + 1] == '-': - if tokens[i + 2] in self.ordinal_number_map: - frac_words.append(tokens[i]) - frac_words.append(tokens[i + 2]) - else: - frac_words.append( - tokens[i] + tokens[i + 1] + tokens[i + 2]) - i += 2 - else: - frac_words.append(tokens[i]) - i += 1 + frac_words: List[str] = super().normalize_token_set(tokens, context) # The following piece of code is needed to compute the fraction pattern number+'et demi' # e.g. 'deux et demi' ('two and a half') where the numerator is omitted in French. diff --git a/Python/libraries/recognizers-number/recognizers_number/number/german/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/german/parsers.py index 3a1d243d00..72ad46cc10 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/german/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/german/parsers.py @@ -7,11 +7,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.german_numeric import GermanNumeric -class GermanNumberParserConfiguration(NumberParserConfiguration): +class GermanNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map @@ -128,28 +128,7 @@ def __init__(self, culture_info=None): GermanNumeric.FractionHalfRegex) def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[str]: - frac_words: List[str] = list() - tokens_len = len(tokens) - i = 0 - while i < tokens_len: - if '-' in tokens[i]: - splited_tokens = tokens[i].split('-') - if len(splited_tokens) == 2 and splited_tokens[1] in self.ordinal_number_map: - frac_words.append(splited_tokens[0]) - frac_words.append(splited_tokens[1]) - else: - frac_words.append(tokens[i]) - elif i < tokens_len - 2 and tokens[i + 1] == '-': - if tokens[i + 2] in self.ordinal_number_map: - frac_words.append(tokens[i]) - frac_words.append(tokens[i + 2]) - else: - frac_words.append( - tokens[i] + tokens[i + 1] + tokens[i + 2]) - i += 2 - else: - frac_words.append(tokens[i]) - i += 1 + frac_words: List[str] = super().normalize_token_set(tokens, context) # The following piece of code is needed to compute the fraction pattern number+'einhalb' # e.g. 'zweieinhalb' ('two and a half'). @@ -163,8 +142,7 @@ def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[s frac_words.append(self._written_fraction_separator_texts[0]) frac_words.append(GermanNumeric.OneHalfTokens[0]) frac_words.append(GermanNumeric.OneHalfTokens[1]) - elif self._fraction_units_regex.search(word): - m = self._fraction_units_regex.search(word) + elif m := self._fraction_units_regex.search(word): if m.group("onehalf"): # 'einundhalb' case frac_words[idx] = GermanNumeric.OneHalfTokens[0] frac_words.append(self._written_fraction_separator_texts[0]) @@ -176,20 +154,3 @@ def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[s frac_words.append(word[len(frac_words[idx]):len("viertel")+len(frac_words[idx])]) return frac_words - - def resolve_composite_number(self, number_str: str) -> int: - if '-' in number_str: - numbers = number_str.split('-') - ret = 0 - for num in numbers: - if num in self.ordinal_number_map: - ret += self.ordinal_number_map[num] - elif num in self.cardinal_number_map: - ret += self.cardinal_number_map[num] - return ret - elif number_str in self.ordinal_number_map: - return self.ordinal_number_map[number_str] - elif number_str in self.cardinal_number_map: - return self.cardinal_number_map[number_str] - - return 0 diff --git a/Python/libraries/recognizers-number/recognizers_number/number/italian/__init__.py b/Python/libraries/recognizers-number/recognizers_number/number/italian/__init__.py index d79a5447e6..db3951ab89 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/italian/__init__.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/italian/__init__.py @@ -1,2 +1,3 @@ from .extractors import * from .parsers import * + diff --git a/Python/libraries/recognizers-number/recognizers_number/number/italian/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/italian/parsers.py index ad18d68770..8a48541027 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/italian/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/italian/parsers.py @@ -7,11 +7,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.italian_numeric import ItalianNumeric -class ItalianNumberParserConfiguration(NumberParserConfiguration): +class ItalianNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map @@ -124,28 +124,7 @@ def __init__(self, culture_info=None): ItalianNumeric.RoundMultiplierRegex) def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[str]: - frac_words: List[str] = list() - tokens_len = len(tokens) - i = 0 - while i < tokens_len: - if '-' in tokens[i]: - splited_tokens = tokens[i].split('-') - if len(splited_tokens) == 2 and splited_tokens[1] in self.ordinal_number_map: - frac_words.append(splited_tokens[0]) - frac_words.append(splited_tokens[1]) - else: - frac_words.append(tokens[i]) - elif i < tokens_len - 2 and tokens[i + 1] == '-': - if tokens[i + 2] in self.ordinal_number_map: - frac_words.append(tokens[i]) - frac_words.append(tokens[i + 2]) - else: - frac_words.append( - tokens[i] + tokens[i + 1] + tokens[i + 2]) - i += 2 - else: - frac_words.append(tokens[i]) - i += 1 + frac_words: List[str] = super().normalize_token_set(tokens, context) # The following piece of code is needed to compute the fraction pattern number+'e mezzo' # e.g. 'due e mezzo' ('two and a half') where the numerator is omitted in Italian. @@ -158,20 +137,3 @@ def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[s frac_words.insert(len(frac_words) - 1, ItalianNumeric.OneHalfTokens[0]) return frac_words - - def resolve_composite_number(self, number_str: str) -> int: - if '-' in number_str: - numbers = number_str.split('-') - ret = 0 - for num in numbers: - if num in self.ordinal_number_map: - ret += self.ordinal_number_map[num] - elif num in self.cardinal_number_map: - ret += self.cardinal_number_map[num] - return ret - elif number_str in self.ordinal_number_map: - return self.ordinal_number_map[number_str] - elif number_str in self.cardinal_number_map: - return self.cardinal_number_map[number_str] - - return 0 diff --git a/Python/libraries/recognizers-number/recognizers_number/number/japanese/extractors.py b/Python/libraries/recognizers-number/recognizers_number/number/japanese/extractors.py index a118498b26..6fd70b44d2 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/japanese/extractors.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/japanese/extractors.py @@ -202,7 +202,7 @@ def __init__(self): # だい一百五十四 ReVal( re=RegExpUtility.get_safe_reg_exp( - JapaneseNumeric.OrdinalRegex), + JapaneseNumeric.AllOrdinalRegex), val='OrdinalJpn'), # だい2565 ReVal( diff --git a/Python/libraries/recognizers-number/recognizers_number/number/models.py b/Python/libraries/recognizers-number/recognizers_number/number/models.py index ef38904046..cd238a40cc 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/models.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/models.py @@ -36,7 +36,10 @@ class LongFormatMode: DOUBLE_DOT_COMMA = LongFormatType(thousands_mark='.', decimals_mark=',') DOUBLE_NO_BREAK_SPACE_COMMA = LongFormatType( thousands_mark=Constants.NO_BREAK_SPACE, decimals_mark=',') + DOUBLE_NO_BREAK_SPACE_DOT = LongFormatType( + thousands_mark=Constants.NO_BREAK_SPACE, decimals_mark='.') DOUBLE_NUM_BLANK_COMMA = LongFormatType(thousands_mark=' ', decimals_mark=',') + DOUBLE_NUM_BLANK_DOT = LongFormatType(thousands_mark=' ', decimals_mark='.') class AbstractNumberModel(Model): diff --git a/Python/libraries/recognizers-number/recognizers_number/number/number_recognizer.py b/Python/libraries/recognizers-number/recognizers_number/number/number_recognizer.py index 403c27f6a4..204a5ac92a 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/number_recognizer.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/number_recognizer.py @@ -4,6 +4,9 @@ from enum import IntFlag from typing import List +from recognizers_number.number.arabic.extractors import ArabicOrdinalExtractor, ArabicPercentageExtractor, \ + ArabicNumberExtractor +from recognizers_number.number.arabic.parsers import ArabicNumberParserConfiguration from recognizers_text import Culture, Recognizer, Model from recognizers_number.culture import CultureInfo from recognizers_number.number.models import NumberMode, NumberModel, OrdinalModel, PercentModel, ModelResult @@ -27,6 +30,8 @@ from recognizers_number.number.german.parsers import GermanNumberParserConfiguration from recognizers_number.number.italian.extractors import ItalianMergedNumberExtractor, ItalianOrdinalExtractor, ItalianPercentageExtractor from recognizers_number.number.italian.parsers import ItalianNumberParserConfiguration +from recognizers_number.number.catalan.extractors import CatalanNumberExtractor, CatalanOrdinalExtractor +from recognizers_number.number.catalan.parsers import CatalanNumberParserConfiguration class NumberOptions(IntFlag): @@ -220,6 +225,38 @@ def initialize_configuration(self): )) # endregion + # region Catalan + self.register_model('NumberModel', Culture.Catalan, lambda options: NumberModel( + AgnosticNumberParserFactory.get_parser( + ParserType.NUMBER, CatalanNumberParserConfiguration()), + CatalanNumberExtractor(NumberMode.PURE_NUMBER) + )) + self.register_model('OrdinalModel', Culture.Catalan, lambda options: OrdinalModel( + AgnosticNumberParserFactory.get_parser( + ParserType.ORDINAL, CatalanNumberParserConfiguration()), + CatalanOrdinalExtractor() + )) + # endregion + + # region Arabic + self.register_model('NumberModel', Culture.Arabic, lambda options: NumberModel( + AgnosticNumberParserFactory.get_parser( + ParserType.NUMBER, ArabicNumberParserConfiguration()), + ArabicNumberExtractor(NumberMode.PURE_NUMBER) + )) + self.register_model('OrdinalModel', Culture.Arabic, lambda options: OrdinalModel( + AgnosticNumberParserFactory.get_parser( + ParserType.ORDINAL, ArabicNumberParserConfiguration()), + ArabicOrdinalExtractor() + )) + self.register_model('PercentModel', Culture.Arabic, lambda options: PercentModel( + AgnosticNumberParserFactory.get_parser( + ParserType.PERCENTAGE, ArabicNumberParserConfiguration()), + ArabicPercentageExtractor() + )) + # endregion + + def get_number_model(self, culture: str = None, fallback_to_default_culture: bool = True) -> Model: return self.get_model('NumberModel', culture, fallback_to_default_culture) @@ -246,4 +283,4 @@ def recognize_percentage(query: str, culture: str, options: NumberOptions = Numb recognizer = NumberRecognizer(culture, options) model = recognizer.get_percentage_model( culture, fallback_to_default_culture) - return model.parse(query) + return model.parse(query) \ No newline at end of file diff --git a/Python/libraries/recognizers-number/recognizers_number/number/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/parsers.py index ea2573e297..0813ea21ec 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/parsers.py @@ -126,6 +126,62 @@ def is_multi_decimal_separator_culture(self) -> bool: def round_multiplier_regex(self) -> Pattern: pass + @abstractmethod + def get_lang_specific_int_value(self, match_strs: List[str]): + pass + + +class BaseNumberParserConfiguration(NumberParserConfiguration, ABC): + + def normalize_token_set(self, tokens: List[str], context: ParseResult) -> List[str]: + frac_words: List[str]= [] + tokens_len = len(tokens) + i = 0 + while i < tokens_len: + if '-' in tokens[i]: + split_tokens = tokens[i].split('-') + if len(split_tokens) == 2 and split_tokens[1] in self.ordinal_number_map: + frac_words.append(split_tokens[0]) + frac_words.append(split_tokens[1]) + else: + frac_words.append(tokens[i]) + elif i < tokens_len - 2 and tokens[i + 1] == '-': + if tokens[i + 2] in self.ordinal_number_map: + frac_words.append(tokens[i]) + frac_words.append(tokens[i + 2]) + else: + frac_words.append( + tokens[i] + tokens[i + 1] + tokens[i + 2]) + i += 2 + else: + frac_words.append(tokens[i]) + i += 1 + + return frac_words + + def resolve_composite_number(self, number_str: str) -> int: + if "-" in number_str: + numbers = number_str.split('-') + ret = 0 + for number in numbers: + if number in self.ordinal_number_map: + ret += self.ordinal_number_map[number] + elif number in self.cardinal_number_map: + ret += self.cardinal_number_map[number] + + return ret + + if number_str in self.ordinal_number_map: + return self.ordinal_number_map[number_str] + + if number_str in self.cardinal_number_map: + return self.cardinal_number_map[number_str] + + return 0 + + def get_lang_specific_int_value(self, match_strs: List[str]) -> (bool, int): + return False, 0 + class BaseNumberParser(Parser): def __init__(self, config: NumberParserConfiguration): @@ -350,7 +406,7 @@ def _frac_like_number_parse(self, ext_result: ExtractResult) -> ParseResult: # e.g. one hundred thousand # frac[i+1] % 100 and frac[i] % 100 = 0 if (self.config.resolve_composite_number(frac_words[split_index]) >= sm_hundreds - and not frac_words[split_index + 1] in self.config.written_fraction_separator_texts + and frac_words[split_index + 1] not in self.config.written_fraction_separator_texts and self.config.resolve_composite_number( frac_words[split_index + 1]) < sm_hundreds): split_index += 1 @@ -506,6 +562,10 @@ def __is_composable(self, big: int, small: int) -> bool: return big % base_num == 0 and big / base_num >= 1 def __get_int_value(self, matches: List[str]) -> Decimal: + special_case, value = self.config.get_lang_specific_int_value(matches) + if special_case: + return value + is_end = [False] * len(matches) tmp_val = 0 @@ -719,10 +779,12 @@ def _get_digital_value(self, digits_str: str, power: int) -> Decimal: def _get_text_number_regex(self, single_int_frac: str) -> Pattern: culture_code = self.config.culture_info.code - source = fr'(?=\b)({single_int_frac})(?=\b)' + source = fr'(?<=\b)({single_int_frac})(?=\b)' if culture_code in (Culture.Italian, Culture.German, Culture.Dutch): source = fr'((?=\b)({single_int_frac})(?=\b))|({single_int_frac})' + elif culture_code in (Culture.Arabic, ): + source = f'((?<=\\b)|(?<=و))({single_int_frac})(?=\\b)' pattern = RegExpUtility.get_safe_reg_exp(source, flags=regex.I | regex.S) return pattern @@ -739,7 +801,7 @@ def parse(self, source: ExtractResult) -> Optional[ParseResult]: result: ParseResult = super().parse(source) - if not result.resolution_str is None and result.resolution_str: + if result.resolution_str is not None and result.resolution_str: if not result.resolution_str.strip().endswith('%'): result.resolution_str = result.resolution_str.strip() + '%' diff --git a/Python/libraries/recognizers-number/recognizers_number/number/portuguese/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/portuguese/parsers.py index eda1f9a5a3..c449f69021 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/portuguese/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/portuguese/parsers.py @@ -8,11 +8,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.portuguese_numeric import PortugueseNumeric -class PortugueseNumberParserConfiguration(NumberParserConfiguration): +class PortugueseNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map diff --git a/Python/libraries/recognizers-number/recognizers_number/number/spanish/parsers.py b/Python/libraries/recognizers-number/recognizers_number/number/spanish/parsers.py index 9179a7ce2c..a5d6c180cf 100644 --- a/Python/libraries/recognizers-number/recognizers_number/number/spanish/parsers.py +++ b/Python/libraries/recognizers-number/recognizers_number/number/spanish/parsers.py @@ -8,11 +8,11 @@ from recognizers_text.culture import Culture from recognizers_text.parser import ParseResult from recognizers_number.culture import CultureInfo -from recognizers_number.number.parsers import NumberParserConfiguration +from recognizers_number.number.parsers import BaseNumberParserConfiguration from recognizers_number.resources.spanish_numeric import SpanishNumeric -class SpanishNumberParserConfiguration(NumberParserConfiguration): +class SpanishNumberParserConfiguration(BaseNumberParserConfiguration): @property def cardinal_number_map(self) -> Dict[str, int]: return self._cardinal_number_map @@ -116,7 +116,7 @@ def __init__(self, culture_info=None): SpanishNumeric.OrdinalNumberMap) for prefix_key in SpanishNumeric.PrefixCardinalMap: for suffix_key in SpanishNumeric.SuffixOrdinalMap: - if not prefix_key+suffix_key in ordinal_number_map: + if prefix_key+suffix_key not in ordinal_number_map: prefix_value = SpanishNumeric.PrefixCardinalMap[prefix_key] suffix_value = SpanishNumeric.SuffixOrdinalMap[suffix_key] ordinal_number_map[prefix_key + diff --git a/Python/libraries/recognizers-number/recognizers_number/resources/__init__.py b/Python/libraries/recognizers-number/recognizers_number/resources/__init__.py index 392efc1765..57de0ab4d8 100644 --- a/Python/libraries/recognizers-number/recognizers_number/resources/__init__.py +++ b/Python/libraries/recognizers-number/recognizers_number/resources/__init__.py @@ -11,3 +11,4 @@ from .portuguese_numeric import PortugueseNumeric from .spanish_numeric import SpanishNumeric from .japanese_numeric import JapaneseNumeric +from .catalan_numeric import CatalanNumeric \ No newline at end of file diff --git a/Python/libraries/recognizers-number/recognizers_number/resources/arabic_numeric.py b/Python/libraries/recognizers-number/recognizers_number/resources/arabic_numeric.py new file mode 100644 index 0000000000..87e1d79722 --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/resources/arabic_numeric.py @@ -0,0 +1,485 @@ +# ------------------------------------------------------------------------------ +# +# This code was generated by a tool. +# Changes to this file may cause incorrect behavior and will be lost if +# the code is regenerated. +# +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# ------------------------------------------------------------------------------ + +from .base_numbers import BaseNumbers +# pylint: disable=line-too-long + + +class ArabicNumeric: + LangMarker = 'Ara' + CompoundNumberLanguage = False + MultiDecimalSeparatorCulture = True + RoundNumberIntegerRegex = f'(?:مائتان|مائة|مائة|مائتين|ثلاثمائه|أربعة مئة|خمسمائة|ستمائة|سبعمائة|ثمان مائة|تسعمائة|تريليون|ترليون|آلاف|تريليونين|تريليونات|مليار|ملياري|مليارات|مليون|مليونان|ملايين|ملايين|ألف|مليونين|ألفين|مئة|الف|ومائتين|الفين|بألفين|مئتان|الآف)' + ZeroToNineIntegerRegex = f'(وخمسة|و خمسة|بإثنان|وواحد|و واحد|واحد|وأربعة|و أربعة|واثنان|اثنان|إثنان|وثلاثة|و ثلاثة|ثلاثة|واربعة|أربع|أربعة|خمسة|وستة|و ستة|ستة|وسبعة|و سبعة|سبعة|وثمانية|و ثمانية|ثمانية|ثمانٍ|وتسعة|و تسعة|تسع|أحد|اثني|إثني|ثلاث|صفر|سبع|ست|اربع|أربع|السادس|الثامنة|تسعة|اثنين|واحدُ|وإثنين|وواحدُ|الواحد:?)' + TwoToNineIntegerRegex = f'(?:ثلاث|ثلاثة|سبعة|ثمان|ثمانية|أربع|أربعة|خمسة|تسعة|اثنان|اثنتان|اثنين|اثتنين|اثنتان|إثنان|إثنتان|إثنين|إثتنين|إثنتان|ست|ستة)' + NegativeNumberTermsRegex = f'(?(سالب|ناقص)(\\s+)?)' + NegativeNumberSignRegex = f'^{NegativeNumberTermsRegex}.*' + AnIntRegex = f'(واحد|أحد)(?=\\s)' + TenToNineteenIntegerRegex = f'(?:((ثلاث|ثلاثة|سبعة|ثمان|ثمانية|أربع|أربعة|خمسة|تسعة|اثنان|اثنان|اثنين|اثتنين|اثنتان|إثنان|إثنتان|إثنين|إثتنين|إثنتان|ستة|أحد|أربعة|إثني|اثني)\\s(عشر|عشرة)))' + TensNumberIntegerRegex = f'(عشرة|عشرون|ثلاثون|أربعون|خمسون|ستون|سبعون|ثمانون|تسعين|وعشرين|و عشرين|وثلاثين|و ثلاثين|وأربعين|و أربعين|وخمسين|و خمسين|وستين|وستين|وسبعين|و سبعين|وثمانين|و ثمانين|وتسعين|وتسعين|وعشرون|ثلاثون|وأربعون|و أربعون|وخمسون|و خمسون|وستون|و ستون|وسبعون|و سبعون|وثمانون|و ثمانون|وتسعون|و تسعون|عشرين|ثلاثين|أربعين|خمسين|ستين|سبعين|ثمانين|تسعون|العشرون:?)' + SeparaIntRegex = f'(?:((({RoundNumberIntegerRegex}\\s{RoundNumberIntegerRegex})|{TenToNineteenIntegerRegex}|({ZeroToNineIntegerRegex}(((و)?)\\s+(و)?|\\s*-\\s*){TensNumberIntegerRegex})|{TensNumberIntegerRegex}|{ZeroToNineIntegerRegex}|{RoundNumberIntegerRegex})(\\s+{RoundNumberIntegerRegex})*))|(((\\s+{RoundNumberIntegerRegex})+))' + AllIntRegex = f'(?:({SeparaIntRegex})((\\s+(و)?)({SeparaIntRegex})(\\s+{RoundNumberIntegerRegex})?)*|((({TenToNineteenIntegerRegex}|({TensNumberIntegerRegex}(\\s+(و)?|\\s*-\\s*){ZeroToNineIntegerRegex})|{TensNumberIntegerRegex}|{ZeroToNineIntegerRegex})?(\\s+{RoundNumberIntegerRegex})+)\\s+(و)?)*{SeparaIntRegex})' + PlaceHolderPureNumber = f'\\b' + PlaceHolderDefault = f'\\D|\\b' + + def NumbersWithPlaceHolder(placeholder): + return f'(((?(الواحد\\s)?((السابق|السابقة|الثانية الى|((الذي)\\s*(قبل|قبلا)\\s*)?(الأخير)|قبل|بعد|سبق|سبقت|التالي|الحالي|الذي|اخر)(\\s))?((تالي|الحالي|السابقة|سابق|قادم|التالي|((الذي)\\s*(قبل|قبلا)\\s*)?(الأخير)|آخر|أخير|حالي|اخر|الاخير|الأولى)(ة)?)|(الاخر|الاول|الأول|اول|الأولى|((الذي)\\s*(قبل|قبلا)\\s*)?(الأخير)|السابق|التالي|أخر))' + BasicOrdinalRegex = f'({NumberOrdinalRegex}|{RelativeOrdinalRegex})' + SuffixBasicOrdinalRegex = f'(?:(((({TensNumberIntegerRegex}(\\s+(و)?|\\s*){ZeroToNineIntegerRegex})|{TensNumberIntegerRegex}|{ZeroToNineIntegerRegex}|({RoundNumberIntegerRegex}|المئة(\\s+(و)?)))((\\s+{RoundNumberIntegerRegex}|المئة)+|({BasicOrdinalRegex})))\\s+(و)?)*({TensNumberIntegerRegex}(\\s+|\\s*))?{BasicOrdinalRegex}|({TensNumberIntegerRegex}))' + SuffixRoundNumberOrdinalRegex = f'(?:({AllIntRegex}\\s+){RoundNumberOrdinalRegex})' + AllOrdinalRegex = f'(?:{SuffixBasicOrdinalRegex}|{SuffixRoundNumberOrdinalRegex})' + OrdinalNumericRegex = f'(?<=\\b)(?:\\d{{1,3}}(\\s*,\\s*\\d{{3}})*\\s*th)(?=\\b)' + OrdinalRoundNumberRegex = f'({RoundNumberOrdinalRegex})' + OrdinalEnglishRegex = f'(?<=\\b){AllOrdinalRegex}(?=\\b)' + FractionNotationWithSpacesRegex = f'(((?<={{?[\\u0600-\\u06ff]}}|^)-\\s*)|(?<=\\b))\\d+\\s+\\d+[/]\\d+(?=(\\b[^/]|$))' + FractionNotationWithSpacesRegex2 = f'(((?<={{?[\\u0600-\\u06ff]}}|^)-\\s*)|(?({AllIntRegex})|((?({AllIntRegex})|(\\d+)(?![\\.,]))(?=\\b)' + FractionPrepositionWithinPercentModeRegex = f'(?({AllIntRegex})|((?({AllIntRegex})|(\\d+)(?![\\.,]))(?=\\b)' + FractionWithOrdinalPrefix = f'({AllOrdinalRegex})(?=\\s*({FractionOrdinalPrefix}))' + FractionWithPartOfPrefix = f'((جزء من)\\s+)({AllIntRegexWithLocks})' + AllPointRegex = f'((\\s+{ZeroToNineIntegerRegex})+|(\\s+{SeparaIntRegex}))' + AllFloatRegex = f'{AllIntRegex}(\\s+(نقطة|جزء|جزء من)){AllPointRegex}' + DoubleWithMultiplierRegex = f'(((?و)' + NumberWithSuffixPercentage = f'((?)' + LessRegex = f'(?:(أقل|اقل|اصغر|أصغر|أخفض|ادنى)(\\s*من)?|تحت|(?|=)<)' + EqualRegex = f'(يساوي|(?)=)' + MoreOrEqualPrefix = f'(((ليس|لا)\\s+{LessRegex})|(على\\s+الأقل))' + MoreOrEqual = f'(?:(({MoreRegex}(\\s+من)?)\\s+(أو|او)?\\s+{EqualRegex})|(({MoreOrEqualPrefix}|(تفوق))(\\s+(أو|او)?\\s+{EqualRegex})?)|(({EqualRegex}\\s+(أو|او)?\\s+)?({MoreOrEqualPrefix}|تفوق))|>\\s*=)' + MoreOrEqualSuffix = f'((أو|او)\\s+(((أكبر|أعظم|أطول|فوق|اكثر|اكثر|اكبر|أكثر)((?!\\s+من)|(\\s+من(?!(\\s*\\d+)))))|((فوق|أكبر|أطول|اكثر)(?!\\s+من))))' + LessOrEqualPrefix = f'((ليس\\s+{MoreRegex})|(at\\s+most)|(بحد أقصى)|(يصل الى))' + LessOrEqual = f'(((لا\\s*)?{LessRegex}\\s+(أو|او)?\\s+{EqualRegex})|({EqualRegex}\\s+(أو|او)?\\s+(((أقل|اقل|أدنى|اصغر|أصغر|ادنى)(\\s+من))|تحت|(?|=)<))|({LessOrEqualPrefix}(\\s+(أو|او)?\\s+{EqualRegex})?)|(({EqualRegex}\\s+(أو|او)?\\s+)?{LessOrEqualPrefix})|<\\s*=)' + LessOrEqualSuffix = f'((أ|ا)?و\\s+(أقل)((?!\\s+من)|(\\s+من(?!(\\s*\\d+)))))' + NumberSplitMark = f'(?![.،](?!\\d+))' + MoreRegexNoNumberSucceed = f'((أكبر|أعظم|أطول|فوق|اكثر)((?!\\s+من)|\\s+(من(?!(\\s*\\d+))))|(فوق|أكبر|أعظم)(?!(\\s*\\d+)))' + LessRegexNoNumberSucceed = f'((أقل|أصغر)((?!\\s+من)|\\s+(من(?!(\\s*\\d+))))|(تحت|اقل|أقل|أصغر)(?!((\\s*\\d+)|\\s*من)))' + EqualRegexNoNumberSucceed = f'((يساوي)(?!(\\s*\\d+)))' + OneNumberRangeMoreRegex1 = f'({MoreOrEqual})\\s*(ال)?(?({NumberSplitMark}.)+)|({EqualRegex}\\s*(أو|او)?\\s+({MoreRegex}))(\\s+(من))\\s*(?({NumberSplitMark}.)+)|({EqualRegex}\\s+(أو|او)?\\s+({MoreRegex}))\\s*(?({NumberSplitMark}.)+)|({MoreRegex})(\\s+(من))\\s*(?({NumberSplitMark}.)+)|({MoreRegex})\\s*(?({NumberSplitMark}.)+)' + OneNumberRangeMoreRegex3 = f'(?({NumberSplitMark}.)+)\\s*(و|أو)\\s*({MoreRegex})' + OneNumberRangeMoreRegex2 = f'(?({NumberSplitMark}.)+)\\s*{MoreOrEqualSuffix}' + OneNumberRangeMoreSeparateRegex = f'({MoreRegex}\\s*(من)\\s+(?({NumberSplitMark}.)+)\\s+(أو|او)\\s+{EqualRegexNoNumberSucceed})|({EqualRegex}\\s+(?({NumberSplitMark}.)+)(\\s+(أو|او)\\s+){MoreRegexNoNumberSucceed})|({MoreRegex}\\s+(?({NumberSplitMark}.)+)(\\s+(أو|او)\\s+){EqualRegexNoNumberSucceed})' + OneNumberRangeLessRegex1 = f'(({LessOrEqual})\\s*(ال)?(?({NumberSplitMark}.)+))|(لا\\s*)?((((أقل|اقل|أدنى|اصغر|أصغر|ادنى)(\\s+من))|تحت|(?|=)<))\\s*(ال)?(?({NumberSplitMark}.)+)|(لا\\s*)?(({LessRegex})\\s*(ال)?(?({NumberSplitMark}.)+))' + OneNumberRangeLessRegex2 = f'(?({NumberSplitMark}.)+)\\s*{LessOrEqualSuffix}' + OneNumberRangeLessSeparateRegex = f'({EqualRegex}\\s+(?({NumberSplitMark}.)+)\\s*(أو|او)\\s+{LessRegexNoNumberSucceed})|(((((أقل|اقل|أدنى|اصغر|أصغر|ادنى)(\\s+من))|تحت|(?|=)<))\\s+(?({NumberSplitMark}.)+)(\\s+(أو|او)\\s+){EqualRegexNoNumberSucceed})' + OneNumberRangeEqualRegex = f'{EqualRegex}\\s*(ال)?(?({NumberSplitMark}.)+)' + TwoNumberRangeRegex1 = f'بين\\s*(ال)?(?({NumberSplitMark}.)+)\\s*و\\s*(ال)?(?({NumberSplitMark}.)+)' + TwoNumberRangeRegex2 = f'({OneNumberRangeMoreRegex1}|{OneNumberRangeMoreRegex2})\\s*(،)?\\s*((أ|ا)?و|لكن|,)\\s*({OneNumberRangeLessRegex1}|{OneNumberRangeLessRegex2})' + TwoNumberRangeRegex3 = f'({OneNumberRangeLessRegex1}|{OneNumberRangeLessRegex2})\\s*(،)?\\s*((أ|ا)?و|لكن|,)\\s*({OneNumberRangeMoreRegex1}|{OneNumberRangeMoreRegex2})' + TwoNumberRangeRegex4 = f'((من\\s)(?({NumberSplitMark}(?!\\bمن\\b).)+)\\s*{TillRegex}\\s*(ال\\s+)?(?({NumberSplitMark}.)+))|((من\\s)?(?({NumberSplitMark}(?!\\bمن\\b).)+)\\s*{TillRegex}\\s*(ال\\s+)?(?({NumberSplitMark}.)+))' + AmbiguousFractionConnectorsRegex = f'(\\bمن|بين|من|بين\\b)' + DecimalSeparatorChar = ',' + FractionMarkerToken = 'أكثر' + NonDecimalSeparatorChar = '،' + HalfADozenText = 'ستة' + WordSeparatorToken = 'و' + WrittenDecimalSeparatorTexts = [r'نقطة | فاصلة'] + WrittenGroupSeparatorTexts = [r'punto'] + WrittenIntegerSeparatorTexts = [r'و'] + WrittenFractionSeparatorTexts = [r'و'] + HalfADozenRegex = f'نصف?\\sدستة' + DigitalNumberRegex = f'((?<=\\b)(مائة|مائتان|دست|دستات|ألف|ألفين|مائتين|ألفين|ثلاثمائة|أربعمائة|خمسمائة|ستمائة|سبعمائة|تسعمائة|ثمانمائة|مليون|مليار|ترليون)(?=\\b))|((?<=(\\d|\\b)){BaseNumbers.MultiplierLookupRegex}(?=\\b))' + CardinalNumberMap = dict([("واحد", 1), + ("صفر", 0), + ("اثنان", 2), + ("اثنين", 2), + ("ثلاث", 3), + ("ثلاثة", 3), + ("أربعة", 4), + ("خمسة", 5), + ("ستة", 6), + ("سبعة", 7), + ("ثمانية", 8), + ("تسعة", 9), + ("عشرة", 10), + ("إحدى عشر", 11), + ("اثنى عشر", 12), + ("دستة", 12), + ("دستات", 12), + ("ثلاثة عشر", 13), + ("أربعة عشر", 14), + ("خمسة عشر", 15), + ("ستة عشر", 16), + ("سبعة عشر", 17), + ("ثمانية عشر", 18), + ("تسعة عشر", 19), + ("عشرون", 20), + ("وعشرون", 20), + ("ثلاثون", 30), + ("وثلاثون", 30), + ("أربعون", 40), + ("وأربعون", 40), + ("خمسون", 50), + ("وخمسون", 50), + ("ستون", 60), + ("وستون", 60), + ("سبعون", 70), + ("وسبعون", 70), + ("ثمانون", 80), + ("وثمانون", 80), + ("تسعون", 90), + ("وتسعون", 90), + ("مائة", 100), + ("ومائة", 100), + ("مائتان", 200), + ("ومائتان", 200), + ("مائتين", 200), + ("ومائتين", 200), + ("ثلاثمائة", 300), + ("وثلاثمائة", 300), + ("أربعمائة", 400), + ("وأربعمائة", 400), + ("خمسمائة", 500), + ("وخمسمائة", 500), + ("ستمائة", 600), + ("وستمائة", 600), + ("سبعمائة", 700), + ("وسبعمائة", 700), + ("ثمانمائة", 800), + ("وثمانمائة", 800), + ("تسعمائة", 900), + ("وتسعمائة", 900), + ("ألف", 1000), + ("آلاف", 1000), + ("ألفين", 2000), + ("ألفان", 2000), + ("المليون", 1000000), + ("مليون", 1000000), + ("مليار", 1000000000), + ("المليار", 1000000000), + ("تريليون", 1000000000000), + ("التريليون", 1000000000000), + ("الواحد", 1), + ("الصفر", 0), + ("الاثنان", 2), + ("الاثنين", 2), + ("الثلاثة", 3), + ("الأربعة", 4), + ("الخمسة", 5), + ("الستة", 6), + ("السبعة", 7), + ("الثمانية", 8), + ("التسعة", 9), + ("العشرة", 10), + ("الإحدى عشر", 11), + ("الاثنى عشر", 12), + ("الدستة", 12), + ("الدستات", 12), + ("الثلاثة عشر", 13), + ("الأربعة عشر", 14), + ("الخمسة عشر", 15), + ("الستة عشر", 16), + ("السبعة عشر", 17), + ("الثمانية عشر", 18), + ("التسعة عشر", 19), + ("العشرون", 20), + ("الثلاثون", 30), + ("الأربعون", 40), + ("الخمسون", 50), + ("الستون", 60), + ("السبعون", 70), + ("الثمانون", 80), + ("التسعون", 90), + ("المائة", 100), + ("المائتين", 200), + ("المائتان", 200), + ("الثلاثمائة", 300), + ("الأربعمائة", 400), + ("الخمسمائة", 500), + ("الستمائة", 600), + ("السبعمائة", 700), + ("الثمانمائة", 800), + ("التسعمائة", 900), + ("الألف", 1000), + ("الآلاف", 1000), + ("الألفين", 2000)]) + OrdinalNumberMap = dict([("أول", 1), + ("أولى", 1), + ("الأول", 1), + ("الأولى", 1), + ("ثاني", 2), + ("ثانية", 2), + ("الثاني", 2), + ("الثانية", 2), + ("ثان", 2), + ("النصف", 2), + ("نصف", 2), + ("ثلث", 3), + ("الثالث", 3), + ("الثالثة", 3), + ("ثالث", 3), + ("ثالثة", 3), + ("الربع", 4), + ("ربع", 4), + ("الرابع", 4), + ("الرابعة", 4), + ("رابع", 4), + ("رابعة", 4), + ("خمس", 5), + ("الخامس", 5), + ("الخامسة", 5), + ("خامس", 5), + ("خامسة", 5), + ("سدس", 6), + ("السادس", 6), + ("السادسة", 6), + ("سادس", 6), + ("سادسة", 6), + ("سبع", 7), + ("السابع", 7), + ("السابعة", 7), + ("سابع", 7), + ("سابعة", 7), + ("ثمن", 8), + ("الثامن", 8), + ("الثامنة", 8), + ("ثامن", 8), + ("ثامنة", 8), + ("تسع", 9), + ("التاسع", 9), + ("التاسعة", 10), + ("تاسع", 9), + ("تاسعة", 9), + ("واحد من عشرة", 10), + ("العاشر", 10), + ("واحد من إحدى عشر", 11), + ("الحادية عشرة", 11), + ("الحادي عشر", 11), + ("واحد من إثنى عشر", 12), + ("الثانية عشرة", 12), + ("الثاني عشر", 12), + ("واحد من ثلاثة عشر", 13), + ("الثالثة عشرة", 13), + ("الثالث عشر", 13), + ("واحد من أربعة عشر", 14), + ("الرابعة عشرة", 14), + ("الرابع عشر", 14), + ("واحد من خمسة عشر", 15), + ("الخامسة عشرة", 15), + ("الخامس عشر", 15), + ("واحد من ستة عشر", 16), + ("السادسة عشرة", 16), + ("السادس عشر", 16), + ("واحد من سبعة عشر", 17), + ("السابعة عشرة", 17), + ("السابع عشر", 17), + ("واحد من ثمانية عشر", 18), + ("الثامنة عشرة", 18), + ("الثامن عشر", 18), + ("واحد من تسعة عشر", 19), + ("التاسع عشر", 19), + ("واحد من عشرين", 20), + ("العشرون", 20), + ("العشرين", 20), + ("الحادي والعشرين", 21), + ("الثاني والعشرين", 22), + ("الثالث والعشرين", 23), + ("الرابع والعشرين", 24), + ("الخامس والعشرين", 25), + ("السادس والعشرين", 26), + ("السابع والعشرين", 27), + ("الثامن والعشرين", 28), + ("التاسع والعشرين", 29), + ("واحد من ثلاثين", 30), + ("الثلاثون", 30), + ("الثلاثين", 30), + ("الحادي والثلاثين", 31), + ("واحد من أربعين", 40), + ("الأربعون", 40), + ("الأربعين", 40), + ("واحد من خمسين", 50), + ("الخمسون", 50), + ("الخمسين", 50), + ("واحد من ستين", 60), + ("الستون", 60), + ("الستين", 60), + ("واحد من سبعين", 70), + ("السبعون", 70), + ("السبعين", 70), + ("واحد من ثمانين", 80), + ("الثمانون", 80), + ("الثمانين", 80), + ("واحد من تسعين", 90), + ("التسعون", 90), + ("التسعين", 90), + ("واحد من مائة", 100), + ("المائة", 100), + ("المائتان", 200), + ("المائتين", 200), + ("الثلاثمائة", 300), + ("الأربعمائة", 400), + ("الخمسمائة", 500), + ("الستمائة", 600), + ("السبعمائة", 700), + ("الثمانمائة", 800), + ("التسعمائة", 100), + ("الألف", 1000), + ("واحد من ألف", 1000), + ("واحد من مليون", 1000000), + ("المليون", 1000000), + ("واحد من مليار", 1000000000), + ("المليار", 1000000000), + ("واحد من تريليون", 1000000000000), + ("التريليون", 1000000000000), + ("أوائل", 1), + ("أنصاف", 2), + ("أثلاث", 3), + ("أرباع", 4), + ("أخماس", 5), + ("أسداس", 6), + ("أسباع", 7), + ("أثمان", 8), + ("أتساع", 9), + ("أعشار", 10), + ("عشرينات", 20), + ("ثلاثينات", 30), + ("أربعينات", 40), + ("خمسينات", 50), + ("ستينات", 60), + ("سبعينات", 70), + ("ثمانينات", 80), + ("تسعينات", 90), + ("مئات", 100), + ("ألوف", 1000), + ("ملايين", 1000000), + ("مليارات", 1000000000), + ("تريليون", 1000000000000)]) + RoundNumberMap = dict([("ترليون", 1000000000000), + ("مائة", 100), + ("ألف", 1000), + ("مليون", 1000000), + ("مليار", 1000000000), + ("تريليون", 1000000000000), + ("مائتين", 200), + ("مائتان", 200), + ("ثلاثمائة", 300), + ("أربعمائة", 400), + ("خمسمائة", 500), + ("ستمائة", 600), + ("سبعمائة", 700), + ("ثمانمائة", 800), + ("تسعمائة", 900), + ("ألفين", 2000), + ("دستة", 12), + ("دستات", 12), + ("المائة", 100), + ("الألف", 1000), + ("المليون", 1000000), + ("المليار", 1000000000), + ("التريليون", 1000000000000), + ("المائتين", 200), + ("المائتان", 200), + ("الثلاثمائة", 300), + ("الأربعمائة", 400), + ("الخمسمائة", 500), + ("الستمائة", 600), + ("السبعمائة", 700), + ("الثمانمائة", 800), + ("التسعمائة", 900), + ("الألفين", 2000), + ("الدستة", 12), + ("الدستات", 12)]) + AmbiguityFiltersDict = dict([("\\bواحد\\b", "\\b(الذي|هذا|ذلك|ذاك|أي)\\s+(واحد)\\b")]) + RelativeReferenceOffsetMap = dict([("الاخر", "0"), + ("آخر", "0"), + ("اخر", "0"), + ("الأخيرة", "0"), + ("الأخير", "0"), + ("سبقت الأخيرة", "-1"), + ("سبقت الأخير", "-1"), + ("قبل الأخير", "-1"), + ("قبل الأخيرة", "-1"), + ("القبل الأخير", "-1"), + ("قبلا الأخي", "-1"), + ("التالي", "1"), + ("بعد التالي", "2"), + ("قادم", "1"), + ("قادمة", "1"), + ("القادم", "1"), + ("القادمة", "1"), + ("السابقة", "-1"), + ("الحالي", "0"), + ("الحالية", "0"), + ("قبل الاخير", "-1"), + ("الواحد قبل الاخير", "-1"), + ("الثانية الى الاخير", "-1"), + ("الذي قبلا الأخير", "-1"), + ("الذي قبل الأخير", "-1"), + ("الذي قبلا الأخي", "-1"), + ("السابق", "-1"), + ("أخر", "0"), + ("الاخير", "0"), + ("اول", "1"), + ("الاول", "1"), + ("التالية", "-1")]) + RelativeReferenceRelativeToMap = dict([("اول", "current"), + ("التالية", "current"), + ("الاول", "current"), + ("الاخر", "end"), + ("الاخير", "end"), + ("أخر", "end"), + ("آخر", "end"), + ("اخر", "end"), + ("الأخيرة", "end"), + ("الأخير", "end"), + ("سبقت الأخيرة", "current"), + ("سبقت الأخير", "current"), + ("قبل الأخير", "end"), + ("قبل الأخيرة", "current"), + ("القبل الأخير", "current"), + ("الذي قبلا الأخي", "end"), + ("التالي", "current"), + ("بعد التالي", "current"), + ("قادم", "current"), + ("قادمة", "current"), + ("القادم", "current"), + ("القادمة", "current"), + ("السابقة", "current"), + ("الحالي", "current"), + ("قبلا الأخي", "current"), + ("الحالية", "end"), + ("قبل الاخير", "end"), + ("الواحد قبل الاخير", "end"), + ("الذي قبل الأخير", "end"), + ("الذي قبلا الأخير", "end"), + ("الثانية الى الاخير", "end"), + ("السابق", "current")]) +# pylint: enable=line-too-long diff --git a/Python/libraries/recognizers-number/recognizers_number/resources/catalan_numeric.py b/Python/libraries/recognizers-number/recognizers_number/resources/catalan_numeric.py new file mode 100644 index 0000000000..ef449e4146 --- /dev/null +++ b/Python/libraries/recognizers-number/recognizers_number/resources/catalan_numeric.py @@ -0,0 +1,173 @@ +from .base_numbers import BaseNumbers +# pylint: disable=line-too-long + + +class CatalanNumeric: + LangMarker = 'Cat' + CompoundNumberLanguage = False + MultiDecimalSeparatorCulture = True + NonStandardSeparatorVariants = [] + RoundNumberIntegerRegex = f'((?:cents|milers|milions|mil milions|bilió)s?|mil)' + ZeroToNineIntegerRegex = f'(?:tres|set|vuit|quatre|cinc|zero|nou|un|dos|sis)' + TwoToNineIntegerRegex = f'(?:tres|set|vuit|quatre|cinc|nou|dos|sis)' + NegativeNumberTermsRegex = f'(?(menys|negatiu)\\s+)' + NegativeNumberSignRegex = f'^{NegativeNumberTermsRegex}.*' + TenToNineteenIntegerRegex = f'(?:disset|tretze|catorze|divuit anys|dinou|quinze|setze|onze|dotze|deu)' + TensNumberIntegerRegex = f'(?:setanta|vint|trenta|vuitanta|noranta|quaranta|cinquanta|seixanta)' + TwentiesIntegerRegex = f'(vint(\\s?-\\s?|\\s)i(\\s?-\\s?|\\s)({TwoToNineIntegerRegex}|u(n)?))' + BelowHundredsRegex = f'(({TenToNineteenIntegerRegex}|{TwentiesIntegerRegex}|({TensNumberIntegerRegex}((\\s?-\\s?|\\s)({TwoToNineIntegerRegex}|u))?)|{ZeroToNineIntegerRegex}))' + HundredsNumberIntegerRegex = f'(({TwoToNineIntegerRegex}(\\s?-\\s?|\\s))?cent(s?))' + BelowThousandsRegex = f'({HundredsNumberIntegerRegex}(\\s+{BelowHundredsRegex})?|{BelowHundredsRegex})' + SupportThousandsRegex = f'(({BelowThousandsRegex}|{BelowHundredsRegex})\\s+{RoundNumberIntegerRegex}(\\s+{RoundNumberIntegerRegex})?)' + SeparaIntRegex = f'({SupportThousandsRegex}(\\s+{SupportThousandsRegex})*(\\s+{BelowThousandsRegex})?|{BelowThousandsRegex})' + AllIntRegex = f'({SeparaIntRegex}|mil(\\s+{BelowThousandsRegex})?|{RoundNumberIntegerRegex})' + PlaceHolderPureNumber = f'\\b' + PlaceHolderDefault = f'(?=\\D)|\\b' + PlaceHolderMixed = f'\\D|\\b' + DigitsNumberRegex = f'\\d|\\d{{1,3}}(\\.\\d{{3}})' + + def NumbersWithPlaceHolder(placeholder): + return f'(((?((?!(([,,](?!\\d+))|。)).)+)\\s*{TillRegex}\\s*(?((?!(([,,](?!\\d+))|。)).)+)' AmbiguityFiltersDict = dict([("十", "十足"), - ("伍", "队伍"), + ("伍", "队伍|入伍|退伍|伍仁"), ("肆", "放肆|肆意|肆无忌惮"), ("陆", "大陆|陆地|登陆|海陆"), ("拾", "拾取|拾起|收拾|拾到|朝花夕拾")]) diff --git a/Python/libraries/recognizers-number/resource-definitions.json b/Python/libraries/recognizers-number/resource-definitions.json index 7505aa87cd..a83cfe2b4e 100644 --- a/Python/libraries/recognizers-number/resource-definitions.json +++ b/Python/libraries/recognizers-number/resource-definitions.json @@ -119,6 +119,18 @@ "class DutchNumeric:" ], "footer": [ "# pylint: enable=line-too-long" ] + }, + { + "input": [ "Arabic", "Arabic-Numbers" ], + "output": "arabic_numeric", + "header": [ + "from .base_numbers import BaseNumbers", + "# pylint: disable=line-too-long", + "", + "", + "class ArabicNumeric:" + ], + "footer": [ "# pylint: enable=line-too-long" ] } ] } diff --git a/Python/libraries/recognizers-number/setup.py b/Python/libraries/recognizers-number/setup.py index 56fdace3c1..64adf2ae83 100644 --- a/Python/libraries/recognizers-number/setup.py +++ b/Python/libraries/recognizers-number/setup.py @@ -9,9 +9,9 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = "recognizers-text-number" -VERSION = "1.0.0.a0" -REQUIRES = ['recognizers-text', 'regex'] +NAME = "recognizers-text-number-genesys" +VERSION = "1.0.77" +REQUIRES = ['recognizers-text-genesys', 'regex'] setup( name=NAME, diff --git a/Python/libraries/recognizers-sequence/setup.py b/Python/libraries/recognizers-sequence/setup.py index 70c18e4438..bc6938cd06 100644 --- a/Python/libraries/recognizers-sequence/setup.py +++ b/Python/libraries/recognizers-sequence/setup.py @@ -9,9 +9,9 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = "recognizers-text-sequence" -VERSION = "1.0.0.a0" -REQUIRES = ['recognizers-text', 'recognizers-text-number', 'regex'] +NAME = "recognizers-text-sequence-genesys" +VERSION = "1.0.77" +REQUIRES = ['recognizers-text-genesys', 'recognizers-text-number-genesys', 'regex'] setup( name=NAME, diff --git a/Python/libraries/recognizers-suite/setup.py b/Python/libraries/recognizers-suite/setup.py index 40c7cee90c..4054d9306b 100644 --- a/Python/libraries/recognizers-suite/setup.py +++ b/Python/libraries/recognizers-suite/setup.py @@ -9,10 +9,17 @@ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -NAME = 'recognizers-text-suite' -VERSION = '1.0.0.a0' -REQUIRES = ['recognizers-text', 'recognizers-text-number', 'recognizers-text-number-with-unit', - 'recognizers-text-date-time', 'recognizers-text-sequence', 'recognizers-text-choice'] +NAME = 'recognizers-text-suite-genesys' +VERSION = '1.0.77' +REQUIRES = [ + 'recognizers-text-genesys==1.0.77', + 'recognizers-text-number-genesys==1.0.77', + 'recognizers-text-number-with-unit-genesys==1.0.77', + 'recognizers-text-date-time-genesys==1.0.77', + 'recognizers-text-sequence-genesys==1.0.77', + 'recognizers-text-choice-genesys==1.0.77', + 'datatypes_timex_expression_genesys==1.0.77' +] setup( name=NAME, diff --git a/Python/libraries/recognizers-text/recognizers_text/__init__.py b/Python/libraries/recognizers-text/recognizers_text/__init__.py index c84f3c8e66..69bd561ef3 100644 --- a/Python/libraries/recognizers-text/recognizers_text/__init__.py +++ b/Python/libraries/recognizers-text/recognizers_text/__init__.py @@ -7,3 +7,4 @@ from .extractor import * from .parser import * from .utilities import * +from .resolution_key import * diff --git a/Python/libraries/recognizers-text/recognizers_text/culture.py b/Python/libraries/recognizers-text/recognizers_text/culture.py index 80eff1ad23..011149703a 100644 --- a/Python/libraries/recognizers-text/recognizers_text/culture.py +++ b/Python/libraries/recognizers-text/recognizers_text/culture.py @@ -2,6 +2,7 @@ # Licensed under the MIT License. class Culture: + Arabic: str = 'ar-ae' Chinese: str = 'zh-cn' Dutch: str = 'nl-nl' English: str = 'en-us' @@ -15,6 +16,7 @@ class Culture: SpanishMexican: str = 'es-mx' Turkish: str = 'tr-tr' German: str = 'de-de' + Catalan: str = 'ca-es' @staticmethod def _get_supported_culture_codes(): @@ -31,7 +33,9 @@ def _get_supported_culture_codes(): Culture.Spanish, Culture.SpanishMexican, Culture.Turkish, - Culture.German + Culture.German, + Culture.Catalan, + Culture.Arabic ] @staticmethod diff --git a/Python/libraries/recognizers-text/recognizers_text/meta_data.py b/Python/libraries/recognizers-text/recognizers_text/meta_data.py index 53e4d19fad..4703379d52 100644 --- a/Python/libraries/recognizers-text/recognizers_text/meta_data.py +++ b/Python/libraries/recognizers-text/recognizers_text/meta_data.py @@ -6,3 +6,4 @@ def __init__(self): self.has_mod: bool = False self.is_duration_with_ago_and_later = False self.is_mealtime = False + self.is_holiday = False diff --git a/Python/libraries/recognizers-text/recognizers_text/model.py b/Python/libraries/recognizers-text/recognizers_text/model.py index 94f7a6aba3..403909acd3 100644 --- a/Python/libraries/recognizers-text/recognizers_text/model.py +++ b/Python/libraries/recognizers-text/recognizers_text/model.py @@ -25,7 +25,7 @@ class ModelResult(object): resolution: Union[Dict[str, object], List[Dict[str, object]]] def __repr__(self) -> str: - value = self.resolution.get('value', None) + value = self.resolution.get('value', None) if self.resolution else None if value: return '{} ({})'.format(self.text, value) diff --git a/Python/libraries/recognizers-text/recognizers_text/resolution_key.py b/Python/libraries/recognizers-text/recognizers_text/resolution_key.py new file mode 100644 index 0000000000..e6deda9a31 --- /dev/null +++ b/Python/libraries/recognizers-text/recognizers_text/resolution_key.py @@ -0,0 +1,10 @@ +class ResolutionKey: + value_set: str = 'values' + value: str = 'value' + type: str = 'type' + unit: str = 'unit' + score: str = 'score' + iso_currency: str = 'isoCurrency' + sub_type: str = 'subtype' + relative_to: str = 'offset' + offset: str = 'relativeTo' diff --git a/Python/libraries/recognizers-text/recognizers_text/utilities.py b/Python/libraries/recognizers-text/recognizers_text/utilities.py index 1bd9c5848c..82de0228d5 100644 --- a/Python/libraries/recognizers-text/recognizers_text/utilities.py +++ b/Python/libraries/recognizers-text/recognizers_text/utilities.py @@ -109,8 +109,8 @@ def get_matches(regexp: Pattern, source: str) -> []: return list(filter(None, map(lambda m: m.group().lower(), matches))) @staticmethod - def match_begin(regex: Pattern, text: str, trim: bool): - match = regex.search(text) + def match_begin(regexp: Pattern, text: str, trim: bool): + match = regexp.search(text) if match is None: return None @@ -139,8 +139,8 @@ def match_end(regexp: Pattern, text: str, trim: bool): return ConditionalMatch(match, success) @staticmethod - def is_exact_match(regex: Pattern, text: str, trim: bool): - match = regex.match(text) + def is_exact_match(regexp: Pattern, text: str, trim: bool): + match = regexp.match(text) length = len(text.strip()) if trim else len(text) diff --git a/Python/libraries/recognizers-text/setup.py b/Python/libraries/recognizers-text/setup.py index cf1e76b76a..a4c35989aa 100644 --- a/Python/libraries/recognizers-text/setup.py +++ b/Python/libraries/recognizers-text/setup.py @@ -3,9 +3,9 @@ from setuptools import setup, find_packages -NAME = "recognizers-text" -VERSION = "1.0.0.a0" -REQUIRES = ['emoji==2.0.0', 'multipledispatch'] +NAME = "recognizers-text-genesys" +VERSION = "1.0.77" +REQUIRES = ['emoji==1.1.0', 'multipledispatch'] setup( name=NAME, diff --git a/Python/libraries/resource-generator/lib/code_writer.py b/Python/libraries/resource-generator/lib/code_writer.py index ce77f5a526..d1f99f8d42 100644 --- a/Python/libraries/resource-generator/lib/code_writer.py +++ b/Python/libraries/resource-generator/lib/code_writer.py @@ -88,6 +88,8 @@ def __init__(self, name, value_type, entries): for value in entries: value = value.replace('\'', '\\\'') + if value == '\\': + value = value.replace('\\', '\\\\') self.entries.append(f'r{value_quote}{value}{value_quote}') def write(self): diff --git a/Python/requirements.txt b/Python/requirements.txt index cd6e64a28d..3344b6daed 100644 --- a/Python/requirements.txt +++ b/Python/requirements.txt @@ -1,4 +1,5 @@ datedelta +python-dateutil pre-commit==1.16.1 autopep8 -flake8 \ No newline at end of file +flake8 diff --git a/Python/tests/runner.py b/Python/tests/runner.py index b859ceb3c9..2f15ed6933 100644 --- a/Python/tests/runner.py +++ b/Python/tests/runner.py @@ -72,9 +72,12 @@ def get_specs(recognizer, entity): ENTITY_PATTERN = re.compile('(.*)(Model|Parser|Extractor|Resolver)(.*)') CULTURES = { + 'Arabic': Culture.Arabic, 'Chinese': Culture.Chinese, + 'Catalan': Culture.Catalan, 'Dutch': Culture.Dutch, 'English': Culture.English, + 'EnglishOthers': Culture.EnglishOthers, 'French': Culture.French, 'Italian': Culture.Italian, 'Japanese': Culture.Japanese, diff --git a/Python/tests/test_runner_datetime.py b/Python/tests/test_runner_datetime.py index 3ad0f9d8b3..1ab01a2bcf 100644 --- a/Python/tests/test_runner_datetime.py +++ b/Python/tests/test_runner_datetime.py @@ -11,6 +11,11 @@ 'DateTime': recognize_datetime } +CJK_languages = [ + # "Chinese", Skipped until it uses CJK base extractors/parsers + "Japanese", + "Korean" +] @pytest.mark.parametrize( 'culture, model, options, context, source, expected_results', @@ -22,7 +27,6 @@ def test_datetime_extractor( context, source, expected_results): - reference_datetime = get_reference_date(context) language = get_language(culture) extractor = create_extractor(language, model, options) @@ -49,7 +53,6 @@ def test_datetime_parser( context, source, expected_results): - reference_datetime = get_reference_date(context) language = get_language(culture) extractor = create_extractor(language, model, options) @@ -86,7 +89,6 @@ def test_datetime_mergedparser( context, source, expected_results): - reference_datetime = get_reference_date(context) language = get_language(culture) extractor = create_extractor(language, model, options) @@ -130,7 +132,6 @@ def test_datetime_model( context, source, expected_results): - reference_datetime = get_reference_date(context) option_obj = get_option(options) @@ -230,9 +231,16 @@ def create_extractor(language, model, options): if extractor: return extractor() - extractor = get_class( - f'recognizers_date_time.date_time.base_{model.lower()}', - f'Base{model}Extractor') + if language in CJK_languages: + extractor = get_class( + f'recognizers_date_time.date_time.CJK.base_{model.lower()}', + f'BaseCJK{model}Extractor' + ) + else: + extractor = get_class( + f'recognizers_date_time.date_time.base_{model.lower()}', + f'Base{model}Extractor') + configuration = get_class( f'recognizers_date_time.date_time.{language.lower()}.{model.lower()}_extractor_config', f'{language}{model}ExtractorConfiguration') @@ -261,9 +269,15 @@ def create_parser(language, model, options): f'{language}{model}Parser') if not parser: - parser = get_class( - f'recognizers_date_time.date_time.base_{model.lower()}', - f'Base{model}Parser') + if language in CJK_languages: + parser = get_class( + f'recognizers_date_time.date_time.CJK.base_{model.lower()}', + f'BaseCJK{model}Parser' + ) + else: + parser = get_class( + f'recognizers_date_time.date_time.base_{model.lower()}', + f'Base{model}Parser') if model == 'TimeZone': return parser() @@ -313,7 +327,6 @@ def get_results(culture, model, source, options, reference): def get_option(option): - if not option: option = 'None' @@ -329,3 +342,4 @@ def get_option(option): return option_class['SPLIT_DATE_AND_TIME'] return option_class['NONE'] + diff --git a/Python/tests/test_runner_number.py b/Python/tests/test_runner_number.py index 7cf254ae1d..75246840b5 100644 --- a/Python/tests/test_runner_number.py +++ b/Python/tests/test_runner_number.py @@ -1,7 +1,10 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. +from unittest import skip import pytest + +from recognizers_number.culture import SUPPORTED_CULTURES from runner import get_specs from recognizers_number.number.number_recognizer import recognize_number, recognize_ordinal, recognize_percentage @@ -41,3 +44,12 @@ def get_results(culture, model, source): def assert_verbose(actual, expected, spec_info): assert actual == expected, \ "Actual: {} | Expected: {} | Context: {}".format(actual, expected, spec_info) + + +@skip("Used for troubleshooting individual phrases") +def test_individual_utterance(): + res = recognize_number("نصف مليون", "ar-ae") + + print(f"\nResult: {res}") + assert len(res) > 0 + assert res[0].resolution.get("value") is not None diff --git a/Python/tests/test_runner_number_with_unit.py b/Python/tests/test_runner_number_with_unit.py index 0151c02333..913b2d8964 100644 --- a/Python/tests/test_runner_number_with_unit.py +++ b/Python/tests/test_runner_number_with_unit.py @@ -50,3 +50,4 @@ def resolution_assert(actual, expected, props): def assert_verbose(actual, expected, spec_info): assert actual == expected, \ "Actual: {} | Expected: {} | Context: {}".format(actual, expected, spec_info) + diff --git a/Script/Utils/generate_test_coverage_report.py b/Script/Utils/generate_test_coverage_report.py new file mode 100644 index 0000000000..5da64c70fc --- /dev/null +++ b/Script/Utils/generate_test_coverage_report.py @@ -0,0 +1,63 @@ +import csv +import json +from itertools import groupby +from pathlib import Path + + +OUTPUT_FILE = 'python_test_coverage_report.csv' + + +def main(): + test_coverage = [] + language_set = set() + + for path in Path('../../Specs').rglob('*.json'): + entity, lang = path.parts[-3:-1] + language_set.add(lang) + + with path.open() as f: + try: + test_cases = json.loads(f.read()) + except json.JSONDecodeError as e: + continue + + total = 0 + python_supported = 0 + for test_case in test_cases: + not_supported = test_case.get('NotSupportedByDesign', '') + not_supported += test_case.get('NotSupported', '') + if 'dotnet' in not_supported: + continue + if 'python' not in not_supported: + python_supported += 1 + total += 1 + + percent = round(python_supported / total * 100) if total else None + + test_coverage.append({ + 'entity': entity, + 'lang': lang, + 'model': path.stem, + 'percent': percent, + }) + + languages = sorted(language_set) + sort_key = lambda x: (x['entity'], x['model'], x['lang']) + test_coverage = sorted(test_coverage, key=sort_key) + + with open(OUTPUT_FILE, 'w', newline='') as f: + writer = csv.writer(f) + writer.writerow([''] + languages) + for entity, entity_group in groupby(test_coverage, key=lambda x: x['entity']): + writer.writerow([entity]) + for model, model_group in groupby(entity_group, key=lambda x: x['model']): + lang_coverage = {lang: {'percent': None} for lang in languages} + for lang in model_group: + if lang['percent'] is not None: + lang_coverage[lang['lang']] = lang + lang_coverage_list = [lang_coverage[lang] for lang in languages] + writer.writerow([model] + [lang['percent'] if lang else '' for lang in lang_coverage_list]) + + +if __name__ == '__main__': + main() diff --git a/Specs/Choice/Arabic/BooleanModel.json b/Specs/Choice/Arabic/BooleanModel.json index 872270cbdd..314229dc44 100644 --- a/Specs/Choice/Arabic/BooleanModel.json +++ b/Specs/Choice/Arabic/BooleanModel.json @@ -1,6 +1,7 @@ [ { "Input": "بالتأكيد!", + "NotSupported": "python", "Results": [ { "Text": "بالتأكيد", @@ -14,6 +15,7 @@ }, { "Input": "أنا لا أظن ذلك. لا.", + "NotSupported": "python", "Results": [ { "Text": "لا", @@ -27,6 +29,7 @@ }, { "Input": "أعتقد أن هذا سينجح. لذلك نعم سوف أقوم بذلك.", + "NotSupported": "python", "Results": [ { "Text": "نعم", @@ -40,6 +43,7 @@ }, { "Input": "لا، قلت الرابع من يوليو", + "NotSupported": "python", "Results": [ { "Text": "لا", @@ -53,6 +57,7 @@ }, { "Input": "نعم... قلت لا بصل", + "NotSupported": "python", "Results": [ { "Text": "نعم", @@ -66,6 +71,7 @@ }, { "Input": "قلت لا ليس نعم!", + "NotSupported": "python", "Results": [ { "Text": "لا", @@ -79,6 +85,7 @@ }, { "Input": "نعم. أنا أقول لا", + "NotSupported": "python", "Results": [ { "Text": "نعم", @@ -92,6 +99,7 @@ }, { "Input": "اختلف ، فإنه ليس صحيح", + "NotSupported": "python", "Results": [ { "Text": "ليس صحيح", @@ -105,6 +113,7 @@ }, { "Input": "اتفق، لا مشكلة", + "NotSupported": "python", "Results": [ { "Text": "اتفق", @@ -132,6 +141,7 @@ }, { "Input": "أختلف", + "NotSupportedByDesign": "python", "Results": [ { "Text": "أختلف", @@ -145,6 +155,7 @@ }, { "Input": "انها ليست على ما يرام", + "NotSupportedByDesign": "python", "Results": [ { "Text": "ليست", diff --git a/Specs/DateTime/Arabic/DateExtractor.json b/Specs/DateTime/Arabic/DateExtractor.json index b4f8340b40..09422cfdca 100644 --- a/Specs/DateTime/Arabic/DateExtractor.json +++ b/Specs/DateTime/Arabic/DateExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "سأعود في 15", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "15", @@ -13,7 +13,7 @@ }, { "Input": "سأعود في 22 أبريل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22 أبريل", @@ -25,7 +25,7 @@ }, { "Input": "سأعود في 1 يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1 يناير", @@ -37,7 +37,7 @@ }, { "Input": "سأعود في يناير 1", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يناير 1", @@ -49,7 +49,7 @@ }, { "Input": "سأعود في 2 أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 أكتوبر", @@ -61,7 +61,7 @@ }, { "Input": "سأعود في 12 يناير 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 يناير 2016", @@ -73,7 +73,7 @@ }, { "Input": "سأعود في 12 يناير من عام 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 يناير من عام 2016", @@ -85,7 +85,7 @@ }, { "Input": "سأعود يوم الاثنين 12 يناير 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الاثنين 12 يناير 2016", @@ -97,7 +97,7 @@ }, { "Input": "سأعود 2016/02/22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016/02/22", @@ -109,7 +109,7 @@ }, { "Input": "سأعود 2016/04/21", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016/04/21", @@ -121,7 +121,7 @@ }, { "Input": "سوف أعود 16/04/21", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "16/04/21", @@ -133,7 +133,7 @@ }, { "Input": "سأعود 9-18-15", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "9-18-15", @@ -145,7 +145,7 @@ }, { "Input": "سأعود في 4.22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4.22", @@ -157,7 +157,7 @@ }, { "Input": "سأعود في 22-4", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22-4", @@ -169,7 +169,7 @@ }, { "Input": "سأعود عند 4.22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4.22", @@ -181,7 +181,7 @@ }, { "Input": "سأعود عند 22-4", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22-4", @@ -193,7 +193,7 @@ }, { "Input": "سأعود في 4/22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4/22", @@ -205,7 +205,7 @@ }, { "Input": "سأعود في 04/22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "04/22", @@ -217,7 +217,7 @@ }, { "Input": "سوف أعود 4/22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4/22", @@ -229,7 +229,7 @@ }, { "Input": "سأعود 04/22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "04/22", @@ -241,7 +241,7 @@ }, { "Input": "سأعود 2015/08/12", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015/08/12", @@ -253,7 +253,7 @@ }, { "Input": "سأعود 11/12, 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "11/12, 2016", @@ -265,7 +265,7 @@ }, { "Input": "سوف أعود 11/12, 16", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "11/12, 16", @@ -277,7 +277,7 @@ }, { "Input": "سأعود في أول يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أول يناير", @@ -289,7 +289,7 @@ }, { "Input": "سأعود في 1 كانون الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1 كانون الثاني", @@ -301,7 +301,7 @@ }, { "Input": "سأعود في 28-نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "28-نوفمبر", @@ -313,7 +313,7 @@ }, { "Input": "سأعود الأربعاء ، 22 يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأربعاء ، 22 يناير", @@ -325,7 +325,7 @@ }, { "Input": "سأعود أول يوم جمعة من يوليو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أول يوم جمعة من يوليو", @@ -337,7 +337,7 @@ }, { "Input": "سأعود أول يوم جمعة في هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أول يوم جمعة في هذا الشهر", @@ -349,7 +349,7 @@ }, { "Input": "سأعود بعد أسبوعين من الآن", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد أسبوعين من الآن", @@ -361,7 +361,7 @@ }, { "Input": "سأعود الأسبوع القادم يوم الجمعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع القادم يوم الجمعة", @@ -373,7 +373,7 @@ }, { "Input": "سأعود يوم الجمعة الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة الأسبوع المقبل", @@ -385,7 +385,7 @@ }, { "Input": "الاثنين الماضي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الاثنين الماضي", @@ -397,7 +397,7 @@ }, { "Input": "سأعود يوم الثلاثاء.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء", @@ -409,7 +409,7 @@ }, { "Input": "سأعود يوم الثلاثاء. أخبار جيدة.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء", @@ -421,7 +421,7 @@ }, { "Input": "سأعود يوم الثلاثاء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء", @@ -433,7 +433,7 @@ }, { "Input": "سأعود يوم الجمعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة", @@ -445,7 +445,7 @@ }, { "Input": "سأعود الجمعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة", @@ -457,7 +457,7 @@ }, { "Input": "سأعود هذا اليوم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم", @@ -469,7 +469,7 @@ }, { "Input": "سأعود غداً", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "غداً", @@ -481,7 +481,7 @@ }, { "Input": "سأعود بالأمس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأمس", @@ -493,7 +493,7 @@ }, { "Input": "سأعود قبل يوم أمس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "قبل يوم أمس", @@ -505,7 +505,7 @@ }, { "Input": "سأعود بعد غد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد غد", @@ -517,7 +517,7 @@ }, { "Input": "سأعود في اليوم الآتي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم الآتي", @@ -529,7 +529,7 @@ }, { "Input": "سأعود في اليوم التالي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم التالي", @@ -541,7 +541,7 @@ }, { "Input": "سأعود هذا يوم الجمعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا يوم الجمعة", @@ -553,7 +553,7 @@ }, { "Input": "سأعود يوم الأحد القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد القادم", @@ -565,7 +565,7 @@ }, { "Input": "سأعود يوم الأحد الماضي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الماضي", @@ -577,7 +577,7 @@ }, { "Input": "سأعود في آخر يوم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آخر يوم", @@ -589,7 +589,7 @@ }, { "Input": "سأعود في اليوم الأخير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم الأخير", @@ -601,7 +601,7 @@ }, { "Input": "سأعود اليوم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم", @@ -613,7 +613,7 @@ }, { "Input": "سأعود هذا الأسبوع الجمعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا الأسبوع الجمعة", @@ -625,7 +625,7 @@ }, { "Input": "سأعود الأسبوع القادم الأحد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع القادم الأحد", @@ -637,7 +637,7 @@ }, { "Input": "سأعود الأسبوع الماضي الأحد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الماضي الأحد", @@ -649,7 +649,7 @@ }, { "Input": "سأعود 15 يونيو 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "15 يونيو 2016", @@ -661,7 +661,7 @@ }, { "Input": "البيسبول على مايو الحادي عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مايو الحادي عشر", @@ -673,7 +673,7 @@ }, { "Input": "سأرجع الرابع من مايو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الرابع من مايو", @@ -685,7 +685,7 @@ }, { "Input": "سأرجع في الرابع من مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الرابع من مارس", @@ -697,7 +697,7 @@ }, { "Input": "سأعود يناير الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يناير الأول", @@ -709,7 +709,7 @@ }, { "Input": "سأعود في الحادي والعشرين من مايو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الحادي والعشرين من مايو", @@ -721,7 +721,7 @@ }, { "Input": "سأعود مايو الحادي والعشرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مايو الحادي والعشرين", @@ -733,7 +733,7 @@ }, { "Input": "سأعود الثاني من أغسطس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثاني من أغسطس", @@ -745,7 +745,7 @@ }, { "Input": "سأعود الثاني والعشرين من يونيو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثاني والعشرين من يونيو", @@ -757,7 +757,7 @@ }, { "Input": "لقد عدت قبل شهرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "قبل شهرين", @@ -781,7 +781,7 @@ }, { "Input": "من الذي راسلته عبر البريد الإلكتروني قبل شهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "قبل شهر", @@ -793,7 +793,7 @@ }, { "Input": "عدت إلى 27", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "إلى 27", @@ -805,7 +805,7 @@ }, { "Input": "عدت في يوم 27", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم 27", @@ -817,7 +817,7 @@ }, { "Input": "عدت إلى 27.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "إلى 27", @@ -829,7 +829,7 @@ }, { "Input": "عدت في 27!", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "27", @@ -841,7 +841,7 @@ }, { "Input": "عدت في 27.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "27", @@ -853,7 +853,7 @@ }, { "Input": "عدت إلى الحادي والعشرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "إلى الحادي والعشرين", @@ -865,7 +865,7 @@ }, { "Input": "عدت للثانية والعشرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "للثانية والعشرين", @@ -877,7 +877,7 @@ }, { "Input": "عدت للثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "للثاني", @@ -889,7 +889,7 @@ }, { "Input": "عدت للثاني والعشرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "للثاني والعشرين", @@ -901,7 +901,7 @@ }, { "Input": "عدت للحادية والثلاثين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "للحادية والثلاثين", @@ -913,7 +913,7 @@ }, { "Input": "عدت يوم 27", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم 27", @@ -925,7 +925,7 @@ }, { "Input": "عدت يوم 21", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم 21", @@ -937,7 +937,7 @@ }, { "Input": "عدت في 22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22", @@ -949,7 +949,7 @@ }, { "Input": "عدت في الثاني!", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثاني", @@ -961,7 +961,7 @@ }, { "Input": "عدت في الثاني والعشرين!", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثاني والعشرين", @@ -973,22 +973,22 @@ }, { "Input": "الجائزة الأولى", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "سأذهب إلى الطابق الـ27", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "فعاليات تذكارية بمناسبة الذكرى الخامسة والعشرين للعلاقات الدبلوماسية بين سنغافورة والصين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "الحصول على تذاكر لتجربة الباب السابع عشر المسكونة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { @@ -996,7 +996,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السبت الثاني", @@ -1011,7 +1011,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأربعاء 27", @@ -1026,7 +1026,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الخميس في 21", @@ -1041,7 +1041,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة في 22", @@ -1056,7 +1056,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السبت في 23", @@ -1071,7 +1071,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة 15", @@ -1086,7 +1086,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الخميس في الحادية والعشرين", @@ -1101,7 +1101,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة في الثانية والعشرين", @@ -1116,7 +1116,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة في الخمسة عشر", @@ -1131,7 +1131,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الخميس في السابع", @@ -1143,7 +1143,7 @@ }, { "Input": "سأعود يوم الأحد الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الثاني", @@ -1155,7 +1155,7 @@ }, { "Input": "سأعود يوم الأحد الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الأول", @@ -1167,7 +1167,7 @@ }, { "Input": "سأعود الثلاثاء الثالث", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء الثالث", @@ -1179,7 +1179,7 @@ }, { "Input": "سأعود يوم الأحد الخامس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الخامس", @@ -1191,7 +1191,7 @@ }, { "Input": "سأعود يوم الأحد السادس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد", @@ -1203,7 +1203,7 @@ }, { "Input": "سأعود يوم الاثنين العاشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الاثنين", @@ -1215,7 +1215,7 @@ }, { "Input": "سأعود في 20 من الشهر القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20 من الشهر القادم", @@ -1227,7 +1227,7 @@ }, { "Input": "سأعود في 31 من هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "31 من هذا الشهر", @@ -1239,7 +1239,7 @@ }, { "Input": "قد تحاول كورتانا ترتيب مكالمة سكايب إما يوم الجمعة هذا الأسبوع أو الثلاثاء من الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة هذا الأسبوع", @@ -1257,7 +1257,7 @@ }, { "Input": "قد تحاول كورتانا ترتيب مكالمة سكايب إما يوم الجمعة من هذا الأسبوع أو هذا الأسبوع يوم السبت", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة من هذا الأسبوع", @@ -1275,7 +1275,7 @@ }, { "Input": " 2016. نوفمبر .16", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016. نوفمبر .16", @@ -1287,7 +1287,7 @@ }, { "Input": "كان لدينا اجتماع 1 شهر و 21 يوم من الآن", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1 شهر و 21 يوم من الآن", @@ -1299,7 +1299,7 @@ }, { "Input": "غادرت هنا 2 عام و شهر و 21 يوم من الآن", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 عام و شهر و 21 يوم من الآن", @@ -1311,7 +1311,7 @@ }, { "Input": "سأعيش هنا 2 عام و 21 يوم من الآن", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 عام و 21 يوم من الآن", @@ -1323,7 +1323,7 @@ }, { "Input": "غادرت هنا 2 سنة 1 شهر 21 يوم من الآن", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 سنة 1 شهر 21 يوم من الآن", @@ -1335,7 +1335,7 @@ }, { "Input": "غادرت هنا في العشرين من الشهر المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العشرين من الشهر المقبل", @@ -1347,7 +1347,7 @@ }, { "Input": "غادرت هنا في 5 ديسمبر 1391", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "5 ديسمبر 1391", @@ -1383,7 +1383,7 @@ }, { "Input": "في سبتمبر الحادي والعشرين من ألف وتسعمائة وثمانية وسبعون", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبتمبر الحادي والعشرين من ألف وتسعمائة وثمانية وسبعون", @@ -1395,7 +1395,7 @@ }, { "Input": "في سبتمبر 10, ألف وتسعمائة وواحد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبتمبر 10, ألف وتسعمائة وواحد", @@ -1407,7 +1407,7 @@ }, { "Input": "في العاشر من سبتمبر ، ألفين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العاشر من سبتمبر ، ألفين", diff --git a/Specs/DateTime/Arabic/DateParser.json b/Specs/DateTime/Arabic/DateParser.json index 31354419ed..23e18cd107 100644 --- a/Specs/DateTime/Arabic/DateParser.json +++ b/Specs/DateTime/Arabic/DateParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "15", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 أكتوبر", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 يناير 2016", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الاثنين 12 يناير 2016", @@ -172,7 +172,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016/02/22", @@ -196,7 +196,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016/04/21", @@ -245,7 +245,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "21-04-2016", @@ -269,7 +269,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4.22", @@ -293,7 +293,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22-4", @@ -317,7 +317,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4.22", @@ -341,7 +341,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22-4", @@ -365,7 +365,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4/22", @@ -389,7 +389,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "04/22", @@ -413,7 +413,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4/22", @@ -437,7 +437,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22/04", @@ -461,7 +461,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015/08/12", @@ -485,7 +485,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "08/12, 2015", @@ -509,7 +509,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "08/12, 15", @@ -533,7 +533,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1 يناير", @@ -557,7 +557,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يناير-1", @@ -581,7 +581,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأربعاء , 22 يناير", @@ -780,7 +780,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم", @@ -805,7 +805,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "غداً", @@ -830,7 +830,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأمس", @@ -1004,7 +1004,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد القادم", @@ -1028,7 +1028,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الماضي", @@ -1077,7 +1077,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع القادم الأحد", @@ -1101,7 +1101,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الماضي الأحد", @@ -1175,7 +1175,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم", @@ -1199,7 +1199,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "15 يونيو 2016", @@ -1273,7 +1273,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع المقبل يوم الجمعة", @@ -1322,7 +1322,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يومي", @@ -1346,7 +1346,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم", @@ -1920,7 +1920,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8200463+08:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الثاني", @@ -1944,7 +1944,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8200463+08:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الأول", @@ -1968,7 +1968,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8210454+08:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء الثالث", @@ -1992,7 +1992,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8225493+08:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأحد الخامس", @@ -2065,7 +2065,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 يناير 2018", @@ -2089,7 +2089,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "18-9-15", @@ -2163,7 +2163,7 @@ "Context": { "ReferenceDateTime": "2016-11-14T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "16. نوفمبر. 2016", @@ -2362,7 +2362,7 @@ "Context": { "ReferenceDateTime": "2017-12-18T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "5 ديسمبر 1391", @@ -2483,7 +2483,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العاشر من سبتمبر ، ألفين", @@ -2501,5 +2501,47 @@ } } ] + }, + { + "Input": "12/05/2021", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "12/05/2021", + "Start": 0, + "Length": 10, + "Type": "date", + "Value": { + "Timex": "2021-05-12", + "FutureResolution": { + "date": "2021-05-12" + }, + "PastResolution": { + "date": "2021-05-12" + } + } + } + ] + }, + { + "Input": "11/03/2009", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "11/03/2009", + "Start": 0, + "Length": 10, + "Type": "date", + "Value": { + "Timex": "2009-03-11", + "FutureResolution": { + "date": "2009-03-11" + }, + "PastResolution": { + "date": "2009-03-11" + } + } + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Arabic/DatePeriodExtractor.json b/Specs/DateTime/Arabic/DatePeriodExtractor.json index 57735628a0..0f61b0558c 100644 --- a/Specs/DateTime/Arabic/DatePeriodExtractor.json +++ b/Specs/DateTime/Arabic/DatePeriodExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "سأخرج في يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يناير", @@ -13,7 +13,7 @@ }, { "Input": "سأخرج هذا يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا يناير", @@ -25,7 +25,7 @@ }, { "Input": "سأخرج شهر يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر يناير", @@ -37,7 +37,7 @@ }, { "Input": "سأخرج في شهر يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر يناير", @@ -49,7 +49,7 @@ }, { "Input": "لقد فاتني يناير 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يناير 2001", @@ -61,7 +61,7 @@ }, { "Input": "لقد فاتني يناير, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يناير, 2001", @@ -73,7 +73,7 @@ }, { "Input": "سأخرج في فبراير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "فبراير", @@ -85,7 +85,7 @@ }, { "Input": "سأخرج هذا فبراير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا فبراير", @@ -97,7 +97,7 @@ }, { "Input": "سأخرج شهر فبراير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر فبراير", @@ -109,7 +109,7 @@ }, { "Input": "سأخرج في شهر فبراير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر فبراير", @@ -121,7 +121,7 @@ }, { "Input": "لقد فاتني فبراير 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "فبراير 2001", @@ -133,7 +133,7 @@ }, { "Input": "لقد فاتني فبراير, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "فبراير, 2001", @@ -145,7 +145,7 @@ }, { "Input": "سأخرج في مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مارس", @@ -157,7 +157,7 @@ }, { "Input": "سأخرج هذا مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا مارس", @@ -169,7 +169,7 @@ }, { "Input": "سأخرج شهر مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر مارس", @@ -181,7 +181,7 @@ }, { "Input": "سأخرج في شهر مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر مارس", @@ -193,7 +193,7 @@ }, { "Input": "لقد فاتني مارس 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مارس 2001", @@ -205,7 +205,7 @@ }, { "Input": "لقد فاتني مارس, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مارس, 2001", @@ -217,7 +217,7 @@ }, { "Input": "سأخرج في أبريل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أبريل", @@ -229,7 +229,7 @@ }, { "Input": "سأخرج هذا أبريل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا أبريل", @@ -241,7 +241,7 @@ }, { "Input": "سأخرج شهر أبريل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أبريل", @@ -253,7 +253,7 @@ }, { "Input": "سأخرج في شهر أبريل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أبريل", @@ -265,7 +265,7 @@ }, { "Input": "لقد فاتني أبريل 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أبريل 2001", @@ -277,7 +277,7 @@ }, { "Input": "لقد فاتني أبريل, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أبريل, 2001", @@ -289,7 +289,7 @@ }, { "Input": "سأخرج في مايو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مايو", @@ -301,7 +301,7 @@ }, { "Input": "سأخرج هذا مايو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا مايو", @@ -313,7 +313,7 @@ }, { "Input": "سأخرج شهر مايو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر مايو", @@ -325,7 +325,7 @@ }, { "Input": "سأخرج في شهر مايو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر مايو", @@ -337,7 +337,7 @@ }, { "Input": "لقد فاتني مايو 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مايو 2001", @@ -349,7 +349,7 @@ }, { "Input": "لقد فاتني مايو, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مايو, 2001", @@ -361,7 +361,7 @@ }, { "Input": "سأخرج في يونيو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو", @@ -373,7 +373,7 @@ }, { "Input": "سأخرج هذا يونيو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا يونيو", @@ -385,7 +385,7 @@ }, { "Input": "سأخرج شهر يونيو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر يونيو", @@ -397,7 +397,7 @@ }, { "Input": "سأخرج في شهر يونيو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر يونيو", @@ -409,7 +409,7 @@ }, { "Input": "لقد فاتني يونيو 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو 2001", @@ -421,7 +421,7 @@ }, { "Input": "لقد فاتني يونيو, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو, 2001", @@ -433,7 +433,7 @@ }, { "Input": "سأخرج في يوليو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوليو", @@ -445,7 +445,7 @@ }, { "Input": "سأخرج هذا يوليو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا يوليو", @@ -457,7 +457,7 @@ }, { "Input": "سأخرج شهر يوليو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر يوليو", @@ -469,7 +469,7 @@ }, { "Input": "سأخرج في شهر يوليو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر يوليو", @@ -481,7 +481,7 @@ }, { "Input": "لقد فاتني يوليو 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوليو 2001", @@ -493,7 +493,7 @@ }, { "Input": "لقد فاتني يوليو, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوليو, 2001", @@ -505,7 +505,7 @@ }, { "Input": "سأخرج في أغسطس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أغسطس", @@ -517,7 +517,7 @@ }, { "Input": "سأخرج هذا أغسطس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا أغسطس", @@ -529,7 +529,7 @@ }, { "Input": "سأخرج شهر أغسطس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أغسطس", @@ -541,7 +541,7 @@ }, { "Input": "سأخرج في شهر أغسطس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أغسطس", @@ -553,7 +553,7 @@ }, { "Input": "لقد فاتني أغسطس 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أغسطس 2001", @@ -565,7 +565,7 @@ }, { "Input": "لقد فاتني أغسطس, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أغسطس, 2001", @@ -577,7 +577,7 @@ }, { "Input": "سأخرج في سبتمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبتمبر", @@ -589,7 +589,7 @@ }, { "Input": "سأخرج هذا سبتمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا سبتمبر", @@ -601,7 +601,7 @@ }, { "Input": "سأخرج شهر سبتمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر سبتمبر", @@ -613,7 +613,7 @@ }, { "Input": "سأخرج في شهر سبتمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر سبتمبر", @@ -625,7 +625,7 @@ }, { "Input": "لقد فاتني سبتمبر 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبتمبر 2001", @@ -637,7 +637,7 @@ }, { "Input": "لقد فاتني سبتمبر, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبتمبر, 2001", @@ -649,7 +649,7 @@ }, { "Input": "سأخرج في أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أكتوبر", @@ -661,7 +661,7 @@ }, { "Input": "سأخرج هذا أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا أكتوبر", @@ -673,7 +673,7 @@ }, { "Input": "سأخرج شهر أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أكتوبر", @@ -685,7 +685,7 @@ }, { "Input": "سأخرج في شهر أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أكتوبر", @@ -697,7 +697,7 @@ }, { "Input": "لقد فاتني أكتوبر 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أكتوبر 2001", @@ -709,7 +709,7 @@ }, { "Input": "لقد فاتني أكتوبر, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أكتوبر, 2001", @@ -721,7 +721,7 @@ }, { "Input": "سأخرج في نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نوفمبر", @@ -733,7 +733,7 @@ }, { "Input": "سأخرج هذا نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا نوفمبر", @@ -745,7 +745,7 @@ }, { "Input": "سأخرج شهر نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر نوفمبر", @@ -757,7 +757,7 @@ }, { "Input": "سأخرج في شهر نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر نوفمبر", @@ -769,7 +769,7 @@ }, { "Input": "لقد فاتني نوفمبر 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نوفمبر 2001", @@ -781,7 +781,7 @@ }, { "Input": "لقد فاتني نوفمبر, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نوفمبر, 2001", @@ -793,7 +793,7 @@ }, { "Input": "سأخرج في ديسمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ديسمبر", @@ -805,7 +805,7 @@ }, { "Input": "سأخرج هذا ديسمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا ديسمبر", @@ -817,7 +817,7 @@ }, { "Input": "سأخرج شهر ديسمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر ديسمبر", @@ -829,7 +829,7 @@ }, { "Input": "سأخرج في شهر ديسمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر ديسمبر", @@ -841,7 +841,7 @@ }, { "Input": "لقد فاتني ديسمبر 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ديسمبر 2001", @@ -853,7 +853,7 @@ }, { "Input": "لقد فاتني ديسمبر, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ديسمبر, 2001", @@ -865,7 +865,7 @@ }, { "Input": "سأخرج في كانون الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "كانون الثاني", @@ -877,7 +877,7 @@ }, { "Input": "سأخرج هذا شهر كانون الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا شهر كانون الثاني", @@ -889,7 +889,7 @@ }, { "Input": "سأخرج شهر كانون الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كانون الثاني", @@ -901,7 +901,7 @@ }, { "Input": "سأخرج في شهر كانون الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كانون الثاني", @@ -913,7 +913,7 @@ }, { "Input": "لقد فاتني كانون الثاني 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "كانون الثاني 2001", @@ -925,7 +925,7 @@ }, { "Input": "لقد فاتني كانون الثاني, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "كانون الثاني, 2001", @@ -937,7 +937,7 @@ }, { "Input": "سأخرج في شباط", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شباط", @@ -949,7 +949,7 @@ }, { "Input": "سأخرج هذا شباط", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا شباط", @@ -961,7 +961,7 @@ }, { "Input": "سأخرج شهر شباط", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر شباط", @@ -973,7 +973,7 @@ }, { "Input": "سأخرج في شهر شباط", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر شباط", @@ -985,7 +985,7 @@ }, { "Input": "لقد فاتني شباط 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شباط 2001", @@ -997,7 +997,7 @@ }, { "Input": "لقد فاتني شباط, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شباط, 2001", @@ -1009,7 +1009,7 @@ }, { "Input": "سأخرج في آذار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آذار", @@ -1021,7 +1021,7 @@ }, { "Input": "سأخرج هذا شهر آذار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا شهر آذار", @@ -1033,7 +1033,7 @@ }, { "Input": "سأخرج شهر آذار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر آذار", @@ -1045,7 +1045,7 @@ }, { "Input": "سأخرج في شهر آذار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر آذار", @@ -1057,7 +1057,7 @@ }, { "Input": "لقد فاتني آذار 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آذار 2001", @@ -1069,7 +1069,7 @@ }, { "Input": "لقد فاتني آذار, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آذار, 2001", @@ -1081,7 +1081,7 @@ }, { "Input": "سأخرج في نيسان", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نيسان", @@ -1093,7 +1093,7 @@ }, { "Input": "سأخرج هذا نيسان ", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا نيسان", @@ -1105,7 +1105,7 @@ }, { "Input": "سأخرج شهر نيسان", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر نيسان", @@ -1117,7 +1117,7 @@ }, { "Input": "سأخرج في شهر نيسان", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر نيسان", @@ -1129,7 +1129,7 @@ }, { "Input": "لقد فاتني نيسان 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نيسان 2001", @@ -1141,7 +1141,7 @@ }, { "Input": "لقد فاتني نيسان, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نيسان, 2001", @@ -1153,7 +1153,7 @@ }, { "Input": "سأخرج في حزيران", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "حزيران", @@ -1165,7 +1165,7 @@ }, { "Input": "سأخرج هذا حزيران", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا حزيران", @@ -1177,7 +1177,7 @@ }, { "Input": "سأخرج شهر حزيران", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر حزيران", @@ -1189,7 +1189,7 @@ }, { "Input": "سأخرج في شهر حزيران", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر حزيران", @@ -1201,7 +1201,7 @@ }, { "Input": "لقد فاتني حزيران 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "حزيران 2001", @@ -1213,7 +1213,7 @@ }, { "Input": "لقد فاتني حزيران, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "حزيران, 2001", @@ -1225,7 +1225,7 @@ }, { "Input": "سأخرج في تموز", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تموز", @@ -1237,7 +1237,7 @@ }, { "Input": "سأخرج هذا تموز", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا تموز", @@ -1249,7 +1249,7 @@ }, { "Input": "سأخرج شهر تموز", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر تموز", @@ -1261,7 +1261,7 @@ }, { "Input": "سأخرج في شهر تموز", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر تموز", @@ -1273,7 +1273,7 @@ }, { "Input": "لقد فاتني تموز 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تموز 2001", @@ -1285,7 +1285,7 @@ }, { "Input": "لقد فاتني تموز, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تموز, 2001", @@ -1297,7 +1297,7 @@ }, { "Input": "سأخرج في آب", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آب", @@ -1309,7 +1309,7 @@ }, { "Input": "سأخرج هذا آب", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا آب", @@ -1321,7 +1321,7 @@ }, { "Input": "سأخرج شهر آب", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر آب", @@ -1333,7 +1333,7 @@ }, { "Input": "سأخرج في شهر آب", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر آب", @@ -1345,7 +1345,7 @@ }, { "Input": "لقد فاتني آب 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آب 2001", @@ -1357,7 +1357,7 @@ }, { "Input": "لقد فاتني آب, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آب, 2001", @@ -1369,7 +1369,7 @@ }, { "Input": "سأخرج في أيلول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أيلول", @@ -1381,7 +1381,7 @@ }, { "Input": "سأخرج هذا أيلول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا أيلول", @@ -1393,7 +1393,7 @@ }, { "Input": "سأخرج شهر أيلول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أيلول", @@ -1405,7 +1405,7 @@ }, { "Input": "سأخرج في شهر أيلول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أيلول", @@ -1417,7 +1417,7 @@ }, { "Input": "لقد فاتني أيلول 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أيلول 2001", @@ -1429,7 +1429,7 @@ }, { "Input": "لقد فاتني أيلول, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أيلول, 2001", @@ -1441,7 +1441,7 @@ }, { "Input": "سأخرج في تشرين الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الأول", @@ -1453,7 +1453,7 @@ }, { "Input": "سأخرج هذا تشرين الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا تشرين الأول", @@ -1465,7 +1465,7 @@ }, { "Input": "سأخرج شهر تشرين الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر تشرين الأول", @@ -1477,7 +1477,7 @@ }, { "Input": "سأخرج في شهر تشرين الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر تشرين الأول", @@ -1489,7 +1489,7 @@ }, { "Input": "لقد فاتني تشرين الأول 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الأول 2001", @@ -1501,7 +1501,7 @@ }, { "Input": "لقد فاتني تشرين الأول, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الأول, 2001", @@ -1513,7 +1513,7 @@ }, { "Input": "سأخرج في تشرين الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الثاني", @@ -1525,7 +1525,7 @@ }, { "Input": "سأخرج هذا تشرين الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا تشرين الثاني", @@ -1537,7 +1537,7 @@ }, { "Input": "سأخرج شهر تشرين الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر تشرين الثاني", @@ -1549,7 +1549,7 @@ }, { "Input": "سأخرج في شهر تشرين الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر تشرين الثاني", @@ -1561,7 +1561,7 @@ }, { "Input": "لقد فاتني تشرين الثاني 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الثاني 2001", @@ -1573,7 +1573,7 @@ }, { "Input": "لقد فاتني تشرين الثاني, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الثاني, 2001", @@ -1585,7 +1585,7 @@ }, { "Input": "سأخرج في كانون الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "كانون الأول", @@ -1597,7 +1597,7 @@ }, { "Input": "سأخرج هذا كانون الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا كانون الأول", @@ -1609,7 +1609,7 @@ }, { "Input": "سأخرج شهر كانون الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كانون الأول", @@ -1621,7 +1621,7 @@ }, { "Input": "سأخرج في شهر كانون الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كانون الأول", @@ -1633,7 +1633,7 @@ }, { "Input": "لقد فاتني كانون الأول 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "كانون الأول 2001", @@ -1645,7 +1645,7 @@ }, { "Input": "لقد فاتني كانون الأول, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "كانون الأول, 2001", @@ -1657,7 +1657,7 @@ }, { "Input": "تقويم شهر سبتمبر.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر سبتمبر", @@ -1669,7 +1669,7 @@ }, { "Input": "سأخرج من 4 إلى 22 هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 4 إلى 22 هذا الشهر", @@ -1681,7 +1681,7 @@ }, { "Input": "سأخرج من 4 إلى 23 في الشهر المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 4 إلى 23 في الشهر المقبل", @@ -1693,7 +1693,7 @@ }, { "Input": "سأخرج من 3 حتى 12 سبتمبر هاهاها", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 3 حتى 12 سبتمبر", @@ -1705,7 +1705,7 @@ }, { "Input": "سأخرج من 4 إلى 23 الشهر المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 4 إلى 23 الشهر المقبل", @@ -1717,7 +1717,7 @@ }, { "Input": "سأكون خارج 4 حتى 23 من هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4 حتى 23 من هذا الشهر", @@ -1729,7 +1729,7 @@ }, { "Input": "سأخرج ما بين 4 و 22 هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 4 و 22 هذا الشهر", @@ -1741,7 +1741,7 @@ }, { "Input": "سأخرج بين 3 و 12 سبتمبر هاهاها", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 3 و 12 سبتمبر", @@ -1765,7 +1765,7 @@ }, { "Input": "سأخرج بين 15 و 19 نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 15 و 19 نوفمبر", @@ -1777,7 +1777,7 @@ }, { "Input": "سأخرج بين 15 و 19 تشرين الثاني ", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 15 و 19 تشرين الثاني", @@ -1789,7 +1789,7 @@ }, { "Input": "سأخرج بين الخامس عشر والتاسع عشر من نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين الخامس عشر والتاسع عشر من نوفمبر", @@ -1801,7 +1801,7 @@ }, { "Input": "سأخرج من 4 إلى 22 يناير 2017", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 4 إلى 22 يناير 2017", @@ -1813,7 +1813,7 @@ }, { "Input": "سأخرج في الفترة ما بين 4-22 يناير 2017", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 4-22 يناير 2017", @@ -1825,7 +1825,7 @@ }, { "Input": "سأخرج في هذا الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا الأسبوع", @@ -1837,7 +1837,7 @@ }, { "Input": "سأخرج الأسبوع القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع القادم", @@ -1849,7 +1849,7 @@ }, { "Input": "سأخرج سبتمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبتمبر", @@ -1873,7 +1873,7 @@ }, { "Input": "سأخرج في يونيو القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو القادم", @@ -1885,7 +1885,7 @@ }, { "Input": "سأخرج في يونيو 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو 2016", @@ -1897,7 +1897,7 @@ }, { "Input": "سأخرج يونيو العام المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو العام المقبل", @@ -1909,7 +1909,7 @@ }, { "Input": "سأخرج في عطلة نهاية الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عطلة نهاية الأسبوع", @@ -1921,7 +1921,7 @@ }, { "Input": "سأخرج الأسبوع الثالث من هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الثالث من هذا الشهر", @@ -1933,7 +1933,7 @@ }, { "Input": "سأخرج الأسبوع الأخير من شهر يوليو", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الأخير من شهر يوليو", @@ -1945,7 +1945,7 @@ }, { "Input": "جدولة التخييم ليوم الجمعة حتى الأحد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة حتى الأحد", @@ -1969,7 +1969,7 @@ }, { "Input": "سأخرج في الأشهر 3 القادمة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الأشهر 3 القادمة", @@ -1981,7 +1981,7 @@ }, { "Input": "سأخرج بعد 3 سنوات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد 3 سنوات", @@ -1993,7 +1993,7 @@ }, { "Input": "سأخرج في 3 سنوات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في 3 سنوات", @@ -2005,7 +2005,7 @@ }, { "Input": "سأخرج بعد 3 أسابيع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد 3 أسابيع", @@ -2017,7 +2017,7 @@ }, { "Input": "سأخرج في 3 أشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في 3 أشهر", @@ -2041,7 +2041,7 @@ }, { "Input": "سأخرج آخر 3 سنوات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "آخر 3 سنوات", @@ -2053,7 +2053,7 @@ }, { "Input": "سأخرج العام الماضي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العام الماضي", @@ -2065,7 +2065,7 @@ }, { "Input": "سأخرج الشهر الماضي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الشهر الماضي", @@ -2125,7 +2125,7 @@ }, { "Input": "سأخرج في 12 يناير, 2016 - 2016/02/22", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 يناير, 2016 - 2016/02/22", @@ -2137,7 +2137,7 @@ }, { "Input": "سأخرج في الأول من يناير حتى الأربعاء ، 22 يناير", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأول من يناير حتى الأربعاء ، 22 يناير", @@ -2149,7 +2149,7 @@ }, { "Input": "سأخرج اليوم حتى الغد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم حتى الغد", @@ -2161,7 +2161,7 @@ }, { "Input": "سأخرج اليوم حتى 22 أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم حتى 22 أكتوبر", @@ -2173,7 +2173,7 @@ }, { "Input": "سأخرج في 2 أكتوبر حتى بعد غد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 أكتوبر حتى بعد غد", @@ -2185,7 +2185,7 @@ }, { "Input": "سأخرج اليوم حتى الأحد المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم حتى الأحد المقبل", @@ -2197,7 +2197,7 @@ }, { "Input": "سأخرج يوم الجمعة حتى الأحد القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة حتى الأحد القادم", @@ -2221,7 +2221,7 @@ }, { "Input": "سأخرج من 2015/08/12 حتى 22 أكتوبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015/08/12 حتى 22 أكتوبر", @@ -2233,7 +2233,7 @@ }, { "Input": "سأخرج من يوم الجمعة في الثاني حتى يوم الثلاثاء في السادس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة في الثاني حتى يوم الثلاثاء في السادس", @@ -2245,7 +2245,7 @@ }, { "Input": "سأخرج من اليوم حتى الغد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم حتى الغد", @@ -2257,7 +2257,7 @@ }, { "Input": "سأخرج من يوم الجمعة حتى الأحد القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الجمعة حتى الأحد القادم", @@ -2281,7 +2281,7 @@ }, { "Input": "سأخرج 19-20 نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "19-20 نوفمبر", @@ -2293,7 +2293,7 @@ }, { "Input": "سأخرج من 19 إلى 20 نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 19 إلى 20 نوفمبر", @@ -2305,7 +2305,7 @@ }, { "Input": "سأخرج شهر نوفمبر بين 19 و 20", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر نوفمبر بين 19 و 20", @@ -2317,7 +2317,7 @@ }, { "Input": "سأخرج في الربع الثالث من عام 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربع الثالث من عام 2016", @@ -2329,7 +2329,7 @@ }, { "Input": "سأخرج في الربع الثالث من هذا العام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربع الثالث من هذا العام", @@ -2341,7 +2341,7 @@ }, { "Input": "سأخرج 2016 الربع الثالث", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016 الربع الثالث", @@ -2353,7 +2353,7 @@ }, { "Input": "سأخرج 2015.3", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015.3", @@ -2365,7 +2365,7 @@ }, { "Input": "سأخرج 3-2015 ", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3-2015", @@ -2377,7 +2377,7 @@ }, { "Input": "سأخرج 2015/3", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015/3", @@ -2389,7 +2389,7 @@ }, { "Input": "سأخرج 3/2015", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3/2015", @@ -2401,7 +2401,7 @@ }, { "Input": "سأخرج الأسبوع الثالث من عام 2027", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الثالث من عام 2027", @@ -2413,7 +2413,7 @@ }, { "Input": "سأخرج الأسبوع الثالث العام المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الثالث العام المقبل", @@ -2425,7 +2425,7 @@ }, { "Input": "سأرحل هذا الصيف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا الصيف", @@ -2437,7 +2437,7 @@ }, { "Input": "سأرحل الربيع القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربيع القادم", @@ -2449,7 +2449,7 @@ }, { "Input": "سأرحل الصيف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الصيف", @@ -2461,7 +2461,7 @@ }, { "Input": "سأرحل صيف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "صيف", @@ -2473,7 +2473,7 @@ }, { "Input": "سأرحل صيف 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "صيف 2016", @@ -2485,7 +2485,7 @@ }, { "Input": "سأرحل الصيف 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الصيف 2016", @@ -2497,7 +2497,7 @@ }, { "Input": "عطلات الشهر القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الشهر القادم", @@ -2509,7 +2509,7 @@ }, { "Input": "عطلة الشهر المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الشهر المقبل", @@ -2521,7 +2521,7 @@ }, { "Input": "ماذا لدي أسبوع 30 نوفمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع 30 نوفمبر", @@ -2545,7 +2545,7 @@ }, { "Input": "أسبوع 15 سبتمبر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع 15 سبتمبر", @@ -2557,7 +2557,7 @@ }, { "Input": "من شهر سبتمبر 15", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من شهر سبتمبر 15", @@ -2569,7 +2569,7 @@ }, { "Input": "سأغادر خلال عطلة نهاية الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عطلة نهاية الأسبوع", @@ -2581,7 +2581,7 @@ }, { "Input": "سأرحل باقي الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "باقي الأسبوع", @@ -2593,7 +2593,7 @@ }, { "Input": "سأرحل بقية أسبوعي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بقية أسبوعي", @@ -2605,7 +2605,7 @@ }, { "Input": "سأرحل بقية الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بقية الأسبوع", @@ -2617,7 +2617,7 @@ }, { "Input": "سأرحل نهاية الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نهاية الأسبوع", @@ -2629,7 +2629,7 @@ }, { "Input": "سأرحل بقية هذا الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بقية هذا الأسبوع", @@ -2641,7 +2641,7 @@ }, { "Input": "سأرحل نهاية الأسبوع الحالي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نهاية الأسبوع الحالي", @@ -2653,7 +2653,7 @@ }, { "Input": "سأرحل بقية الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بقية الشهر", @@ -2665,7 +2665,7 @@ }, { "Input": "سأرحل بقية العام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بقية العام", @@ -2677,7 +2677,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا في وقت لاحق هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت لاحق هذا الشهر", @@ -2689,7 +2689,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا في وقت لاحق من هذا الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت لاحق من هذا الأسبوع", @@ -2701,7 +2701,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا في أواخر الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أواخر الأسبوع المقبل", @@ -2713,7 +2713,7 @@ }, { "Input": "من فضلك حدد لنا وقتًا للقاء أواخر العام المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أواخر العام المقبل", @@ -2725,7 +2725,7 @@ }, { "Input": "التقينا أواخر الأسبوع الماضي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أواخر الأسبوع الماضي", @@ -2737,7 +2737,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا في وقت مبكر من هذا الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت مبكر من هذا الشهر", @@ -2749,7 +2749,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا وقت مبكر هذا الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت مبكر هذا الأسبوع", @@ -2761,7 +2761,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا مطلع الاسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مطلع الاسبوع المقبل", @@ -2773,7 +2773,7 @@ }, { "Input": "يرجى تحديد موعد لقاءنا مطلع العام المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مطلع العام المقبل", @@ -2833,7 +2833,7 @@ }, { "Input": "سأخرج عام 247", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عام 247", @@ -2845,7 +2845,7 @@ }, { "Input": "في السبعينيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السبعينيات", @@ -2857,7 +2857,7 @@ }, { "Input": "من مواليد ألفين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ألفين", @@ -2869,7 +2869,7 @@ }, { "Input": "في 1970", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1970", @@ -2881,7 +2881,7 @@ }, { "Input": "السبعينيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السبعينيات", @@ -2893,7 +2893,7 @@ }, { "Input": "سبعينيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سبعينيات", @@ -2905,7 +2905,7 @@ }, { "Input": "في الأربعينيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأربعينيات", @@ -2917,7 +2917,7 @@ }, { "Input": "من السبعينيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السبعينيات", @@ -2929,7 +2929,7 @@ }, { "Input": "في السبعينيات القرن التاسع عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السبعينيات القرن التاسع عشر", @@ -2941,7 +2941,7 @@ }, { "Input": "في الألفين والعشرات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الألفين والعشرات", @@ -2953,7 +2953,7 @@ }, { "Input": "في العشرينيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العشرينيات", @@ -2965,7 +2965,7 @@ }, { "Input": "في الألفين ", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الألفين", @@ -2977,7 +2977,7 @@ }, { "Input": "سأخرج من 2 إلى 7 فبراير ، ألفان وثمانية عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 2 إلى 7 فبراير ، ألفان وثمانية عشر", @@ -2989,7 +2989,7 @@ }, { "Input": "بين 2 و 7 فبراير ألفين وثمانية عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 2 و 7 فبراير ألفين وثمانية عشر", @@ -3001,7 +3001,7 @@ }, { "Input": "سأخرج ما بين 2-7 فبراير ألفين وثمانية عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 2-7 فبراير ألفين وثمانية عشر", @@ -3013,7 +3013,7 @@ }, { "Input": "حدث ذلك في يونيو من عام تسعة عشر تسعة وتسعون", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو من عام تسعة عشر تسعة وتسعون", @@ -3025,7 +3025,7 @@ }, { "Input": "تسعة عشر ثمانية وعشرون", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تسعة عشر ثمانية وعشرون", @@ -3037,7 +3037,7 @@ }, { "Input": "سأخرج الأسبوع الأول من عام ألفين وسبعة وعشرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الأول من عام ألفين وسبعة وعشرين", @@ -3049,7 +3049,7 @@ }, { "Input": "سأخرج في الربع الأول من عام ألفين وعشرين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربع الأول من عام ألفين وعشرين", @@ -3061,7 +3061,7 @@ }, { "Input": "في ربيع عام تسعة عشر وثمانية وسبعين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ربيع عام تسعة عشر وثمانية وسبعين", @@ -3073,7 +3073,7 @@ }, { "Input": "عام مائتين وسبعة وستين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عام مائتين وسبعة وستين", @@ -3085,7 +3085,7 @@ }, { "Input": "الاسبوع بعد القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الاسبوع بعد القادم", @@ -3097,7 +3097,7 @@ }, { "Input": "حدث ذلك العقدين الماضيين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العقدين الماضيين", @@ -3109,7 +3109,7 @@ }, { "Input": "حدث ذلك في العقدين الماضيين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العقدين الماضيين", @@ -3121,7 +3121,7 @@ }, { "Input": "حدث ذلك في العقد القادم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "العقد القادم", @@ -3133,7 +3133,7 @@ }, { "Input": "سيحدث بعد 4 أسابيع في المستقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد 4 أسابيع في المستقبل", @@ -3145,7 +3145,7 @@ }, { "Input": "سيحدث بعد يومين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد يومين", @@ -3157,7 +3157,7 @@ }, { "Input": "يمكن أن تجدنا كورتانا موعدًا بداية الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بداية الأسبوع المقبل", @@ -3169,7 +3169,7 @@ }, { "Input": "بالتأكيد ، لنبدأ سكايب نهاية الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نهاية الأسبوع المقبل", @@ -3181,7 +3181,7 @@ }, { "Input": "بالتأكيد ، لنبدأ سكايب بداية الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بداية الأسبوع المقبل", @@ -3193,7 +3193,7 @@ }, { "Input": "كورتانا ، تجد لنا الوقت نهاية شهر مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نهاية شهر مارس", @@ -3205,7 +3205,7 @@ }, { "Input": "كورتانا ، يرجى تحديد موعد لنا في منتصف الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في منتصف الأسبوع المقبل", @@ -3217,7 +3217,7 @@ }, { "Input": "يمكن أن يرتب لنا كورتانا لقاء منتصف مارس", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف مارس", @@ -3229,7 +3229,7 @@ }, { "Input": "ماذا عن منتصف الصيف؟", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف الصيف", @@ -3241,7 +3241,7 @@ }, { "Input": "يمكنني أن أجد لنا موعدًا بداية الأسبوع المقبل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بداية الأسبوع المقبل", @@ -3253,7 +3253,7 @@ }, { "Input": "سأخرج في أيار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أيار", @@ -3265,7 +3265,7 @@ }, { "Input": "سأخرج هذا أيار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "هذا أيار", @@ -3277,7 +3277,7 @@ }, { "Input": "سأخرج شهر أيار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أيار", @@ -3289,7 +3289,7 @@ }, { "Input": "سأخرج في شهر أيار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر أيار", @@ -3301,7 +3301,7 @@ }, { "Input": "لقد فاتني أيار 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أيار 2001", @@ -3313,7 +3313,7 @@ }, { "Input": "لقد فاتني أيار, 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أيار, 2001", @@ -3325,7 +3325,7 @@ }, { "Input": "سأخرج في محرم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "محرم", @@ -3337,7 +3337,7 @@ }, { "Input": "لقد فاتني محرم 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "محرم 2001", @@ -3349,7 +3349,7 @@ }, { "Input": "سأخرج في صفر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "صفر", @@ -3361,7 +3361,7 @@ }, { "Input": "لقد فاتني صفر 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "صفر 2001", @@ -3373,7 +3373,7 @@ }, { "Input": "سأخرج في ربيع الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ربيع الأول", @@ -3385,7 +3385,7 @@ }, { "Input": "لقد فاتني ربيع الأول 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ربيع الأول 2001", @@ -3397,7 +3397,7 @@ }, { "Input": "سأخرج في ربيع الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ربيع الثاني", @@ -3409,7 +3409,7 @@ }, { "Input": "لقد فاتني ربيع الثاني 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ربيع الثاني 2001", @@ -3421,7 +3421,7 @@ }, { "Input": "سأخرج في جمادى الأول", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "جمادى الأول", @@ -3433,7 +3433,7 @@ }, { "Input": "لقد فاتني جمادى الأول 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "جمادى الأول 2001", @@ -3445,7 +3445,7 @@ }, { "Input": "سأخرج في جمادى الثاني", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "جمادى الثاني", @@ -3457,7 +3457,7 @@ }, { "Input": "لقد فاتني جمادى الثاني 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "جمادى الثاني 2001", @@ -3469,7 +3469,7 @@ }, { "Input": "سأخرج في رجب", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "رجب", @@ -3481,7 +3481,7 @@ }, { "Input": "لقد فاتني رجب 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "رجب 2001", @@ -3493,7 +3493,7 @@ }, { "Input": "سأخرج في شعبان", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شعبان", @@ -3505,7 +3505,7 @@ }, { "Input": "لقد فاتني شعبان 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شعبان 2001", @@ -3517,7 +3517,7 @@ }, { "Input": "سأخرج في رمضان", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "رمضان", @@ -3529,7 +3529,7 @@ }, { "Input": "لقد فاتني رمضان 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "رمضان 2001", @@ -3541,7 +3541,7 @@ }, { "Input": "سأخرج في شوال", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شوال", @@ -3553,7 +3553,7 @@ }, { "Input": "لقد فاتني شوال 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شوال 2001", @@ -3565,7 +3565,7 @@ }, { "Input": "سأخرج في ذو القعدة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ذو القعدة", @@ -3577,7 +3577,7 @@ }, { "Input": "لقد فاتني ذو القعدة 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ذو القعدة 2001", @@ -3589,7 +3589,7 @@ }, { "Input": "سأخرج في ذو الحجة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ذو الحجة", @@ -3601,7 +3601,7 @@ }, { "Input": "لقد فاتني ذو الحجة 2001", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ذو الحجة 2001", @@ -3613,7 +3613,7 @@ }, { "Input": "سأخرج نوفمبر بين 15 و 19", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نوفمبر بين 15 و 19", @@ -3625,7 +3625,7 @@ }, { "Input": "سأخرج تشرين الثاني بين 15 و 19", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "تشرين الثاني بين 15 و 19", @@ -3637,7 +3637,7 @@ }, { "Input": "سأخرج نوفمبر بين الخامس عشر والتاسع عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نوفمبر بين الخامس عشر والتاسع عشر", @@ -3649,7 +3649,7 @@ }, { "Input": "يونايتد يسعى لإنهاء مهمته أمام روما | يلاكورة | 2021", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2021", diff --git a/Specs/DateTime/Arabic/DatePeriodParser.json b/Specs/DateTime/Arabic/DatePeriodParser.json index 881872e9ae..d66b70bc59 100644 --- a/Specs/DateTime/Arabic/DatePeriodParser.json +++ b/Specs/DateTime/Arabic/DatePeriodParser.json @@ -59,7 +59,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 3 حتى 12 سبتمبر", @@ -194,7 +194,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 3 و 12 سبتمبر", @@ -221,7 +221,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 4 إلى 22 يناير 1995", @@ -248,7 +248,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 4-22 يناير 1995", @@ -383,7 +383,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "فبراير", @@ -464,7 +464,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو القادم", @@ -572,7 +572,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من شهر سبتمبر 16", @@ -599,7 +599,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015.3", @@ -626,7 +626,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3-2015", @@ -653,7 +653,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015/3", @@ -680,7 +680,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3/2015", @@ -977,7 +977,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 يناير, 2016 - 2016/01/22", @@ -1031,7 +1031,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم حتى الغد", @@ -1139,7 +1139,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 19 إلى 20 نوفمبر", @@ -1490,7 +1490,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو 2016", @@ -1517,7 +1517,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يونيو العام المقبل", @@ -1814,7 +1814,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربع الثالث من عام 2016", @@ -1868,7 +1868,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربع الثالث 2016", @@ -1916,7 +1916,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الربيع القادم", @@ -1937,7 +1937,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الصيف", @@ -1958,7 +1958,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "صيف", @@ -1979,7 +1979,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الصيف 2016", @@ -2000,7 +2000,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "صيف 2016", @@ -3665,7 +3665,7 @@ "ReferenceDateTime": "2017-11-08T00:00:00" }, "IgnoreResolution": "false", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نهاية شهر مارس", diff --git a/Specs/DateTime/Arabic/DateTimeExtractor.json b/Specs/DateTime/Arabic/DateTimeExtractor.json index 1b45f91f73..6bd68500d4 100644 --- a/Specs/DateTime/Arabic/DateTimeExtractor.json +++ b/Specs/DateTime/Arabic/DateTimeExtractor.json @@ -379,7 +379,7 @@ { "Input": "سأعود 14 أكتوبر 8:00 ، 14 أكتوبر", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "14 أكتوبر 8:00", diff --git a/Specs/DateTime/Arabic/DateTimeModel.json b/Specs/DateTime/Arabic/DateTimeModel.json index 7091050bdb..c21d0a3048 100644 --- a/Specs/DateTime/Arabic/DateTimeModel.json +++ b/Specs/DateTime/Arabic/DateTimeModel.json @@ -413,7 +413,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2015-3", @@ -553,11 +553,11 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { - "Text": " الآن", - "Start": 5, + "Text": "الآن", + "Start": 6, "End": 9, "TypeName": "datetimeV2.datetime", "Resolution": { @@ -1167,7 +1167,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال الشهر", @@ -1744,7 +1744,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 ظهرا", @@ -1824,7 +1824,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين 5 و 6 بعد الظهر", @@ -1992,11 +1992,11 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { - "Text": " الآن", - "Start": 5, + "Text": "الآن", + "Start": 6, "End": 9, "TypeName": "datetimeV2.datetime", "Resolution": { diff --git a/Specs/DateTime/Arabic/DateTimeParser.json b/Specs/DateTime/Arabic/DateTimeParser.json index 089a53c74c..7b4217e555 100644 --- a/Specs/DateTime/Arabic/DateTimeParser.json +++ b/Specs/DateTime/Arabic/DateTimeParser.json @@ -6,7 +6,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الآن", @@ -500,7 +500,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 8 مساء اليوم", @@ -1280,7 +1280,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "6 يناير 2017-6:37 صباحًا", diff --git a/Specs/DateTime/Arabic/DateTimePeriodExtractor.json b/Specs/DateTime/Arabic/DateTimePeriodExtractor.json index b5aa4983b4..a25d6f6dff 100644 --- a/Specs/DateTime/Arabic/DateTimePeriodExtractor.json +++ b/Specs/DateTime/Arabic/DateTimePeriodExtractor.json @@ -2,7 +2,7 @@ { "Input": "سأخرج اليوم من الخامسة إلى السابعة", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم من الخامسة إلى السابعة", @@ -28,7 +28,7 @@ { "Input": "سأخرج من 5 إلى 6 الأحد القادم", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 5 إلى 6 الأحد القادم", @@ -41,7 +41,7 @@ { "Input": "سأخرج من الخامسة إلى السادسة مساء الأحد القادم", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من الخامسة إلى السادسة مساء الأحد القادم", @@ -340,7 +340,7 @@ { "Input": "سأعود بعد 3 دقائق", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد 3 دقائق", @@ -353,7 +353,7 @@ { "Input": "سأعود 3 دقائق السابقة", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق السابقة", @@ -366,7 +366,7 @@ { "Input": "سأعود بعد 5 ساعات", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد 5 ساعات", @@ -418,7 +418,7 @@ { "Input": "سأعود بعد عدة دقائق", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد عدة دقائق", @@ -431,7 +431,7 @@ { "Input": "سأعود الثلاثاء في الصباح", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء في الصباح", @@ -444,7 +444,7 @@ { "Input": "سأعود الثلاثاء بعد الظهر", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء بعد الظهر", @@ -457,7 +457,7 @@ { "Input": "سأعود الثلاثاء في المساء", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثلاثاء في المساء", @@ -470,7 +470,7 @@ { "Input": "دعونا نجتمع في الصباح الباكر الثلاثاء", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الصباح الباكر الثلاثاء", @@ -821,7 +821,7 @@ { "Input": "هل يمكنك تحديد موعد 9 ديسمبر بين الساعة 8 صباحًا و 2 مساءً؟", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "9 ديسمبر بين الساعة 8 صباحًا و 2 مساء", diff --git a/Specs/DateTime/Arabic/DateTimePeriodParser.json b/Specs/DateTime/Arabic/DateTimePeriodParser.json index be13df6109..fec49c0c02 100644 --- a/Specs/DateTime/Arabic/DateTimePeriodParser.json +++ b/Specs/DateTime/Arabic/DateTimePeriodParser.json @@ -6,7 +6,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم من الخامسة إلى السابعة", @@ -678,7 +678,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق السابقة", @@ -706,7 +706,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد 5 ساعات", @@ -1630,7 +1630,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "9 ديسمبر بين الساعة 8 صباحًا و 2 مساء", diff --git a/Specs/DateTime/Arabic/DurationExtractor.json b/Specs/DateTime/Arabic/DurationExtractor.json index 9475d607a2..8f06137428 100644 --- a/Specs/DateTime/Arabic/DurationExtractor.json +++ b/Specs/DateTime/Arabic/DurationExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "سأترك لمدة 3 ساعات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعات", @@ -13,7 +13,7 @@ }, { "Input": "سأغادر لمدة 3 أيام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 أيام", @@ -25,7 +25,7 @@ }, { "Input": "سأغادر لمدة 3.5 سنوات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3.5 سنوات", @@ -37,7 +37,7 @@ }, { "Input": "سأترك مدة 3 ساعات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعات", @@ -49,7 +49,7 @@ }, { "Input": "سأغادر لمدة 3 الساعات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 الساعات", @@ -61,7 +61,7 @@ }, { "Input": "سأغادر لمدة 3 ساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعة", @@ -73,7 +73,7 @@ }, { "Input": "سأغادر لمدة 3 ساعات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعات", @@ -85,7 +85,7 @@ }, { "Input": "سأغادر مدة 3 أيام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 أيام", @@ -97,7 +97,7 @@ }, { "Input": "سأغادر لمدة 3 أشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 أشهر", @@ -109,7 +109,7 @@ }, { "Input": "سأغادر لمدة 3 دقائق", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق", @@ -121,7 +121,7 @@ }, { "Input": "سأترك مدة 3 دقائق", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق", @@ -133,7 +133,7 @@ }, { "Input": "سأغادر لمدة 3.5 ثانية", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3.5 ثانية", @@ -145,7 +145,7 @@ }, { "Input": "سأترك لمدة 123.45 ثانية", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "123.45 ثانية", @@ -157,7 +157,7 @@ }, { "Input": "سأغادر لمدة أسبوعين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوعين", @@ -169,7 +169,7 @@ }, { "Input": "سأغادر لمدة عشرين دقيقة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عشرين دقيقة", @@ -181,7 +181,7 @@ }, { "Input": "سأغادر لمدة أربع وعشرين ساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أربع وعشرين ساعة", @@ -193,7 +193,7 @@ }, { "Input": "سأغادر طوال اليوم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال اليوم", @@ -205,7 +205,7 @@ }, { "Input": "سأغادر طوال الأسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال الأسبوع", @@ -217,7 +217,7 @@ }, { "Input": "سأغادر طوال الشهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال الشهر", @@ -229,7 +229,7 @@ }, { "Input": "سأغادر طوال العام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال العام", @@ -241,7 +241,7 @@ }, { "Input": "سأغادر طوال يوم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال يوم", @@ -253,7 +253,7 @@ }, { "Input": "سأغادر طوال أسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال أسبوع", @@ -265,7 +265,7 @@ }, { "Input": "سأغادر طوال شهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال شهر", @@ -277,7 +277,7 @@ }, { "Input": "سأغادر طوال السنة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال السنة", @@ -289,7 +289,7 @@ }, { "Input": "سأغادر ليوم كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم كامل", @@ -301,7 +301,7 @@ }, { "Input": "سأغادر لمدة أسبوع كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع كامل", @@ -313,7 +313,7 @@ }, { "Input": "سأغادر لمدة شهر كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كامل", @@ -325,7 +325,7 @@ }, { "Input": "سأغادر لمدة عام كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عام كامل", @@ -337,7 +337,7 @@ }, { "Input": "سأغادر يوم كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم كامل", @@ -349,7 +349,7 @@ }, { "Input": "سأغادرلمدة أسبوع كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع كامل", @@ -361,7 +361,7 @@ }, { "Input": "سأغادرلمدة شهر كامل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كامل", @@ -373,7 +373,7 @@ }, { "Input": "سأغادر لمدة سنة كاملة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سنة كاملة", @@ -385,7 +385,7 @@ }, { "Input": "سأغادر لمدة ساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعة", @@ -397,7 +397,7 @@ }, { "Input": "سأترك لمدة عام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عام", @@ -409,7 +409,7 @@ }, { "Input": "نصف سنة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف سنة", @@ -421,7 +421,7 @@ }, { "Input": "نصف عام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف عام", @@ -433,7 +433,7 @@ }, { "Input": "سأترك لمدة 3 دقائق", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق", @@ -445,7 +445,7 @@ }, { "Input": "سأغادر لمدة 30 دقيقة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "30 دقيقة", @@ -457,7 +457,7 @@ }, { "Input": "سأغادر لمدة نصف ساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف ساعة", @@ -469,7 +469,7 @@ }, { "Input": "سأغادر مدة نصف ساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف ساعة", @@ -481,7 +481,7 @@ }, { "Input": "سأغادر لمدة ساعة ونصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعة ونصف", @@ -493,7 +493,7 @@ }, { "Input": "سأغادرمدة ساعة ونصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعة ونصف", @@ -505,7 +505,7 @@ }, { "Input": "سأغادر لمدة نصف الساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف الساعة", @@ -517,7 +517,7 @@ }, { "Input": "سأغادر لمدة ساعتين", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعتين", @@ -529,7 +529,7 @@ }, { "Input": "سأغادر لمدة ساعتين ونصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعتين ونصف", @@ -541,7 +541,7 @@ }, { "Input": "في أسبوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع", @@ -553,7 +553,7 @@ }, { "Input": "في يوم", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم", @@ -565,7 +565,7 @@ }, { "Input": "لمدة ساعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعة", @@ -577,7 +577,7 @@ }, { "Input": "لمدة شهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر", @@ -589,7 +589,7 @@ }, { "Input": "سأغادر لبضع ساعات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بضع ساعات", @@ -601,7 +601,7 @@ }, { "Input": "سأغادر لبضع دقائق", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بضع دقائق", @@ -613,7 +613,7 @@ }, { "Input": "سأرحل لبضعة أيام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بضعة أيام", @@ -625,7 +625,7 @@ }, { "Input": "سأغادر لعدة أيام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عدة أيام", @@ -637,7 +637,7 @@ }, { "Input": "سأغادر لمدة عام واحد و شهر و 21 يوما", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عام واحد و شهر و 21 يوما", @@ -649,7 +649,7 @@ }, { "Input": "سأغادر لمدة 2 أيام و شهر واحد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2 أيام و شهر واحد", diff --git a/Specs/DateTime/Arabic/DurationParser.json b/Specs/DateTime/Arabic/DurationParser.json index 911c8ce578..afdbf62dcd 100644 --- a/Specs/DateTime/Arabic/DurationParser.json +++ b/Specs/DateTime/Arabic/DurationParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعات", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 أيام", @@ -77,7 +77,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعات", @@ -126,7 +126,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 ساعة", @@ -150,7 +150,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 أيام", @@ -174,7 +174,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 أشهر", @@ -198,7 +198,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق", @@ -222,7 +222,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق", @@ -421,7 +421,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال الشهر", @@ -446,7 +446,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال العام", @@ -470,7 +470,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال يوم", @@ -494,7 +494,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال أسبوع", @@ -518,7 +518,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "طوال شهر", @@ -567,7 +567,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم كامل", @@ -591,7 +591,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع كامل", @@ -615,7 +615,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كامل", @@ -639,7 +639,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عام كامل", @@ -663,7 +663,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يوم كامل", @@ -687,7 +687,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أسبوع كامل", @@ -711,7 +711,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "شهر كامل", @@ -735,7 +735,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "سنة كاملة", @@ -759,7 +759,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ساعة", @@ -783,7 +783,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف سنة", @@ -807,7 +807,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف عام", @@ -831,7 +831,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "3 دقائق", @@ -855,7 +855,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "30 دقيقة", @@ -929,7 +929,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "نصف ساعة", diff --git a/Specs/DateTime/Arabic/HolidayExtractor.json b/Specs/DateTime/Arabic/HolidayExtractor.json index 9c78e49aab..3ae1fc1ebb 100644 --- a/Specs/DateTime/Arabic/HolidayExtractor.json +++ b/Specs/DateTime/Arabic/HolidayExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "سأعود في عيد الميلاد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "عيد الميلاد", @@ -13,7 +13,7 @@ }, { "Input": "سأعود في يوم عيد الميلاد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يوم عيد الميلاد", @@ -25,7 +25,7 @@ }, { "Input": "سأعود في يواندان", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يواندان", @@ -37,7 +37,7 @@ }, { "Input": "سأعود في يوم الشكر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يوم الشكر", @@ -49,7 +49,7 @@ }, { "Input": "سأعود في يوم الأب", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يوم الأب", @@ -61,7 +61,7 @@ }, { "Input": "سأعود في يواندان هذا العام", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يواندان هذا العام", @@ -73,7 +73,7 @@ }, { "Input": "سأعود في يواندان لعام 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يواندان لعام 2016", @@ -85,7 +85,7 @@ }, { "Input": "سأعود في يواندان 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يواندان 2016", @@ -97,7 +97,7 @@ }, { "Input": "سأعود يوم إثنين الرماد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يوم إثنين الرماد", @@ -109,7 +109,7 @@ }, { "Input": "سأعود في رأس السنة الهجرية", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "رأس السنة الهجرية", @@ -121,7 +121,7 @@ }, { "Input": "سأعود في عيد الأضحى", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "عيد الأضحى", @@ -133,7 +133,7 @@ }, { "Input": "سأعود في عيد الفطر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "عيد الفطر", @@ -145,7 +145,7 @@ }, { "Input": "سأذهب إلى الحج", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "الحج", @@ -157,7 +157,7 @@ }, { "Input": "سأعود في المولد النبوي", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "المولد النبوي", @@ -169,7 +169,7 @@ }, { "Input": "سأذهب في يوم الأرض", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "يوم الأرض", @@ -181,7 +181,7 @@ }, { "Input": "سأعود في عيد الاستقلال", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "عيد الاستقلال", @@ -193,7 +193,7 @@ }, { "Input": "سأعود في الخريف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "الخريف", @@ -205,7 +205,7 @@ }, { "Input": "سأذهب في الحج سنة 2016", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascrip", "Results": [ { "Text": "الحج سنة 2016", diff --git a/Specs/DateTime/Arabic/MergedExtractor.json b/Specs/DateTime/Arabic/MergedExtractor.json index 219d10e048..f65d730549 100644 --- a/Specs/DateTime/Arabic/MergedExtractor.json +++ b/Specs/DateTime/Arabic/MergedExtractor.json @@ -106,7 +106,7 @@ { "Input": "الأسبوع الماضي", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الأسبوع الماضي", @@ -184,7 +184,7 @@ { "Input": "كيف يبدو يومي؟", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "يومي", @@ -197,7 +197,7 @@ { "Input": "كيف يبدو اليوم؟", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "اليوم", @@ -307,7 +307,7 @@ { "Input": "6/6/2012 15:15", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "6/6/2012 15:15", @@ -333,7 +333,7 @@ { "Input": "29 مايو", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29 مايو", @@ -346,7 +346,7 @@ { "Input": "29 مارس", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29 مارس", @@ -359,7 +359,7 @@ { "Input": "ولدت في مارس", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مارس", @@ -398,37 +398,37 @@ { "Input": "ما هي ساعات بالومينو؟", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "في الشمس", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "أي بريد إلكتروني تلقى ردًا", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "غالبًا ما يكون وحيدًا", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "غالبا طائر", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "ساعات ميشيغان", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { diff --git a/Specs/DateTime/Arabic/MergedParser.json b/Specs/DateTime/Arabic/MergedParser.json index 6acf260419..d558c5de6c 100644 --- a/Specs/DateTime/Arabic/MergedParser.json +++ b/Specs/DateTime/Arabic/MergedParser.json @@ -649,7 +649,7 @@ }, "IgnoreResolution": "true", "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "2016-2-30", diff --git a/Specs/DateTime/Arabic/TimeExtractor.json b/Specs/DateTime/Arabic/TimeExtractor.json index 2680efcb0c..2369e2068f 100644 --- a/Specs/DateTime/Arabic/TimeExtractor.json +++ b/Specs/DateTime/Arabic/TimeExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "سأعود في 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7", @@ -13,7 +13,7 @@ }, { "Input": "سأعود في السابعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السابعة", @@ -25,7 +25,7 @@ }, { "Input": "سأعود عند 7 مساء.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7 مساء", @@ -37,7 +37,7 @@ }, { "Input": "سأعود في 7 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7 مساء", @@ -49,7 +49,7 @@ }, { "Input": "سأعود 7:56 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56 مساء", @@ -61,7 +61,7 @@ }, { "Input": "سأعود 7:56:35 مساءً", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56:35 مساءً", @@ -73,7 +73,7 @@ }, { "Input": "سأعود في 7:56:35 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56:35 مساء", @@ -85,7 +85,7 @@ }, { "Input": "سأعود 12:34", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12:34", @@ -97,7 +97,7 @@ }, { "Input": "سأعود 12:34:20", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12:34:20", @@ -109,7 +109,7 @@ }, { "Input": "سأعود T12:34:20", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "T12:34:20", @@ -121,7 +121,7 @@ }, { "Input": "سأعود 00:00", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "00:00", @@ -133,7 +133,7 @@ }, { "Input": "سأعود 00:00:30", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "00:00:30", @@ -145,7 +145,7 @@ }, { "Input": "إنها الساعة 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 7", @@ -157,7 +157,7 @@ }, { "Input": "إنها الساعة السابعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة السابعة", @@ -169,7 +169,7 @@ }, { "Input": "إنها 8 صباحًا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "8 صباحًا", @@ -181,7 +181,7 @@ }, { "Input": "إنها 8 في الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "8 في الليل", @@ -193,7 +193,7 @@ }, { "Input": "إنها الثامنة والنصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثامنة والنصف", @@ -217,7 +217,7 @@ }, { "Input": "إنها الساعة الثامنة و 30 دقيقة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة الثامنة و 30 دقيقة", @@ -229,7 +229,7 @@ }, { "Input": "إنها الثامنة والربع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثامنة والربع", @@ -241,7 +241,7 @@ }, { "Input": "إنها ثامنة والربع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ثامنة والربع", @@ -265,7 +265,7 @@ }, { "Input": "إنها ثلاث دقائق حتى الثامنة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ثلاث دقائق حتى الثامنة", @@ -277,7 +277,7 @@ }, { "Input": "إنها الساعة السابعة والنصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة السابعة والنصف", @@ -289,7 +289,7 @@ }, { "Input": "إنها الساعة السابعة والنصف بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة السابعة والنصف بعد الظهر", @@ -337,7 +337,7 @@ }, { "Input": "سأعود بعد الظهر الساعة 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر الساعة 7", @@ -349,7 +349,7 @@ }, { "Input": "سأعود الساعة 7 الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 7 الظهر", @@ -361,7 +361,7 @@ }, { "Input": "سأعود بعد الظهر 7:00", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر 7:00", @@ -373,7 +373,7 @@ }, { "Input": "سأعود بعد الظهر 7:00:14", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر 7:00:14", @@ -385,7 +385,7 @@ }, { "Input": "سأعود بعد الظهر السابعة مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر السابعة مساء", @@ -421,7 +421,7 @@ }, { "Input": "سأعود في الحادية عشرة والخامسة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الحادية عشرة والخامسة", @@ -433,7 +433,7 @@ }, { "Input": "سأعود ثلاث دقائق قبل الخامسة والنصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "ثلاث دقائق قبل الخامسة والنصف", @@ -445,7 +445,7 @@ }, { "Input": "سأعود الخامسة وثلاثين في الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الخامسة وثلاثين في الليل", @@ -457,7 +457,7 @@ }, { "Input": "سأعود في الليل الخامسة والنصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الليل الخامسة والنصف", @@ -469,7 +469,7 @@ }, { "Input": "سأعود الظهيرة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الظهيرة", @@ -481,7 +481,7 @@ }, { "Input": "سأعود الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الظهر", @@ -493,7 +493,7 @@ }, { "Input": "سأعود الساعة 12 ظهرا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 12 ظهرا", @@ -505,7 +505,7 @@ }, { "Input": "سأعود في الحادية عشرة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الحادية عشرة", @@ -517,7 +517,7 @@ }, { "Input": "سأعود الحادية عشرة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الحادية عشرة", @@ -529,7 +529,7 @@ }, { "Input": "سأعود 340 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "340 مساء", @@ -541,7 +541,7 @@ }, { "Input": "سأعود 1140 صباحا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1140 صباحا", @@ -553,7 +553,7 @@ }, { "Input": "منتصف الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف الليل", @@ -565,7 +565,7 @@ }, { "Input": "منتصف-الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-الليل", @@ -577,7 +577,7 @@ }, { "Input": "منتصف الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف الصباح", @@ -589,7 +589,7 @@ }, { "Input": "منتصف-الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-الصباح", @@ -601,7 +601,7 @@ }, { "Input": "منتصف الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف الظهر", @@ -613,7 +613,7 @@ }, { "Input": "منتصف-الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-الظهر", @@ -625,7 +625,7 @@ }, { "Input": "منتصف النهار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف النهار", @@ -637,7 +637,7 @@ }, { "Input": "منتصف-النهار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-النهار", @@ -649,7 +649,7 @@ }, { "Input": "وقت الظهيرة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت الظهيرة", @@ -661,7 +661,7 @@ }, { "Input": "سأعود 7 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7 مساء", @@ -673,7 +673,7 @@ }, { "Input": "سأعود 7 مساء.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7 مساء", @@ -685,7 +685,7 @@ }, { "Input": "سأعود مساء 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مساء 7", @@ -697,7 +697,7 @@ }, { "Input": "سأعود مساء 7.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "مساء 7", @@ -709,7 +709,7 @@ }, { "Input": "سأعود 7:56 صباحا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56 صباحا", @@ -721,7 +721,7 @@ }, { "Input": "سأعود 7:56:35 في الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56:35 في الصباح", @@ -733,7 +733,7 @@ }, { "Input": "سأعود 7:56:35 الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56:35 الصباح", @@ -745,7 +745,7 @@ }, { "Input": "سأعود 7:56:35 صباحا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7:56:35 صباحا", @@ -769,7 +769,7 @@ }, { "Input": "سأعود السابعة وثلاثين في المساء.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السابعة وثلاثين في المساء", @@ -781,7 +781,7 @@ }, { "Input": "سأعود السابعة وثلاثين المساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السابعة وثلاثين المساء", @@ -793,7 +793,7 @@ }, { "Input": "سأعود السابعة وثلاثين مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السابعة وثلاثين مساء", @@ -817,7 +817,7 @@ }, { "Input": "سأعود 1140 المساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1140 المساء", @@ -829,17 +829,17 @@ }, { "Input": "الرسائل الإلكترونية التي حصلت على ب كموضوع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "رسائل البريد الإلكتروني التي حصلت على رد", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "سأعود الساعة 12 ظهرا وقت الغداء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 12 ظهرا وقت الغداء", @@ -851,7 +851,7 @@ }, { "Input": "سأعود وقت الغداء الساعة 12 ظهرا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت الغداء الساعة 12 ظهرا", @@ -863,7 +863,7 @@ }, { "Input": "سأعود في وقت الغداء الساعة 12", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت الغداء الساعة 12", @@ -872,5 +872,65 @@ "Type": "time" } ] + }, + { + "Input": "نعم 4:25 مساءً من فضلك", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "4:25 مساءً", + "Start": 4, + "Length": 10, + "Type": "time" + } + ] + }, + { + "Input": "12:09 صباحًا", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "12:09 صباحًا", + "Start": 0, + "Length": 12, + "Type": "time" + } + ] + }, + { + "Input": "7:00 ص", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "7:00 ص", + "Start": 0, + "Length": 6, + "Type": "time" + } + ] + }, + { + "Input": "عادةً ما أقوم بإعداد العشاء في حوالي الساعة الثامنة والنصف", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "الساعة الثامنة والنصف", + "Start": 37, + "Length": 21, + "Type": "time" + } + ] + }, + { + "Input": "يجب أن أعود إلى المكتب بحلول الساعة الرابعة والنصف", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "الساعة الرابعة والنصف", + "Start": 29, + "Length": 21, + "Type": "time" + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Arabic/TimeParser.json b/Specs/DateTime/Arabic/TimeParser.json index 5f84e08b6f..c9a38b8b7a 100644 --- a/Specs/DateTime/Arabic/TimeParser.json +++ b/Specs/DateTime/Arabic/TimeParser.json @@ -177,7 +177,7 @@ }, { "Input": "سأعود في 7 صباحا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7 صباحا", @@ -198,7 +198,7 @@ }, { "Input": "سأعود عند 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7", @@ -219,7 +219,7 @@ }, { "Input": "سأعود في السابعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "السابعة", @@ -241,7 +241,7 @@ { "Input": "سأعود في 7 مساء", "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "7 مساء", @@ -328,7 +328,7 @@ }, { "Input": "سأعود 12:34", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12:34", @@ -349,7 +349,7 @@ }, { "Input": "سأعود 12:34:25", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12:34:25", @@ -370,7 +370,7 @@ }, { "Input": "إنها الساعة 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 7", @@ -391,7 +391,7 @@ }, { "Input": "انها الساعة السابعة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة السابعة", @@ -412,7 +412,7 @@ }, { "Input": "إنها 8 صباحًا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "8 صباحًا", @@ -433,7 +433,7 @@ }, { "Input": "إنها 8 في الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "8 في الليل", @@ -498,7 +498,7 @@ }, { "Input": "إنها الساعة الثامنة و 30 دقيقة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة الثامنة و 30 دقيقة", @@ -519,7 +519,7 @@ }, { "Input": "انها الثامنة والربع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثامنة والربع", @@ -540,7 +540,7 @@ }, { "Input": "انها الثامنة وربع", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثامنة وربع", @@ -715,7 +715,7 @@ }, { "Input": "سأعود بعد الظهر الساعة 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر الساعة 7", @@ -736,7 +736,7 @@ }, { "Input": "سأعود الظهر الساعة 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الظهر الساعة 7", @@ -757,7 +757,7 @@ }, { "Input": "سأعود بعد الظهر 7:00", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر 7:00", @@ -778,7 +778,7 @@ }, { "Input": "سأعود بعد الظهر 7:00:05", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر 7:00:05", @@ -799,7 +799,7 @@ }, { "Input": "سأعود بعد الظهر السابعة مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر السابعة مساء", @@ -886,7 +886,7 @@ }, { "Input": "سأعود الظهيرة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الظهيرة", @@ -907,7 +907,7 @@ }, { "Input": "سأعود الساعة 12 ظهرا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 12 ظهرا", @@ -928,7 +928,7 @@ }, { "Input": "سأعود في الحادية عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الحادية عشر", @@ -949,7 +949,7 @@ }, { "Input": "سأعود الحادية عشر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الحادية عشر", @@ -1013,7 +1013,7 @@ }, { "Input": "منتصف الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف الليل", @@ -1034,7 +1034,7 @@ }, { "Input": "منتصف-الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-الليل", @@ -1055,7 +1055,7 @@ }, { "Input": "منتصف الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف الصباح", @@ -1076,7 +1076,7 @@ }, { "Input": "منتصف-الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-الصباح", @@ -1141,7 +1141,7 @@ }, { "Input": "منتصف النهار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف النهار", @@ -1162,7 +1162,7 @@ }, { "Input": "منتصف-النهار", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "منتصف-النهار", @@ -1183,7 +1183,7 @@ }, { "Input": "وقت الظهيرة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت الظهيرة", @@ -1204,7 +1204,7 @@ }, { "Input": "سأعود 12 وقت الغداء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 وقت الغداء", @@ -1225,7 +1225,7 @@ }, { "Input": "سأعود 12 منتصف الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12 منتصف الليل", @@ -1290,7 +1290,7 @@ }, { "Input": "سأعود الساعة 12 ظهرا وقت الغداء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 12 ظهرا وقت الغداء", @@ -1354,7 +1354,7 @@ }, { "Input": "سأعود في وقت الغداء الساعة 11 صباحا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت الغداء الساعة 11 صباحا", @@ -1397,7 +1397,7 @@ }, { "Input": "سأعود 12:34:45", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "12:34:45", @@ -1418,7 +1418,7 @@ }, { "Input": "سأعود بعد الظهر 7:00:25", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر 7:00:25", @@ -1461,7 +1461,7 @@ }, { "Input": "سأعود أحد عشر وخمسة", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "أحد عشر وخمسة", @@ -1548,7 +1548,7 @@ }, { "Input": "سأعود الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الظهر", @@ -1569,7 +1569,7 @@ }, { "Input": "سأعود في وقت الغداء الساعة 12 ظهرا", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "وقت الغداء الساعة 12 ظهرا", @@ -1587,5 +1587,110 @@ } } ] + }, + { + "Input": "نعم 4:25 مساءً من فضلك", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "4:25 مساءً", + "Start": 4, + "Length": 10, + "Type": "time", + "Value": { + "Timex": "T16:25", + "FutureResolution": { + "time": "16:25:00" + }, + "PastResolution": { + "time": "16:25:00" + } + } + } + ] + }, + { + "Input": "12:09 صباحًا", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "12:09 صباحًا", + "Start": 0, + "Length": 12, + "Type": "time", + "Value": { + "Timex": "T00:09", + "FutureResolution": { + "time": "00:09:00" + }, + "PastResolution": { + "time": "00:09:00" + } + } + } + ] + }, + { + "Input": "7:00 ص", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "7:00 ص", + "Start": 0, + "Length": 6, + "Type": "time", + "Value": { + "Timex": "T07:00", + "FutureResolution": { + "time": "07:00:00" + }, + "PastResolution": { + "time": "07:00:00" + } + } + } + ] + }, + { + "Input": "عادةً ما أقوم بإعداد العشاء في حوالي الساعة الثامنة والنصف", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "الساعة الثامنة والنصف", + "Start": 37, + "Length": 6, + "Type": "time", + "Value": { + "Timex": "T08:30", + "FutureResolution": { + "time": "08:30:00" + }, + "PastResolution": { + "time": "08:30:00" + } + } + } + ] + }, + { + "Input": "يجب أن أعود إلى المكتب بحلول الساعة الرابعة والنصف", + "NotSupportedByDesign": "java, javascript", + "Results": [ + { + "Text": "الساعة الرابعة والنصف", + "Start": 29, + "Length": 21, + "Type": "time", + "Value": { + "Timex": "T04:30", + "FutureResolution": { + "time": "04:30:00" + }, + "PastResolution": { + "time": "04:30:00" + } + } + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Arabic/TimePeriodExtractor.json b/Specs/DateTime/Arabic/TimePeriodExtractor.json index 6cd465bf28..a88734ba3e 100644 --- a/Specs/DateTime/Arabic/TimePeriodExtractor.json +++ b/Specs/DateTime/Arabic/TimePeriodExtractor.json @@ -13,7 +13,7 @@ }, { "Input": "سأخرج من 5 إلى 6 في المساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 5 إلى 6 في المساء", @@ -25,7 +25,7 @@ }, { "Input": "سأخرج من 5 إلى 6 بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 5 إلى 6 بعد الظهر", @@ -85,7 +85,7 @@ }, { "Input": "سأخرج بين الخامسة والسادسة بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بين الخامسة والسادسة بعد الظهر", @@ -145,7 +145,7 @@ }, { "Input": "سأكون بالخارج من الساعة 4:00 إلى الساعة 7", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من الساعة 4:00 إلى الساعة 7", @@ -157,7 +157,7 @@ }, { "Input": "سأخرج من 3 مساءً حتى السابعة والنصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 3 مساءً حتى السابعة والنصف", @@ -169,7 +169,7 @@ }, { "Input": "سأكون بالخارج 4-5 مساءً", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4-5 مساءً", @@ -193,7 +193,7 @@ }, { "Input": "سأخرج الثالثة إلا 20 دقيقة إلى الثامنة مساءً", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الثالثة إلا 20 دقيقة إلى الثامنة مساءً", @@ -217,7 +217,7 @@ }, { "Input": "سأخرج من الرابعة مساءً حتى الخامسة والنصف", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من الرابعة مساءً حتى الخامسة والنصف", @@ -229,7 +229,7 @@ }, { "Input": "سأخرج من 3 صباحًا حتى 5 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 3 صباحًا حتى 5 مساء", @@ -241,7 +241,7 @@ }, { "Input": "سأخرج من الثالثة صباحا حتى الخامسة بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من الثالثة صباحا حتى الخامسة بعد الظهر", @@ -277,7 +277,7 @@ }, { "Input": "دعنا نلتقي في الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الصباح", @@ -289,7 +289,7 @@ }, { "Input": "دعنا نلتقي بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر", @@ -301,7 +301,7 @@ }, { "Input": "دعنا نلتقي في الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الليل", @@ -313,7 +313,7 @@ }, { "Input": "دعنا نلتقي في المساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في المساء", @@ -325,7 +325,7 @@ }, { "Input": "دعنا نلتقي في الأمسيات", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الأمسيات", @@ -337,7 +337,7 @@ }, { "Input": "دعونا نجتمع في الصباح الباكر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الصباح الباكر", @@ -349,7 +349,7 @@ }, { "Input": "دعونا نجتمع في أواخر الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في أواخر الصباح", @@ -361,7 +361,7 @@ }, { "Input": "دعنا نلتقي في الصباح الباكر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في الصباح الباكر", @@ -373,7 +373,7 @@ }, { "Input": "دعنا نلتقي في وقت متأخر من الصباح", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت متأخر من الصباح", @@ -385,7 +385,7 @@ }, { "Input": "دعونا نجتمع في وقت مبكر بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت مبكر بعد الظهر", @@ -397,7 +397,7 @@ }, { "Input": "دعونا نجتمع في وقت متأخر بعد الظهر", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت متأخر بعد الظهر", @@ -409,7 +409,7 @@ }, { "Input": "دعنا نلتقي في وقت مبكر من المساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت مبكر من المساء", @@ -421,7 +421,7 @@ }, { "Input": "دعنا نلتقي في وقت متأخر من المساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت متأخر من المساء", @@ -433,7 +433,7 @@ }, { "Input": "دعونا نجتمع في وقت مبكر من الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت مبكر من الليل", @@ -445,7 +445,7 @@ }, { "Input": "دعنا نلتقي عند وقت متأخر من الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "عند وقت متأخر من الليل", @@ -457,7 +457,7 @@ }, { "Input": "دعنا نلتقي في أول الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في أول الليل", @@ -469,7 +469,7 @@ }, { "Input": "دعنا نلتقي في وقت متأخر من الليل", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "في وقت متأخر من الليل", @@ -493,7 +493,7 @@ }, { "Input": "حفلة في جينز من 6 إلى 11 مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 6 إلى 11 مساء", @@ -505,7 +505,7 @@ }, { "Input": "عقد الاجتماع من الساعة 14:00 إلى الساعة 16:30", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من الساعة 14:00 إلى الساعة 16:30", @@ -517,7 +517,7 @@ }, { "Input": "عقد اجتماع من اثنين إلى خمسة مساء", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من اثنين إلى خمسة مساء", @@ -529,7 +529,7 @@ }, { "Input": "عقد الاجتماع الساعة 1 بعد الظهر إلى 4", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "الساعة 1 بعد الظهر إلى 4", @@ -541,7 +541,7 @@ }, { "Input": "عقد الاجتماع الساعة من 1 بعد الظهر إلى 4", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1 بعد الظهر إلى 4", @@ -553,7 +553,7 @@ }, { "Input": "قم بإعداد الاجتماع 1:30 بعد الظهر إلى 4!", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1:30 بعد الظهر إلى 4", @@ -565,7 +565,7 @@ }, { "Input": "قم بإعداد الاجتماع 1:30 بعد الظهر. إلى 4 أشخاص", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر", @@ -577,7 +577,7 @@ }, { "Input": "مرحبًا كورتانا - يرجى تحديد موعد لقاء سكايب مع جينيفر. أحتاج إلى اجتماع مدته 30 دقيقة في فترة ما بعد الظهر ، وسأغادر يوم الجمعة.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر", @@ -589,7 +589,7 @@ }, { "Input": "مرحبًا كورتانا - يرجى تحديد موعد لقاء سكايب مع جينيفر. أحتاج إلى اجتماع مدته 30 دقيقة يوم الجمعة ، وسأغادر بعد الظهر.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "بعد الظهر", @@ -601,7 +601,7 @@ }, { "Input": "عقد الاجتماع من 1:30 إلى 3:30", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1:30 إلى 3:30", @@ -613,7 +613,7 @@ }, { "Input": "عقد الاجتماع من 1:30 مساءً إلى 3:30 ", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1:30 مساءً إلى 3:30", @@ -637,7 +637,7 @@ }, { "Input": "عقد الاجتماع من 1 إلى 3:30", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1 إلى 3:30", @@ -649,7 +649,7 @@ }, { "Input": "عقد الاجتماع من 1:30 إلى 3", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1:30 إلى 3", diff --git a/Specs/DateTime/Arabic/TimePeriodParser.json b/Specs/DateTime/Arabic/TimePeriodParser.json index fd27762997..3b7e3b95b5 100644 --- a/Specs/DateTime/Arabic/TimePeriodParser.json +++ b/Specs/DateTime/Arabic/TimePeriodParser.json @@ -32,7 +32,7 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 5 إلى 6 في المساء", @@ -275,7 +275,7 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من الساعة 4:00 إلى الساعة 7", @@ -329,7 +329,7 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "4 - 5 مساءً", @@ -922,7 +922,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1:30 بعد الظهر إلى 4", @@ -1003,7 +1003,7 @@ "ReferenceDateTime": "2017-12-01T13:37:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1:30 مساءً إلى 3:30 مساء", @@ -1056,7 +1056,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 3 إلى 3:30", @@ -1083,7 +1083,7 @@ "ReferenceDateTime": "2017-12-01T13:37:00" }, "IgnoreResolution": "true", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "من 1:30 إلى 3", diff --git a/Specs/DateTime/Catalan/DateExtractor.json b/Specs/DateTime/Catalan/DateExtractor.json new file mode 100644 index 0000000000..444e861963 --- /dev/null +++ b/Specs/DateTime/Catalan/DateExtractor.json @@ -0,0 +1,68 @@ +[ + { + "Input": "Tornaré el 22 d'abril", + "Results": [ + { + "Text": "22 d'abril", + "Type": "date", + "Start": 11, + "Length": 10 + } + ] + }, + { + "Input": "Tornaré el 21/04/16", + "Results": [ + { + "Text": "21/04/16", + "Type": "date", + "Start": 11, + "Length": 8 + } + ] + }, + { + "Input": "tornaré avui", + "Results": [ + { + "Text": "avui", + "Type": "date", + "Start": 8, + "Length": 4 + } + ] + }, + { + "Input": "tornaré demà", + "Results": [ + { + "Text": "demà", + "Type": "date", + "Start": 8, + "Length": 4 + } + ] + }, + { + "Input": "Tornaré el 15 de juny de 2016", + "Results": [ + { + "Text": "15 de juny de 2016", + "Type": "date", + "Start": 11, + "Length": 18 + } + ] + }, + { + "Input": "Vaig marxar d'aquí el 5 de desembre de 1391", + "Results": [ + { + "Text": "5 de desembre de 1391", + "Type": "date", + "Start": 22, + "Length": 21 + } + ] + } +] \ No newline at end of file diff --git a/Specs/DateTime/Catalan/DateParser.json b/Specs/DateTime/Catalan/DateParser.json new file mode 100644 index 0000000000..0fcd451b3a --- /dev/null +++ b/Specs/DateTime/Catalan/DateParser.json @@ -0,0 +1,232 @@ +[ + { + "Input": "Tornaré al 2 d'octubre", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "2 d'octubre", + "Type": "date", + "Value": { + "Timex": "XXXX-10-02", + "FutureResolution": { + "date": "2017-10-02" + }, + "PastResolution": { + "date": "2016-10-02" + } + }, + "Start": 11, + "Length": 11 + } + ] + }, + { + "Input": "Tornaré el 12 de gener de 2016", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "12 de gener de 2016", + "Type": "date", + "Value": { + "Timex": "2016-01-12", + "FutureResolution": { + "date": "2016-01-12" + }, + "PastResolution": { + "date": "2016-01-12" + } + }, + "Start": 11, + "Length": 19 + } + ] + }, + { + "Input": "Tornaré el dilluns 12 de gener de 2016", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "dilluns 12 de gener de 2016", + "Type": "date", + "Value": { + "Timex": "2016-01-12", + "FutureResolution": { + "date": "2016-01-12" + }, + "PastResolution": { + "date": "2016-01-12" + } + }, + "Start": 11, + "Length": 27 + } + ] + }, + { + "Input": "Tornaré el 21/04/16", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "21/04/16", + "Type": "date", + "Value": { + "Timex": "2016-04-21", + "FutureResolution": { + "date": "2016-04-21" + }, + "PastResolution": { + "date": "2016-04-21" + } + }, + "Start": 11, + "Length": 8 + } + ] + }, + { + "Input": "Tornaré el dimecres 22 de gener", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "dimecres 22 de gener", + "Type": "date", + "Value": { + "Timex": "XXXX-01-22", + "FutureResolution": { + "date": "2017-01-22" + }, + "PastResolution": { + "date": "2016-01-22" + } + }, + "Start": 11, + "Length": 20 + } + ] + }, + { + "Input": "Tornaré el vint-i-un de maig", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "vint-i-un de maig", + "Type": "date", + "Value": { + "Timex": "XXXX-05-21", + "FutureResolution": { + "date": "2017-05-21" + }, + "PastResolution": { + "date": "2016-05-21" + } + }, + "Start": 11, + "Length": 17 + } + ] + }, + { + "Input": "Tornaré el dia dotze de novembre.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "dotze de novembre", + "Type": "date", + "Value": { + "Timex": "XXXX-11-12", + "FutureResolution": { + "date": "2023-11-12" + }, + "PastResolution": { + "date": "2022-11-12" + } + }, + "Start": 11, + "Length": 21 + } + ] + }, + { + "Input": "Tornaré el 3-7-2017", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "3-7-2017", + "Type": "date", + "Value": { + "Timex": "2017-07-03", + "FutureResolution": { + "date": "2017-07-03" + }, + "PastResolution": { + "date": "2017-07-03" + } + }, + "Start": 11, + "Length": 8 + } + ] + }, + { + "Input": "Tornaré el 05/05/89", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "05/05/89", + "Type": "date", + "Value": { + "Timex": "1989-05-05", + "FutureResolution": { + "date": "1989-05-05" + }, + "PastResolution": { + "date": "1989-05-05" + } + }, + "Start": 11, + "Length": 8 + } + ] + }, + { + "Input": "aquest article es va publicar el 06/10/2020", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "06/10/2020", + "Type": "date", + "Value": { + "Timex": "2020-10-06", + "FutureResolution": { + "date": "2020-10-06" + }, + "PastResolution": { + "date": "2020-10-06" + } + }, + "Start": 33, + "Length": 10 + } + ] + } +] \ No newline at end of file diff --git a/Specs/DateTime/Catalan/TimeExtractor.json b/Specs/DateTime/Catalan/TimeExtractor.json new file mode 100644 index 0000000000..a7476471cb --- /dev/null +++ b/Specs/DateTime/Catalan/TimeExtractor.json @@ -0,0 +1,79 @@ +[ + { + "Input": "Tornaré a les 7", + "Results": [ + { + "Text": "7", + "Type": "time", + "Start": 14, + "Length": 1 + } + ] + }, + { + "Input": "Tornaré a les set", + "Results": [ + { + "Text": "set", + "Type": "time", + "Start": 14, + "Length": 3 + } + ] + }, + { + "Input": "Tornaré a les 7 de la tarda", + "Results": [ + { + "Text": "7 de la tarda", + "Type": "time", + "Start": 14, + "Length": 13 + } + ] + }, + { + "Input": "Tornaré al migdia", + "Results": [ + { + "Text": "migdia", + "Type": "time", + "Start": 11, + "Length": 6 + } + ] + }, + { + "Input": "Tornaré a les 7:56:35", + "Results": [ + { + "Text": "7:56:35", + "Type": "time", + "Start": 14, + "Length": 7 + } + ] + }, + { + "Input": "Són tres minuts per a les vuit", + "Results": [ + { + "Text": "tres minuts per a les vuit", + "Type": "time", + "Start": 4, + "Length": 26 + } + ] + }, + { + "Input": "Tornaré a les set i trenta p. m.", + "Results": [ + { + "Text": "set i trenta p. m.", + "Type": "time", + "Start": 14, + "Length": 18 + } + ] + } +] \ No newline at end of file diff --git a/Specs/DateTime/Catalan/TimeParser.json b/Specs/DateTime/Catalan/TimeParser.json new file mode 100644 index 0000000000..843e8dfe68 --- /dev/null +++ b/Specs/DateTime/Catalan/TimeParser.json @@ -0,0 +1,122 @@ +[ + { + "Input": "posa l'alarma a les vuit i quaranta", + "Results": [ + { + "Text": "vuit i quaranta", + "Type": "time", + "Value": { + "Timex": "T08:40", + "FutureResolution": { + "time": "08:40:00" + }, + "PastResolution": { + "time": "08:40:00" + } + }, + "Start": 20, + "Length": 15 + } + ] + }, + { + "Input": "posa l'alarma a les vuit quaranta del matí", + "Results": [ + { + "Text": "vuit quaranta del matí", + "Type": "time", + "Value": { + "Timex": "T08:40", + "FutureResolution": { + "time": "08:40:00" + }, + "PastResolution": { + "time": "08:40:00" + } + }, + "Start": 20, + "Length": 22 + } + ] + }, + { + "Input": "Tornaré a les 7 de la tarda", + "Results": [ + { + "Text": "7 de la tarda", + "Type": "time", + "Value": { + "Timex": "T19", + "FutureResolution": { + "time": "19:00:00" + }, + "PastResolution": { + "time": "19:00:00" + } + }, + "Start": 14, + "Length": 3 + } + ] + }, + { + "Input": "Tornaré a les 12:34", + "Results": [ + { + "Text": "12:34", + "Type": "time", + "Value": { + "Timex": "T12:34", + "FutureResolution": { + "time": "12:34:00" + }, + "PastResolution": { + "time": "12:34:00" + } + }, + "Start": 14, + "Length": 5 + } + ] + }, + { + "Input": "Tornaré a les set i mitja de la tarda", + "Results": [ + { + "Text": "set i mitja de la tarda", + "Type": "time", + "Value": { + "Timex": "T19:30", + "FutureResolution": { + "time": "19:30:00" + }, + "PastResolution": { + "time": "19:30:00" + } + }, + "Start": 14, + "Length": 23 + } + ] + }, + { + "Input": "migdia", + "Results": [ + { + "Text": "migdia", + "Type": "time", + "Value": { + "Timex": "T12", + "FutureResolution": { + "time": "12:00:00" + }, + "PastResolution": { + "time": "12:00:00" + } + }, + "Start": 0, + "Length": 6 + } + ] + } +] \ No newline at end of file diff --git a/Specs/DateTime/Dutch/DateExtractor.json b/Specs/DateTime/Dutch/DateExtractor.json index 5d4c972e66..ca9dd5c6ae 100644 --- a/Specs/DateTime/Dutch/DateExtractor.json +++ b/Specs/DateTime/Dutch/DateExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "Ik ga terug op de 15e", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 15e", @@ -13,7 +13,7 @@ }, { "Input": "Ik ga terug op 22 april", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22 april", @@ -25,7 +25,7 @@ }, { "Input": "Ik ga terug op 1 januari", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 januari", @@ -37,7 +37,7 @@ }, { "Input": "Ik ga terug op 1 jan.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 jan.", @@ -49,7 +49,7 @@ }, { "Input": "Ik ga terug op 2 oktober", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 oktober", @@ -61,7 +61,7 @@ }, { "Input": "Ik ga terug op 12 januari 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari 2016", @@ -73,7 +73,7 @@ }, { "Input": "Ik ga terug op 12 jan. 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 jan. 2016", @@ -85,7 +85,7 @@ }, { "Input": "Ik ga terug op maandag 12 januari 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag 12 januari 2016", @@ -97,7 +97,7 @@ }, { "Input": "Ik ga terug op 22/02/2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/02/2016", @@ -109,7 +109,7 @@ }, { "Input": "Ik ga terug op 21/04/2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21/04/2016", @@ -121,7 +121,7 @@ }, { "Input": "Ik ga terug op 21/04/16", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21/04/16", @@ -133,7 +133,7 @@ }, { "Input": "Ik ga terug op 18-9-15", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "18-9-15", @@ -145,7 +145,7 @@ }, { "Input": "Ik ga terug op 22.4", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22.4", @@ -157,7 +157,7 @@ }, { "Input": "Ik ga terug op 22-4", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-4", @@ -169,7 +169,7 @@ }, { "Input": "Ik ga terug op 22/4", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/4", @@ -181,7 +181,7 @@ }, { "Input": "Ik ga terug op 22/04", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/04", @@ -193,7 +193,7 @@ }, { "Input": "Ik ga terug op 12 augustus 2015", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 augustus 2015", @@ -205,7 +205,7 @@ }, { "Input": "Ik ga terug op 12/11/2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12/11/2016", @@ -217,7 +217,7 @@ }, { "Input": "Ik ga terug op 12-11-16", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12-11-16", @@ -229,7 +229,7 @@ }, { "Input": "Ik ga terug op 1 jan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 jan", @@ -241,7 +241,7 @@ }, { "Input": "Ik ga terug op 28 november", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "28 november", @@ -253,7 +253,7 @@ }, { "Input": "Ik ga terug op wo. 22 jan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "wo. 22 jan", @@ -265,7 +265,7 @@ }, { "Input": "Ik ga terug op de eerste vrijdag van juli", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van juli", @@ -277,7 +277,7 @@ }, { "Input": "Ik ga terug op de eerste vrijdag van deze maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van deze maand", @@ -289,7 +289,7 @@ }, { "Input": "Ik ga terug over twee weken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over twee weken", @@ -301,7 +301,7 @@ }, { "Input": "Ik ga volgende week vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week vrijdag", @@ -313,7 +313,7 @@ }, { "Input": "Ik ga terug volgende week vrijdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week vrijdag", @@ -325,7 +325,7 @@ }, { "Input": "afgelopen maandag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen maandag", @@ -337,7 +337,7 @@ }, { "Input": "Ik kom terug op dinsdag.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag", @@ -349,7 +349,7 @@ }, { "Input": "Goed nieuws, ik ga terug op dinsdag.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag", @@ -361,7 +361,7 @@ }, { "Input": "Ik ga terug op dinsdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag", @@ -373,7 +373,7 @@ }, { "Input": "Ik ga terug op vrijdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -385,7 +385,7 @@ }, { "Input": "Ik kom terug op vrijdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -397,7 +397,7 @@ }, { "Input": "Ik ga vandaag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag", @@ -409,7 +409,7 @@ }, { "Input": "Ik ga morgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen", @@ -421,7 +421,7 @@ }, { "Input": "Ik ben gisteren teruggekomen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "gisteren", @@ -433,7 +433,7 @@ }, { "Input": "Ik ben eergisteren teruggekomen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eergisteren", @@ -445,7 +445,7 @@ }, { "Input": "Ik kom overmorgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "overmorgen", @@ -457,7 +457,7 @@ }, { "Input": "Ik kom morgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen", @@ -469,7 +469,7 @@ }, { "Input": "Ik ga deze vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag", @@ -481,7 +481,7 @@ }, { "Input": "Ik ga volgende week zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week zondag", @@ -493,7 +493,7 @@ }, { "Input": "Ik kwam afgelopen zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen zondag", @@ -505,7 +505,7 @@ }, { "Input": "Ik ga de laatste dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de laatste dag", @@ -517,7 +517,7 @@ }, { "Input": "Ik kom de laatste dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de laatste dag", @@ -529,7 +529,7 @@ }, { "Input": "Ik kom vandaag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag", @@ -541,7 +541,7 @@ }, { "Input": "Ik kom deze week vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week vrijdag", @@ -553,7 +553,7 @@ }, { "Input": "Ik kwam vorige week zondag terug.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vorige week zondag", @@ -565,7 +565,7 @@ }, { "Input": "Ik ga terug op 15 juni 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 juni 2016", @@ -577,7 +577,7 @@ }, { "Input": "Ik speel honkbal op elf mei", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "elf mei", @@ -589,7 +589,7 @@ }, { "Input": "Ik ga terug op vier mei", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vier mei", @@ -601,7 +601,7 @@ }, { "Input": "Ik ga terug op 4 maart", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4 maart", @@ -613,7 +613,7 @@ }, { "Input": "Ik ga de eerste van januari terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste van januari", @@ -625,7 +625,7 @@ }, { "Input": "Ik ga eenentwintig mei terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eenentwintig mei", @@ -637,7 +637,7 @@ }, { "Input": "Ik kom eenentwintig mei terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eenentwintig mei", @@ -649,7 +649,7 @@ }, { "Input": "Ik ga de tweede aug terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede aug", @@ -661,7 +661,7 @@ }, { "Input": "Ik ga twintig juni terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twintig juni", @@ -673,7 +673,7 @@ }, { "Input": "Ik ben twee maanden geleden teruggekomen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee maanden geleden", @@ -685,7 +685,7 @@ }, { "Input": "Ik ga twee dagen later terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen later", @@ -697,7 +697,7 @@ }, { "Input": "wie heb ik een maand geleden een email gestuurd", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een maand geleden", @@ -709,7 +709,7 @@ }, { "Input": "Ik ging terug op de 27ste", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27ste", @@ -721,7 +721,7 @@ }, { "Input": "Ik ging terug voor de 27e", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -733,7 +733,7 @@ }, { "Input": "Ik ging terug voor de 21ste", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 21ste", @@ -745,7 +745,7 @@ }, { "Input": "Ik ging terug voor de 22e", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22e", @@ -757,7 +757,7 @@ }, { "Input": "Ik ging voor de tweede terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweede", @@ -769,7 +769,7 @@ }, { "Input": "Ik ging terug voor de eenendertigste", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eenendertigste", @@ -781,7 +781,7 @@ }, { "Input": "Ik ging terug op de 27e", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -793,7 +793,7 @@ }, { "Input": "Ik kwam terug op de 21ste", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 21ste", @@ -805,7 +805,7 @@ }, { "Input": "Ik ging terug op de 22e", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22e", @@ -817,7 +817,7 @@ }, { "Input": "Ik kwam terug op de tweede!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweede", @@ -829,7 +829,7 @@ }, { "Input": "Kwam je terug op de tweeëntwintigste?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweeëntwintigste", @@ -842,29 +842,29 @@ { "Input": "de eerste prijs", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga naar de 27ste verdieping", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Herdenkingsevenementen voor de 25ste verjaardag van de diplomatieke betrekkingen tussen Singapore en China", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Koop kaartjes voor de 17de voor het evenement", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Wat heb ik op zaterdag de tweede?", "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zaterdag de tweede", @@ -879,7 +879,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "woensdag de 27e", @@ -894,7 +894,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de 21ste", @@ -909,7 +909,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 22ste", @@ -924,7 +924,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zaterdag de 23ste", @@ -939,7 +939,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 15e", @@ -954,7 +954,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de eenentwintigste", @@ -969,7 +969,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de tweeëntwintigste", @@ -984,7 +984,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de vijftiende", @@ -999,7 +999,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de zevende", @@ -1011,7 +1011,7 @@ }, { "Input": "Ik ga de tweede zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede zondag", @@ -1023,7 +1023,7 @@ }, { "Input": "Ik ga de eerste zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste zondag", @@ -1035,7 +1035,7 @@ }, { "Input": "Ik ga de derde dinsdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "derde dinsdag", @@ -1047,7 +1047,7 @@ }, { "Input": "Ik ga de vijfde zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijfde zondag", @@ -1059,7 +1059,7 @@ }, { "Input": "Ik ga de zesde zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zondag", @@ -1071,7 +1071,7 @@ }, { "Input": "Ik ga de tiende maandag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag", @@ -1083,7 +1083,7 @@ }, { "Input": "Ik ga 20ste van de volgende maand terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20ste van de volgende maand", @@ -1095,7 +1095,8 @@ }, { "Input": "Ik ga de 31ste deze maand terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 31ste deze maand", @@ -1107,7 +1108,7 @@ }, { "Input": "Cortana kan een Skype call organiseren op vrijdag deze week of donderdag volgende week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag deze week", @@ -1125,7 +1126,7 @@ }, { "Input": "Cortana kan een Skype call organiseren voor vrijdag van deze week of deze week op zondag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag van deze week", @@ -1143,7 +1144,7 @@ }, { "Input": "16 nov 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 nov 2016", @@ -1155,7 +1156,7 @@ }, { "Input": "We hadden een meeting 1 maand 21 dagen geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 maand 21 dagen geleden", @@ -1167,7 +1168,7 @@ }, { "Input": "Ik ben hier 2 jaar 1 maand en 21 dagen geleden weggegaan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 jaar 1 maand en 21 dagen geleden", @@ -1179,7 +1180,7 @@ }, { "Input": "Ik ga hier 2 jaar en 21 dagen later weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 jaar en 21 dagen later", @@ -1191,7 +1192,7 @@ }, { "Input": "Ik ging 1 maand 2 jaar 21 dagen geleden weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 maand 2 jaar 21 dagen geleden", @@ -1203,7 +1204,8 @@ }, { "Input": "Ik vertrek de 20ste volgende maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 20ste volgende maand", @@ -1215,7 +1217,7 @@ }, { "Input": "Ik ben 5 december 1391 vertrokken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 december 1391", @@ -1227,7 +1229,8 @@ }, { "Input": "maandag, tweeëntwintig jan. 2018", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag, tweeëntwintig jan. 2018", @@ -1239,7 +1242,8 @@ }, { "Input": "op zondag eenentwintig januari tweeduizend en achttien", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "zondag eenentwintig januari tweeduizend en achttien", @@ -1251,7 +1255,7 @@ }, { "Input": "op eenentwintig september negentien achtenzeventig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eenentwintig september negentien achtenzeventig", @@ -1263,7 +1267,7 @@ }, { "Input": "op 20 september negentienhonderd en één", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20 september negentienhonderd en één", @@ -1275,7 +1279,7 @@ }, { "Input": "op de tiende van september tweeduizend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tiende van september tweeduizend", @@ -1287,7 +1291,7 @@ }, { "Input": "Ben je vrij op 13-5-2015?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13-5-2015", @@ -1299,7 +1303,7 @@ }, { "Input": "Ben je beschikbaar op 13-05-2015?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13-05-2015", @@ -1311,7 +1315,7 @@ }, { "Input": "Ben je volgende week zondag beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week zondag", @@ -1323,7 +1327,7 @@ }, { "Input": "Ben je volgende week maandag beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week maandag", @@ -1335,12 +1339,12 @@ }, { "Input": "Ik ga de 15e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik ga 22 april terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22 april", @@ -1352,7 +1356,7 @@ }, { "Input": "Ik ga 1 jan terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 jan", @@ -1364,7 +1368,7 @@ }, { "Input": "Ik ga 2 oktober terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 oktober", @@ -1376,7 +1380,7 @@ }, { "Input": "Ik ga 12 januari, 2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari, 2016", @@ -1388,7 +1392,7 @@ }, { "Input": "Ik ga 12 januari van 2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari van 2016", @@ -1400,7 +1404,7 @@ }, { "Input": "Ik ga maandag 12 januari, 2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag 12 januari, 2016", @@ -1412,7 +1416,7 @@ }, { "Input": "Ik ga 22-02-2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-02-2016", @@ -1424,7 +1428,7 @@ }, { "Input": "Ik ga 21-04-2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21-04-2016", @@ -1436,7 +1440,7 @@ }, { "Input": "Ik ga 21/04/16 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21/04/16", @@ -1448,7 +1452,7 @@ }, { "Input": "Ik ga 18-9-15 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "18-9-15", @@ -1460,7 +1464,7 @@ }, { "Input": "Ik ga op 22.4 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22.4", @@ -1472,7 +1476,7 @@ }, { "Input": "Ik ga op 22-4 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-4", @@ -1484,7 +1488,7 @@ }, { "Input": "Ik ga op 22/4 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/4", @@ -1496,7 +1500,7 @@ }, { "Input": "Ik ga op 22-04 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-04", @@ -1508,7 +1512,7 @@ }, { "Input": "Ik ga 22/4 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/4", @@ -1520,7 +1524,7 @@ }, { "Input": "Ik ga 22/04 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/04", @@ -1532,7 +1536,7 @@ }, { "Input": "Ik ga 12-08-2015 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12-08-2015", @@ -1544,7 +1548,7 @@ }, { "Input": "Ik ga 11-12, 2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11-12, 2016", @@ -1556,7 +1560,7 @@ }, { "Input": "Ik ga de 1e jan terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 1e jan", @@ -1568,7 +1572,7 @@ }, { "Input": "Ik ga 1-jan terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1-jan", @@ -1580,7 +1584,7 @@ }, { "Input": "Ik ga 28-nov terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "28-nov", @@ -1592,7 +1596,7 @@ }, { "Input": "Ik ga woens, 22 jan terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "woens, 22 jan", @@ -1604,7 +1608,7 @@ }, { "Input": "Ik ga de eerste vrijdag van juli terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van juli", @@ -1616,7 +1620,7 @@ }, { "Input": "Ik ga de eerste vrijdag van deze maand terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van deze maand", @@ -1628,7 +1632,7 @@ }, { "Input": "Ik ga twee weken vanaf nu terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken vanaf nu", @@ -1640,7 +1644,7 @@ }, { "Input": "Ik ga volgende week op vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week op vrijdag", @@ -1652,7 +1656,7 @@ }, { "Input": "Ik ga op vrijdag volgende week terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "op vrijdag volgende week", @@ -1664,7 +1668,7 @@ }, { "Input": "Ik ga op dins. terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dins.", @@ -1676,7 +1680,7 @@ }, { "Input": "Ik ga op dins. terug, goed nieuws.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dins.", @@ -1688,7 +1692,7 @@ }, { "Input": "Ik ga op dins terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dins", @@ -1700,7 +1704,7 @@ }, { "Input": "Ik ga op vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -1712,7 +1716,7 @@ }, { "Input": "Ik ga vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -1724,7 +1728,7 @@ }, { "Input": "Ik ga gisteren terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "gisteren", @@ -1736,7 +1740,7 @@ }, { "Input": "Ik ga eergisteren terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eergisteren", @@ -1748,7 +1752,7 @@ }, { "Input": "Ik ga overmorgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "overmorgen", @@ -1760,7 +1764,7 @@ }, { "Input": "Ik ga de volgende dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de volgende dag", @@ -1772,7 +1776,7 @@ }, { "Input": "Ik ga volgende dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende dag", @@ -1784,7 +1788,7 @@ }, { "Input": "Ik ga volgende zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende zondag", @@ -1796,7 +1800,7 @@ }, { "Input": "Ik ga afgelopen zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen zondag", @@ -1808,7 +1812,7 @@ }, { "Input": "Ik ga laatste dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste dag", @@ -1820,7 +1824,7 @@ }, { "Input": "Ik ga de dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de dag", @@ -1832,7 +1836,7 @@ }, { "Input": "Ik ga deze week vrijdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week vrijdag", @@ -1844,7 +1848,7 @@ }, { "Input": "Ik ga afgelopen week zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen week zondag", @@ -1856,7 +1860,7 @@ }, { "Input": "Ik ga 15 juni 2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 juni 2016", @@ -1868,7 +1872,7 @@ }, { "Input": "een basketbal op de elfde mei", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "elfde mei", @@ -1880,7 +1884,7 @@ }, { "Input": "Ik ga de vierde van mei terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vierde van mei", @@ -1892,7 +1896,7 @@ }, { "Input": "Ik ga de 4e van maart terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 4e van maart", @@ -1904,7 +1908,7 @@ }, { "Input": "Ik ga eerste van jan terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste van jan", @@ -1916,7 +1920,7 @@ }, { "Input": "Ik ga eenentwintigste mei terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eenentwintigste mei", @@ -1928,7 +1932,7 @@ }, { "Input": "Ik ga tweede van aug terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede van aug", @@ -1940,7 +1944,7 @@ }, { "Input": "Ik ga tweeëntwintigste van juni terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweeëntwintigste van juni", @@ -1952,7 +1956,7 @@ }, { "Input": "Ik ging twee maanden geleden terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee maanden geleden", @@ -1964,7 +1968,7 @@ }, { "Input": "Ik ging twee dagen later terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen later", @@ -1976,7 +1980,7 @@ }, { "Input": "wie e-mailde ik een maand geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een maand geleden", @@ -1988,7 +1992,7 @@ }, { "Input": "Ik ging voor de 27e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -2000,7 +2004,7 @@ }, { "Input": "Ik ging voor de 27e terug.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -2012,7 +2016,7 @@ }, { "Input": "Ik ging voor de 27e terug!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -2024,7 +2028,7 @@ }, { "Input": "Ik ging voor de 21e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 21e", @@ -2036,7 +2040,7 @@ }, { "Input": "Ik ging voor de 22e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22e", @@ -2048,7 +2052,7 @@ }, { "Input": "Ik ging voor de tweeëntwintigste terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweeëntwintigste", @@ -2060,7 +2064,7 @@ }, { "Input": "Ik ging voor de eenendertigste terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eenendertigste", @@ -2072,7 +2076,7 @@ }, { "Input": "Ik ging op de 27e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -2084,7 +2088,7 @@ }, { "Input": "Ik ging op de 21e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 21e", @@ -2096,7 +2100,7 @@ }, { "Input": "Ik ging op de 22e terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22e", @@ -2108,7 +2112,7 @@ }, { "Input": "Ik ging op de tweede terug!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweede", @@ -2120,7 +2124,7 @@ }, { "Input": "Ik ging op de tweeëntwintigste terug?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweeëntwintigste", @@ -2132,17 +2136,17 @@ }, { "Input": "Ik ga naar de 27e verdieping", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Herdenkingsfestiviteiten voor het 25e jubileum van diplomatieke banden tussen Singapore en China", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Regel tickets voor de 17e Spookhuisbeleving", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { @@ -2150,7 +2154,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zaterdag de tweede", @@ -2165,7 +2169,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "woensdag de 27e", @@ -2180,7 +2184,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de 21e", @@ -2195,7 +2199,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 22e", @@ -2210,7 +2214,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zaterdag de 23e", @@ -2225,7 +2229,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de tweeëntwintigste", @@ -2240,7 +2244,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de zevende", @@ -2252,7 +2256,7 @@ }, { "Input": "Ik ga tweede zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede zondag", @@ -2264,7 +2268,7 @@ }, { "Input": "Ik ga eerste zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste zondag", @@ -2276,7 +2280,7 @@ }, { "Input": "Ik ga derde dinsdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "derde dinsdag", @@ -2288,7 +2292,7 @@ }, { "Input": "Ik ga vijfde zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijfde zondag", @@ -2300,7 +2304,7 @@ }, { "Input": "Ik ga zesde zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zondag", @@ -2312,7 +2316,7 @@ }, { "Input": "Ik ga tiende maandag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag", @@ -2324,7 +2328,7 @@ }, { "Input": "Ik ga 20e van volgende maand terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20e van volgende maand", @@ -2336,7 +2340,7 @@ }, { "Input": "Ik ga 31e van deze maand terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "31e van deze maand", @@ -2348,7 +2352,7 @@ }, { "Input": "16 nov. 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 nov. 2016", @@ -2360,7 +2364,7 @@ }, { "Input": "We hadden een meeting 1 maand, 21 dagen geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 maand, 21 dagen geleden", @@ -2372,7 +2376,7 @@ }, { "Input": "Ik vertrok hier 2 jaar, 1 maand, 21 dagen geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 jaar, 1 maand, 21 dagen geleden", @@ -2384,7 +2388,7 @@ }, { "Input": "Ik zal hier 2 jaar en 21 dagen later vertrekken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 jaar en 21 dagen later", @@ -2396,7 +2400,7 @@ }, { "Input": "Ik vertrok hier 1 maand, 2 jaar en 21 dagen geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 maand, 2 jaar en 21 dagen geleden", @@ -2408,7 +2412,8 @@ }, { "Input": "Ik vertrok hier de 20e volgende maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 20e volgende maand", @@ -2420,7 +2425,7 @@ }, { "Input": "Ik vertrok hier 5 december 1391", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 december 1391", @@ -2432,7 +2437,8 @@ }, { "Input": "maandag, tweeëntwintig jan, 2018", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag, tweeëntwintig jan, 2018", @@ -2444,7 +2450,8 @@ }, { "Input": "op zondag eenentwintig jan tweeduizend achttien", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "zondag eenentwintig jan tweeduizend achttien", @@ -2456,7 +2463,7 @@ }, { "Input": "op september de eenentwintigste negentien achtenzeventig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "september de eenentwintigste negentien achtenzeventig", @@ -2468,7 +2475,7 @@ }, { "Input": "op 10 september, negentien nul een", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10 september, negentien nul een", @@ -2480,7 +2487,7 @@ }, { "Input": "op de tiende van september, tweeduizend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tiende van september, tweeduizend", @@ -2492,7 +2499,7 @@ }, { "Input": "Ben je beschikbaar op 13-5-2015?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13-5-2015", @@ -2504,7 +2511,7 @@ }, { "Input": "Ben je twee zondagen vanaf nu beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee zondagen vanaf nu", @@ -2516,7 +2523,7 @@ }, { "Input": "Ben je twee dagen na vandaag beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen na vandaag", @@ -2528,7 +2535,7 @@ }, { "Input": "Ben je drie weken vanaf morgen beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "drie weken vanaf morgen", @@ -2540,7 +2547,7 @@ }, { "Input": "Waar was je twee dagen voor gisteren?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen voor gisteren", @@ -2555,7 +2562,7 @@ "Context": { "ReferenceDateTime": "2018-06-14T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag 15 jun", @@ -2570,7 +2577,7 @@ "Context": { "ReferenceDateTime": "2018-06-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 3 weken", @@ -2583,12 +2590,12 @@ { "Input": "het nominale bedrag van haar 6 1/4% converteerbaren", "Comment": "1/4 shouldn't recognized as date here", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik ga terug op Sep-23-2020.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Sep-23-2020", @@ -2600,7 +2607,7 @@ }, { "Input": "Ik ga terug op September-2020-23.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "September-2020-23", @@ -2612,7 +2619,7 @@ }, { "Input": "Ik ga terug op 2020/23/Sep.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2020/23/Sep", @@ -2624,7 +2631,7 @@ }, { "Input": "Ik ga terug op 2020-Sep-23", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2020-Sep-23", @@ -2636,7 +2643,7 @@ }, { "Input": "Ik ga terug op 23/Sep/2020", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23/Sep/2020", @@ -2648,7 +2655,7 @@ }, { "Input": "Ik ga terug op 23-2020-September", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23-2020-September", @@ -2660,7 +2667,7 @@ }, { "Input": "ik zal tweeëntwintig juni 2017 teruggaan", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tweeëntwintig juni 2017", @@ -2673,13 +2680,13 @@ { "Input": "6,107.31 augustus 2019 moet het decimaal niet bevatten", "Comment": "Only August 2019 should be extracted as a DateRange, so no output in Date only. Java disabled due to issue in lookbehind.", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "ik zal 1-sep-2019 teruggaan", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1-sep-2019", @@ -2691,7 +2698,7 @@ }, { "Input": "ik zal 01/sep/2019 teruggaan", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "01/sep/2019", @@ -2703,7 +2710,7 @@ }, { "Input": "Boek een reis voor me op 26 juni van 2020", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "26 juni van 2020", diff --git a/Specs/DateTime/Dutch/DateParser.json b/Specs/DateTime/Dutch/DateParser.json index 3a33a2d83c..bd83e395a2 100644 --- a/Specs/DateTime/Dutch/DateParser.json +++ b/Specs/DateTime/Dutch/DateParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 15e", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 okt.", @@ -52,7 +52,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 oktober", @@ -76,7 +76,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee oktober", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari 2016", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag 12 januari 2016", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/02/2016", @@ -172,7 +172,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/2/2016", @@ -196,7 +196,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-2-2016", @@ -220,7 +220,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21-04-2016", @@ -244,7 +244,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21/04/2016", @@ -268,7 +268,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-04", @@ -292,7 +292,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/4", @@ -316,7 +316,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-4", @@ -340,7 +340,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4/22", @@ -364,7 +364,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/04", @@ -388,7 +388,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12-08-2015", @@ -412,7 +412,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12-08, 2015", @@ -436,7 +436,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 januari", @@ -460,7 +460,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 1e van januari", @@ -484,7 +484,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "woensdag 22 januari", @@ -508,7 +508,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste van januari", @@ -532,7 +532,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21 mei", @@ -556,7 +556,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eenentwintig mei", @@ -580,7 +580,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede van Augustus", @@ -604,7 +604,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweeëntwintig juni", @@ -628,7 +628,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -652,7 +652,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag", @@ -676,7 +676,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen", @@ -700,7 +700,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "gisteren", @@ -724,7 +724,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eergisteren", @@ -748,7 +748,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "overmorgen", @@ -772,7 +772,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Overmorgen", @@ -796,7 +796,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de volgende dag", @@ -820,7 +820,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "aanstaande vrijdag", @@ -844,7 +845,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "aankomende zondag", @@ -868,7 +870,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste zondag", @@ -892,7 +894,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vorige zondag", @@ -916,7 +918,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voorgaande zondag", @@ -940,7 +942,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week op vrijdag", @@ -964,7 +966,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week zondag", @@ -988,7 +990,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vorige week zondag", @@ -1012,7 +1014,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 juni 2016", @@ -1036,7 +1038,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van juli", @@ -1060,7 +1062,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van de maand", @@ -1084,7 +1086,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week vrijdag", @@ -1108,7 +1110,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week op vrijdag", @@ -1132,7 +1134,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag", @@ -1156,7 +1158,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken vanaf nu", @@ -1180,7 +1182,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 2 weken", @@ -1204,7 +1206,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een maand geleden", @@ -1228,7 +1230,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "enkele maanden geleden", @@ -1252,7 +1254,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "enkele dagen geleden", @@ -1276,7 +1278,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27ste", @@ -1300,7 +1302,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -1324,7 +1326,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 21ste", @@ -1348,7 +1350,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22ste", @@ -1372,7 +1374,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweede", @@ -1396,7 +1398,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweeëntwintigste", @@ -1420,7 +1422,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de dertigste", @@ -1444,7 +1446,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8080661+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de 21ste", @@ -1468,7 +1470,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8110663+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 22ste", @@ -1492,7 +1494,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8120465+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zaterdag de 23ste", @@ -1516,7 +1518,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8130455+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 15de", @@ -1540,7 +1542,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8140457+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de eenentwintigste", @@ -1564,7 +1566,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8150456+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de tweeëntwintigste", @@ -1588,7 +1590,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8160454+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 15de", @@ -1612,7 +1614,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8200463+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede zondag", @@ -1636,7 +1638,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8200463+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste zondag", @@ -1660,7 +1662,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8210454+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3e dinsdag", @@ -1684,7 +1686,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T17:25:49.8225493+08:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijfde zondag", @@ -1708,7 +1710,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 20ste van de volgende maand", @@ -1732,7 +1735,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 31ste van deze maand", @@ -1756,7 +1760,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari 2018", @@ -1780,7 +1784,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "18-09-15", @@ -1804,7 +1808,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 dagen geleden", @@ -1828,7 +1832,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee jaar geleden", @@ -1852,7 +1856,7 @@ "Context": { "ReferenceDateTime": "2016-11-14T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 november 2016", @@ -1876,7 +1880,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 maand en 21 dagen geleden", @@ -1900,7 +1905,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 jaar, 1 maand en 21 dagen geleden", @@ -1924,7 +1930,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "over 2 jaar en 21 dagen", @@ -1948,7 +1955,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 jaar, 1 maand en 21 dagen geleden", @@ -1972,7 +1980,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 maand en 21 dagen geleden", @@ -1996,7 +2005,8 @@ "Context": { "ReferenceDateTime": "2017-12-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 20ste van volgende maand", @@ -2020,7 +2030,7 @@ "Context": { "ReferenceDateTime": "2017-12-18T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 december 1391", @@ -2044,7 +2054,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "Maandag tweeëntwintig jan. 2018", @@ -2068,7 +2079,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "zondag eenentwintig januari tweeduizend achttien", @@ -2092,7 +2104,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "eenentwintig September negentien zevenentachtig", @@ -2116,7 +2129,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "10 september, negentien en een", @@ -2140,7 +2154,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tiende van september, tweeduizend", @@ -2164,7 +2179,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T09:58:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van de volgende maand", @@ -2188,7 +2203,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T10:45:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweede maandag van de volgende maand", @@ -2212,7 +2227,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T10:45:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de derde woensdag van de vorige maand", @@ -2236,7 +2251,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T22:16:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Volgende week dinsdag", @@ -2260,7 +2275,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T22:16:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week zondag", @@ -2284,7 +2299,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen vanaf morgen", @@ -2308,7 +2323,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vier dagen gerekend vanaf gisteren", @@ -2332,7 +2347,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13.5.2015", @@ -2356,7 +2371,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13-5-2015", @@ -2380,7 +2395,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7-3-2017", @@ -2404,7 +2419,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7-3-27", @@ -2428,7 +2443,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "05/05/89", @@ -2452,7 +2467,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "05/05/71", @@ -2476,7 +2491,7 @@ "Context": { "ReferenceDateTime": "2018-05-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee zondagen vanaf nu", @@ -2500,7 +2515,7 @@ "Context": { "ReferenceDateTime": "2018-05-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee maandagen later", @@ -2524,7 +2539,7 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen vanaf vandaag", @@ -2548,7 +2563,8 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "drie weken na morgen", @@ -2572,7 +2588,8 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "twee dagen voor gisteren", @@ -2596,7 +2613,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15", @@ -2620,7 +2637,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 okt.", @@ -2644,7 +2661,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2-okt", @@ -2668,7 +2685,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 oktober", @@ -2692,7 +2709,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari, 2016", @@ -2716,7 +2733,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag 12 januari, 2016", @@ -2740,7 +2757,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-02-2016", @@ -2764,7 +2781,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21-04-2016", @@ -2788,7 +2805,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21/04/16", @@ -2812,7 +2829,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-4", @@ -2836,7 +2853,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-4", @@ -2860,7 +2877,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22-4", @@ -2884,7 +2901,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/4", @@ -2908,7 +2925,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22/4", @@ -2932,7 +2949,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12-08-2015", @@ -2956,7 +2973,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12-08, 2015", @@ -2980,7 +2997,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 1e jan", @@ -3004,7 +3021,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1-jan", @@ -3028,7 +3045,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "woens, 22e van jan", @@ -3052,7 +3069,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste van jan", @@ -3076,7 +3093,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eenentwintigste van mei", @@ -3100,7 +3117,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede van aug", @@ -3124,7 +3141,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweeëntwintigste van juni", @@ -3148,7 +3165,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -3172,7 +3189,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag", @@ -3196,7 +3213,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag", @@ -3220,7 +3237,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen", @@ -3244,7 +3261,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "gisteren", @@ -3268,7 +3285,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eergisteren", @@ -3292,7 +3309,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "overmorgen", @@ -3316,7 +3333,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "overmorgen", @@ -3340,7 +3357,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de volgende dag", @@ -3364,7 +3381,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende dag", @@ -3388,7 +3405,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag", @@ -3412,7 +3429,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende zondag", @@ -3436,7 +3453,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste zondag", @@ -3460,7 +3477,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week vrijdag", @@ -3484,7 +3501,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week zondag", @@ -3508,7 +3525,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen week zondag", @@ -3532,7 +3549,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste dag", @@ -3556,7 +3573,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de laatste dag", @@ -3580,7 +3597,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de dag", @@ -3604,7 +3621,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 juni 2016", @@ -3628,7 +3645,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van juli", @@ -3652,7 +3669,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van deze maand", @@ -3676,7 +3693,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week op vrijdag", @@ -3700,7 +3717,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "op vrijdag volgende week", @@ -3724,7 +3741,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mijn dag", @@ -3748,7 +3765,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze dag", @@ -3772,7 +3789,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de afgelopen dag", @@ -3796,7 +3813,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken vanaf nu", @@ -3820,7 +3837,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een maand geleden", @@ -3844,7 +3861,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 27e", @@ -3868,7 +3885,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 21e", @@ -3892,7 +3909,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22e", @@ -3916,7 +3933,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweede", @@ -3940,7 +3957,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de tweeëntwintigste", @@ -3964,7 +3981,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de 21e", @@ -3988,7 +4005,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 22e", @@ -4012,7 +4029,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zaterdag de 23e", @@ -4036,7 +4053,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de 15e", @@ -4060,7 +4077,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "donderdag de eenentwintigste", @@ -4084,7 +4101,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de tweeëntwintigste", @@ -4108,7 +4125,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag de vijftiende", @@ -4132,7 +4149,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tweede zondag", @@ -4156,7 +4173,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste zondag", @@ -4180,7 +4197,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "derde dinsdag", @@ -4204,7 +4221,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijfde zondag", @@ -4228,7 +4245,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 20e van volgende maand", @@ -4252,7 +4270,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 31e van deze maand", @@ -4276,7 +4295,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "18-9-15", @@ -4300,7 +4319,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen geleden", @@ -4324,7 +4343,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee jaar geleden", @@ -4348,7 +4367,7 @@ "Context": { "ReferenceDateTime": "2016-11-14T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 nov. 2016", @@ -4372,7 +4391,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 maand, 21 dagen geleden", @@ -4396,7 +4416,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 jaar, 1 maand, 21 dagen geleden", @@ -4420,7 +4441,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 jaar, 21 dagen later", @@ -4444,7 +4466,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 maand, 2 jaar, 21 dagen geleden", @@ -4468,7 +4491,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 maand en 21 dagen geleden", @@ -4492,7 +4516,8 @@ "Context": { "ReferenceDateTime": "2017-12-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de 20e van volgende maand", @@ -4516,7 +4541,7 @@ "Context": { "ReferenceDateTime": "2017-12-18T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 december 1391", @@ -4540,7 +4565,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag, tweeëntwintig jan, 2018", @@ -4564,7 +4590,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "zondag eenentwintig jan tweeduizend achttien", @@ -4588,7 +4615,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "eenentwintig september negentien achtenzeventig", @@ -4612,7 +4640,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tiende van september, tweeduizend", @@ -4636,7 +4665,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T09:58:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste vrijdag van volgende maand", @@ -4660,7 +4689,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T10:45:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de derde woensdag van vorige maand", @@ -4684,7 +4713,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T22:16:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week dinsdag", @@ -4708,7 +4737,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T22:16:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "op volgende week zondag", @@ -4732,7 +4761,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen vanaf morgen", @@ -4756,7 +4785,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vier dagen vanaf gisteren", @@ -4780,7 +4809,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13-5-2015", @@ -4804,7 +4833,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3-7-2017", @@ -4828,7 +4857,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3-7-07", @@ -4852,7 +4881,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3-7-27", @@ -4876,7 +4905,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "05-05-89", @@ -4900,7 +4929,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "05-05-71", @@ -4924,7 +4953,7 @@ "Context": { "ReferenceDateTime": "2018-05-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee zondagen vanaf nu", @@ -4948,7 +4977,7 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen na vandaag", @@ -4972,7 +5001,8 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "drie weken vanaf morgen", @@ -4996,7 +5026,7 @@ "Context": { "ReferenceDateTime": "2018-07-05T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 3 weken", @@ -5020,7 +5050,8 @@ "Context": { "ReferenceDateTime": "2018-08-21T08:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "over vier werkdagen", @@ -5044,7 +5075,7 @@ "Context": { "ReferenceDateTime": "2018-08-21T08:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tweeëntwintigste van juni 2017", @@ -5068,7 +5099,7 @@ "Context": { "ReferenceDateTime": "2018-08-21T08:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "1-sep-2019", @@ -5092,7 +5123,7 @@ "Context": { "ReferenceDateTime": "2018-08-21T08:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "01/sep/2019", @@ -5116,7 +5147,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29 feb", @@ -5140,7 +5171,7 @@ "Context": { "ReferenceDateTime": "2019-03-22T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29/2", @@ -5164,7 +5195,7 @@ "Context": { "ReferenceDateTime": "2020-03-22T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29e feb", @@ -5188,7 +5219,7 @@ "Context": { "ReferenceDateTime": "2020-03-22T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "30 feb", @@ -5212,7 +5243,7 @@ "Context": { "ReferenceDateTime": "2020-03-22T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29/2/2019", @@ -5236,7 +5267,7 @@ "Context": { "ReferenceDateTime": "2020-03-22T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "29/2/2020", diff --git a/Specs/DateTime/Dutch/DatePeriodExtractor.json b/Specs/DateTime/Dutch/DatePeriodExtractor.json index 3cdd09b839..49463aa325 100644 --- a/Specs/DateTime/Dutch/DatePeriodExtractor.json +++ b/Specs/DateTime/Dutch/DatePeriodExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "Ik ben in jan weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jan", @@ -13,7 +13,7 @@ }, { "Input": "Ik ben aanstaande jan weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande jan", @@ -25,7 +25,7 @@ }, { "Input": "Ik ben maand jan weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand jan", @@ -37,7 +37,7 @@ }, { "Input": "Ik ben de maand jan weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand jan", @@ -49,7 +49,7 @@ }, { "Input": "Ik miste jan 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jan 2001", @@ -61,7 +61,7 @@ }, { "Input": "Ik miste jan, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jan, 2001", @@ -73,7 +73,7 @@ }, { "Input": "Ik ben in feb weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "feb", @@ -85,7 +85,7 @@ }, { "Input": "Ik ben aanstaande feb weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande feb", @@ -97,7 +97,7 @@ }, { "Input": "Ik ben maand feb weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand feb", @@ -109,7 +109,7 @@ }, { "Input": "Ik ben de maand feb weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand feb", @@ -121,7 +121,7 @@ }, { "Input": "Ik miste feb 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "feb 2001", @@ -133,7 +133,7 @@ }, { "Input": "Ik miste feb, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "feb, 2001", @@ -145,7 +145,7 @@ }, { "Input": "Ik ben in mrt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mrt", @@ -157,7 +157,7 @@ }, { "Input": "Ik ben aanstaande mrt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande mrt", @@ -169,7 +169,7 @@ }, { "Input": "Ik ben maand mrt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand mrt", @@ -181,7 +181,7 @@ }, { "Input": "Ik ben de maand mrt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand mrt", @@ -193,7 +193,7 @@ }, { "Input": "Ik miste mrt 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mrt 2001", @@ -205,7 +205,7 @@ }, { "Input": "Ik miste mrt, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mrt, 2001", @@ -217,7 +217,7 @@ }, { "Input": "Ik ben in apr weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "apr", @@ -229,7 +229,7 @@ }, { "Input": "Ik ben aanstaande apr weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande apr", @@ -241,7 +241,7 @@ }, { "Input": "Ik ben maand apr weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand apr", @@ -253,7 +253,7 @@ }, { "Input": "Ik ben de maand apr weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand apr", @@ -265,7 +265,7 @@ }, { "Input": "Ik miste apr 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "apr 2001", @@ -277,7 +277,7 @@ }, { "Input": "Ik miste apr, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "apr, 2001", @@ -289,7 +289,7 @@ }, { "Input": "Ik ben in mei weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mei", @@ -301,7 +301,7 @@ }, { "Input": "Ik ben aanstaande mei weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande mei", @@ -313,7 +313,7 @@ }, { "Input": "Ik ben maand mei weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand mei", @@ -325,7 +325,7 @@ }, { "Input": "Ik ben de maand mei weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand mei", @@ -337,7 +337,7 @@ }, { "Input": "Ik miste mei 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mei 2001", @@ -349,7 +349,7 @@ }, { "Input": "Ik miste mei, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mei, 2001", @@ -361,7 +361,7 @@ }, { "Input": "Ik ben in jun weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jun", @@ -373,7 +373,7 @@ }, { "Input": "Ik ben aanstaande jun weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande jun", @@ -385,7 +385,7 @@ }, { "Input": "Ik ben maand jun weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand jun", @@ -397,7 +397,7 @@ }, { "Input": "Ik ben de maand jun weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand jun", @@ -409,7 +409,7 @@ }, { "Input": "Ik miste jun 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jun 2001", @@ -421,7 +421,7 @@ }, { "Input": "Ik miste jun, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jun, 2001", @@ -433,7 +433,7 @@ }, { "Input": "Ik ben in jul weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jul", @@ -445,7 +445,7 @@ }, { "Input": "Ik ben aanstaande jul weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande jul", @@ -457,7 +457,7 @@ }, { "Input": "Ik ben maand jul weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand jul", @@ -469,7 +469,7 @@ }, { "Input": "Ik ben de maand jul weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand jul", @@ -481,7 +481,7 @@ }, { "Input": "Ik miste jul 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jul 2001", @@ -493,7 +493,7 @@ }, { "Input": "Ik miste jul, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jul, 2001", @@ -505,7 +505,7 @@ }, { "Input": "Ik ben in aug weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aug", @@ -517,7 +517,7 @@ }, { "Input": "Ik ben aanstaande aug weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande aug", @@ -529,7 +529,7 @@ }, { "Input": "Ik ben maand aug weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand aug", @@ -541,7 +541,7 @@ }, { "Input": "Ik ben de maand aug weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand aug", @@ -553,7 +553,7 @@ }, { "Input": "Ik miste aug 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aug 2001", @@ -565,7 +565,7 @@ }, { "Input": "Ik miste aug, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aug, 2001", @@ -577,7 +577,7 @@ }, { "Input": "Ik ben in sep weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "sep", @@ -589,7 +589,7 @@ }, { "Input": "Ik ben aanstaande sep weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande sep", @@ -601,7 +601,7 @@ }, { "Input": "Ik ben maand sep weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand sep", @@ -613,7 +613,7 @@ }, { "Input": "Ik ben de maand sep weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand sep", @@ -625,7 +625,7 @@ }, { "Input": "Ik miste sep 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "sep 2001", @@ -637,7 +637,7 @@ }, { "Input": "Ik miste sep, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "sep, 2001", @@ -649,7 +649,7 @@ }, { "Input": "Ik ben in okt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "okt", @@ -661,7 +661,7 @@ }, { "Input": "Ik ben aanstaande okt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande okt", @@ -673,7 +673,7 @@ }, { "Input": "Ik ben maand okt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand okt", @@ -685,7 +685,7 @@ }, { "Input": "Ik ben de maand okt weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand okt", @@ -697,7 +697,7 @@ }, { "Input": "Ik miste okt 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "okt 2001", @@ -709,7 +709,7 @@ }, { "Input": "Ik miste okt, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "okt, 2001", @@ -721,7 +721,7 @@ }, { "Input": "Ik ben nov weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nov", @@ -733,7 +733,7 @@ }, { "Input": "Ik ben aanstaande nov weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande nov", @@ -745,7 +745,7 @@ }, { "Input": "Ik ben maand nov weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand nov", @@ -757,7 +757,7 @@ }, { "Input": "Ik ben de maand nov weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand nov", @@ -769,7 +769,7 @@ }, { "Input": "Ik miste nov 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nov 2001", @@ -781,7 +781,7 @@ }, { "Input": "Ik miste nov, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nov, 2001", @@ -793,7 +793,7 @@ }, { "Input": "Ik ben in dec weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dec", @@ -805,7 +805,7 @@ }, { "Input": "Ik ben aanstaande dec weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande dec", @@ -817,7 +817,7 @@ }, { "Input": "Ik ben maand dec weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand dec", @@ -829,7 +829,7 @@ }, { "Input": "Ik ben de maand dec weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand dec", @@ -841,7 +841,7 @@ }, { "Input": "Ik miste dec 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dec 2001", @@ -853,7 +853,7 @@ }, { "Input": "Ik miste dec, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dec, 2001", @@ -865,7 +865,7 @@ }, { "Input": "Ik ben in januari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "januari", @@ -877,7 +877,7 @@ }, { "Input": "Ik ben aanstaande januari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande januari", @@ -889,7 +889,7 @@ }, { "Input": "Ik ben maand januari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand januari", @@ -901,7 +901,7 @@ }, { "Input": "Ik ben de maand januari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand januari", @@ -913,7 +913,7 @@ }, { "Input": "Ik miste januari 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "januari 2001", @@ -925,7 +925,7 @@ }, { "Input": "Ik miste januari, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "januari, 2001", @@ -937,7 +937,7 @@ }, { "Input": "Ik ben in februari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "februari", @@ -949,7 +949,7 @@ }, { "Input": "Ik ben aanstaande februari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande februari", @@ -961,7 +961,7 @@ }, { "Input": "Ik ben maand februari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand februari", @@ -973,7 +973,7 @@ }, { "Input": "Ik ben de maand februari weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand februari", @@ -985,7 +985,7 @@ }, { "Input": "Ik miste februari 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "februari 2001", @@ -997,7 +997,7 @@ }, { "Input": "Ik miste februari, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "februari, 2001", @@ -1009,7 +1009,7 @@ }, { "Input": "Ik ben in maart weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maart", @@ -1021,7 +1021,7 @@ }, { "Input": "Ik ben aanstaande maart weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande maart", @@ -1033,7 +1033,7 @@ }, { "Input": "Ik ben maand maart weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand maart", @@ -1045,7 +1045,7 @@ }, { "Input": "Ik ben de maand maart weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand maart", @@ -1057,7 +1057,7 @@ }, { "Input": "Ik miste maart 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maart 2001", @@ -1069,7 +1069,7 @@ }, { "Input": "Ik miste maart, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maart, 2001", @@ -1081,7 +1081,7 @@ }, { "Input": "Ik ben in april weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "april", @@ -1093,7 +1093,7 @@ }, { "Input": "Ik ben aanstaande april weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande april", @@ -1105,7 +1105,7 @@ }, { "Input": "Ik ben maand april weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand april", @@ -1117,7 +1117,7 @@ }, { "Input": "Ik ben de maand april weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand april", @@ -1129,7 +1129,7 @@ }, { "Input": "Ik miste april 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "april 2001", @@ -1141,7 +1141,7 @@ }, { "Input": "Ik miste april, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "april, 2001", @@ -1153,7 +1153,7 @@ }, { "Input": "Ik ben in juni weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni", @@ -1165,7 +1165,7 @@ }, { "Input": "Ik ben aanstaande juni weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande juni", @@ -1177,7 +1177,7 @@ }, { "Input": "Ik ben maand juni weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand juni", @@ -1189,7 +1189,7 @@ }, { "Input": "Ik ben de maand juni weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand juni", @@ -1201,7 +1201,7 @@ }, { "Input": "Ik miste juni 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni 2001", @@ -1213,7 +1213,7 @@ }, { "Input": "Ik miste juni, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni, 2001", @@ -1225,7 +1225,7 @@ }, { "Input": "Ik ben in juli weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juli", @@ -1237,7 +1237,7 @@ }, { "Input": "Ik ben aanstaande juli weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande juli", @@ -1249,7 +1249,7 @@ }, { "Input": "Ik ben maand juli weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand juli", @@ -1261,7 +1261,7 @@ }, { "Input": "Ik ben de maand juli weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand juli", @@ -1273,7 +1273,7 @@ }, { "Input": "Ik miste juli 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juli 2001", @@ -1285,7 +1285,7 @@ }, { "Input": "Ik miste juli, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juli, 2001", @@ -1297,7 +1297,7 @@ }, { "Input": "Ik ben in augustus weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "augustus", @@ -1309,7 +1309,7 @@ }, { "Input": "Ik ben aanstaande augustus weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande augustus", @@ -1321,7 +1321,7 @@ }, { "Input": "Ik ben maand augustus weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand augustus", @@ -1333,7 +1333,7 @@ }, { "Input": "Ik ben de maand augustus weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand augustus", @@ -1345,7 +1345,7 @@ }, { "Input": "Ik miste augustus 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "augustus 2001", @@ -1357,7 +1357,7 @@ }, { "Input": "Ik miste augustus, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "augustus, 2001", @@ -1369,7 +1369,7 @@ }, { "Input": "Ik ben in september weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "september", @@ -1381,7 +1381,7 @@ }, { "Input": "Ik ben aanstaande september weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande september", @@ -1393,7 +1393,7 @@ }, { "Input": "Ik ben maand september weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand september", @@ -1405,7 +1405,7 @@ }, { "Input": "Ik ben de maand september weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand september", @@ -1417,7 +1417,7 @@ }, { "Input": "Ik miste september 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "september 2001", @@ -1429,7 +1429,7 @@ }, { "Input": "Ik miste september, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "september, 2001", @@ -1441,7 +1441,7 @@ }, { "Input": "Ik ben in oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "oktober", @@ -1453,7 +1453,7 @@ }, { "Input": "Ik ben aanstaande oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande oktober", @@ -1465,7 +1465,7 @@ }, { "Input": "Ik ben maand oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand oktober", @@ -1477,7 +1477,7 @@ }, { "Input": "Ik ben de maand oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand oktober", @@ -1489,7 +1489,7 @@ }, { "Input": "Ik miste oktober 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "oktober 2001", @@ -1501,7 +1501,7 @@ }, { "Input": "Ik miste oktober, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "oktober, 2001", @@ -1513,7 +1513,7 @@ }, { "Input": "Ik ben november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november", @@ -1525,7 +1525,7 @@ }, { "Input": "Ik ben aanstaande november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande november", @@ -1537,7 +1537,7 @@ }, { "Input": "Ik ben maand november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand november", @@ -1549,7 +1549,7 @@ }, { "Input": "Ik ben de maand november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand november", @@ -1561,7 +1561,7 @@ }, { "Input": "Ik miste november 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november 2001", @@ -1573,7 +1573,7 @@ }, { "Input": "Ik miste november, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november, 2001", @@ -1585,7 +1585,7 @@ }, { "Input": "Ik ben in december weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "december", @@ -1597,7 +1597,7 @@ }, { "Input": "Ik ben aanstaande december weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aanstaande december", @@ -1609,7 +1609,7 @@ }, { "Input": "Ik ben maand december weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand december", @@ -1621,7 +1621,7 @@ }, { "Input": "Ik ben de maand december weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand december", @@ -1633,7 +1633,7 @@ }, { "Input": "Ik miste december 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "december 2001", @@ -1645,7 +1645,7 @@ }, { "Input": "Ik miste december, 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "december, 2001", @@ -1657,7 +1657,7 @@ }, { "Input": "Agenda voor de maand september", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de maand september", @@ -1669,7 +1669,7 @@ }, { "Input": "Ik ben deze maand van 4 tot 22 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze maand van 4 tot 22", @@ -1681,7 +1681,7 @@ }, { "Input": "Ik ben volgende maand van 4 tot 23 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maand van 4 tot 23", @@ -1693,7 +1693,7 @@ }, { "Input": "Ik ben weg van 3 tot 12 sep hahaha", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3 tot 12 sep", @@ -1705,7 +1705,7 @@ }, { "Input": "Ik ben weg van 4 tot 23 volgende maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 4 tot 23 volgende maand", @@ -1717,7 +1717,7 @@ }, { "Input": "Ik ben weg van 4 tot 22 deze maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 4 tot 22 deze maand", @@ -1729,7 +1729,7 @@ }, { "Input": "Ik ben weg tussen 4 en 22 deze maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 4 en 22 deze maand", @@ -1741,7 +1741,7 @@ }, { "Input": "Ik ben weg tussen 3 en 12 van sep hahaha", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 en 12 van sep", @@ -1753,7 +1753,7 @@ }, { "Input": "Ik ben weg tussen 4e september tot en met 8e september ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 4e september tot en met 8e september", @@ -1765,7 +1765,7 @@ }, { "Input": "Ik ben weg tussen 15e november tot en met 19e ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 15e november tot en met 19e", @@ -1777,7 +1777,7 @@ }, { "Input": "Ik ben weg tussen 15e november tot en met de 19e ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 15e november tot en met de 19e", @@ -1789,7 +1789,7 @@ }, { "Input": "Ik ben weg tussen de 15e november tot en met 19e ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen de 15e november tot en met 19e", @@ -1801,7 +1801,7 @@ }, { "Input": "Ik ben weg van 4 tot 22 januari, 2017", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 4 tot 22 januari, 2017", @@ -1813,7 +1813,7 @@ }, { "Input": "Ik ben weg tussen 4-22 januari, 2017", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 4-22 januari, 2017", @@ -1825,7 +1825,7 @@ }, { "Input": "Ik ben weg op deze week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week", @@ -1837,7 +1837,7 @@ }, { "Input": "Ik ben weg de komende week ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "komende week", @@ -1849,7 +1849,7 @@ }, { "Input": "Ik ben weg in september", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "september", @@ -1861,7 +1861,7 @@ }, { "Input": "Ik ben weg afgelopen september", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen september", @@ -1873,7 +1873,7 @@ }, { "Input": "Ik ben volgende juni weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende juni", @@ -1885,7 +1885,7 @@ }, { "Input": "Ik ben juni 2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni 2016", @@ -1897,7 +1897,7 @@ }, { "Input": "Ik ben juni volgend jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni volgend jaar", @@ -1909,7 +1909,7 @@ }, { "Input": "Ik ben dit weekend weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dit weekend", @@ -1921,7 +1921,7 @@ }, { "Input": "Ik ben de derde week van deze maand weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de derde week van deze maand", @@ -1933,7 +1933,7 @@ }, { "Input": "Ik ben de laatste week van juli weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de laatste week van juli", @@ -1945,7 +1945,8 @@ }, { "Input": "Plan kamperen in voor vrijdag tot en met zondag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vrijdag tot en met zondag", @@ -1957,7 +1958,7 @@ }, { "Input": "Ik ben de volgende 3 dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende 3 dagen", @@ -1969,7 +1970,7 @@ }, { "Input": "Ik ben de volgende 3 maanden weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende 3 maanden", @@ -1981,22 +1982,22 @@ }, { "Input": "Ik ben over 3 jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik ben over 3 weken weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik ben over 3 maanden weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik ben de afgelopen 3 weken weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen 3 weken", @@ -2008,7 +2009,7 @@ }, { "Input": "Ik ben de afgelopen 3 jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen 3 jaar", @@ -2020,7 +2021,7 @@ }, { "Input": "Ik ben afgelopen jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen jaar", @@ -2032,7 +2033,7 @@ }, { "Input": "Ik ben vorige maand weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vorige maand", @@ -2044,7 +2045,7 @@ }, { "Input": "Ik ben vorige 3 weken weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vorige 3 weken", @@ -2056,7 +2057,7 @@ }, { "Input": "afgelopen paar weken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen paar weken", @@ -2068,7 +2069,7 @@ }, { "Input": "afgelopen paar dagen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen paar dagen", @@ -2080,7 +2081,7 @@ }, { "Input": "Ik ben 2 okt. tot 22 oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 okt. tot 22 oktober", @@ -2092,7 +2093,7 @@ }, { "Input": "Ik ben 12 januari, 2016 tot 22-02-2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari, 2016 tot 22-02-2016", @@ -2104,7 +2105,7 @@ }, { "Input": "Ik ben 1e jan tot woens 22 jan weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1e jan tot woens 22 jan", @@ -2116,7 +2117,7 @@ }, { "Input": "Ik ben vandaag tot morgen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag tot morgen", @@ -2128,7 +2129,7 @@ }, { "Input": "Ik ben vandaag tot 22 oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag tot 22 oktober", @@ -2140,7 +2141,7 @@ }, { "Input": "Ik ben 2 okt. tot overmorgen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 okt. tot overmorgen", @@ -2152,7 +2153,7 @@ }, { "Input": "Ik ben vandaag tot volgende zondag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag tot volgende zondag", @@ -2164,7 +2165,7 @@ }, { "Input": "Ik ben deze vrijdag tot volgende zondag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag tot volgende zondag", @@ -2176,7 +2177,7 @@ }, { "Input": "Ik ben van 2 okt. tot 22 oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 2 okt. tot 22 oktober", @@ -2188,7 +2189,7 @@ }, { "Input": "Ik ben van 12-08-2015 tot 22 oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 12-08-2015 tot 22 oktober", @@ -2200,7 +2201,7 @@ }, { "Input": "Ik ben van vrijdag de 2e tot dinsdag de 6e weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van vrijdag de 2e tot dinsdag de 6e", @@ -2212,7 +2213,7 @@ }, { "Input": "Ik ben van vandaag tot morgen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van vandaag tot morgen", @@ -2224,7 +2225,7 @@ }, { "Input": "Ik ben van deze vrijdag tot volgende zondag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van deze vrijdag tot volgende zondag", @@ -2236,7 +2237,7 @@ }, { "Input": "Ik ben tussen 2 okt. en 22 oktober weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 2 okt. en 22 oktober", @@ -2248,7 +2249,7 @@ }, { "Input": "Ik ben 19-20 november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19-20 november", @@ -2260,7 +2261,7 @@ }, { "Input": "Ik ben 19 tot 20 november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19 tot 20 november", @@ -2272,7 +2273,7 @@ }, { "Input": "Ik ben november tussen 19 en 20 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november tussen 19 en 20", @@ -2284,7 +2285,7 @@ }, { "Input": "Ik ben het derde kwartaal van 2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het derde kwartaal van 2016", @@ -2296,7 +2297,7 @@ }, { "Input": "Ik ben het derde kwartaal dit jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het derde kwartaal dit jaar", @@ -2308,7 +2309,7 @@ }, { "Input": "Ik ben 2016 het derde kwartaal weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 het derde kwartaal", @@ -2320,7 +2321,7 @@ }, { "Input": "Ik ben tijdens K1 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K1", @@ -2332,7 +2333,7 @@ }, { "Input": "Ik ben dit K3 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K3", @@ -2344,7 +2345,7 @@ }, { "Input": "Ik ben 2015.3 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015.3", @@ -2356,7 +2357,7 @@ }, { "Input": "Ik ben 2015-3 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015-3", @@ -2368,7 +2369,7 @@ }, { "Input": "Ik ben 2015/3 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015/3", @@ -2380,7 +2381,7 @@ }, { "Input": "Ik ben 3/2015 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3/2015", @@ -2392,7 +2393,7 @@ }, { "Input": "Ik ben de derde week van 2027 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de derde week van 2027", @@ -2404,7 +2405,7 @@ }, { "Input": "Ik ben volgend jaar de derde week weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgend jaar de derde week", @@ -2416,7 +2417,7 @@ }, { "Input": "Ik vertrek deze zomer", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze zomer", @@ -2428,7 +2429,7 @@ }, { "Input": "Ik vertrek volgende lente", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende lente", @@ -2440,7 +2441,7 @@ }, { "Input": "Ik vertrek de zomer", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de zomer", @@ -2452,7 +2453,7 @@ }, { "Input": "Ik vertrek zomer", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zomer", @@ -2464,7 +2465,7 @@ }, { "Input": "Ik vertrek zomer 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zomer 2016", @@ -2476,7 +2477,7 @@ }, { "Input": "Ik vertrek zomer van 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zomer van 2016", @@ -2488,7 +2489,7 @@ }, { "Input": "vakanties aankomende maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aankomende maand", @@ -2500,7 +2501,7 @@ }, { "Input": "vakantie volgende maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maand", @@ -2512,7 +2513,7 @@ }, { "Input": "Wat heb ik de week van 30e november", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de week van 30e november", @@ -2524,7 +2525,7 @@ }, { "Input": "de week van 15e september", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de week van 15e september", @@ -2536,7 +2537,7 @@ }, { "Input": "week van 15e september", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "week van 15e september", @@ -2548,7 +2549,7 @@ }, { "Input": "maand van 15e september", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand van 15e september", @@ -2560,7 +2561,7 @@ }, { "Input": "Ik vertrek tijdens het weekend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het weekend", @@ -2572,7 +2573,7 @@ }, { "Input": "Ik vertrek de rest van de week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de week", @@ -2584,7 +2585,7 @@ }, { "Input": "Ik vertrek de rest van mijn week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van mijn week", @@ -2596,7 +2597,7 @@ }, { "Input": "Ik vertrek rest van week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van week", @@ -2608,7 +2609,7 @@ }, { "Input": "Ik vertrek rest van de week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de week", @@ -2620,7 +2621,7 @@ }, { "Input": "Ik vertrek rest van deze week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van deze week", @@ -2632,7 +2633,7 @@ }, { "Input": "Ik vertrek rest van huidige week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van huidige week", @@ -2644,7 +2645,7 @@ }, { "Input": "Ik vertrek rest van de maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de maand", @@ -2656,7 +2657,7 @@ }, { "Input": "Ik vertrek rest van het jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van het jaar", @@ -2668,7 +2669,7 @@ }, { "Input": "Zoek een tijd om elkaar later deze maand te ontmoeten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "later deze maand", @@ -2680,7 +2681,7 @@ }, { "Input": "Zoek een tijd om elkaar later deze week te ontmoeten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "later deze week", @@ -2692,7 +2693,7 @@ }, { "Input": "Zoek een tijd om elkaar eind volgende week te ontmoeten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind volgende week", @@ -2704,7 +2705,7 @@ }, { "Input": "Zoek een tijd om elkaar eind volgend jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind volgend jaar", @@ -2716,7 +2717,7 @@ }, { "Input": "We hebben eind vorige week afgesproken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind vorige week", @@ -2728,7 +2729,7 @@ }, { "Input": "Zoek een tijd voor ons om af te spreken begin deze maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin deze maand", @@ -2740,7 +2741,7 @@ }, { "Input": "Zoek een tijd voor ons om af te spreken begin deze week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin deze week", @@ -2752,7 +2753,7 @@ }, { "Input": "Zoek een tijd voor ons om af te spreken begin volgende week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin volgende week", @@ -2764,7 +2765,7 @@ }, { "Input": "Zoek een tijd voor ons om af te spreken begin volgend jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin volgend jaar", @@ -2776,7 +2777,7 @@ }, { "Input": "Cortana, regel alsjeblieft een meeting van 25 minuten met antonio volgende week tussen woensdag en vrijdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week tussen woensdag en vrijdag", @@ -2788,7 +2789,7 @@ }, { "Input": "Ik ben jaar 247 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jaar 247", @@ -2800,7 +2801,7 @@ }, { "Input": "In de jaren 1970", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren 1970", @@ -2812,7 +2813,7 @@ }, { "Input": "In de jaren 2000 werd hij geboren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren 2000", @@ -2824,7 +2825,7 @@ }, { "Input": "In de jaren '70", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren '70", @@ -2836,7 +2837,7 @@ }, { "Input": "In de jaren '40", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren '40", @@ -2848,7 +2849,7 @@ }, { "Input": "In de jaren zeventig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren zeventig", @@ -2860,7 +2861,7 @@ }, { "Input": "In de jaren negentienzeventig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren negentienzeventig", @@ -2872,7 +2873,7 @@ }, { "Input": "In de jaren tweeduizend tien", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren tweeduizend tien", @@ -2884,7 +2885,7 @@ }, { "Input": "In de jaren tweeduizend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren tweeduizend", @@ -2896,7 +2897,7 @@ }, { "Input": "In de jaren nul", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de jaren nul", @@ -2908,7 +2909,7 @@ }, { "Input": "Ik ben van 2 tot 7 feb, tweeduizend achttien weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 2 tot 7 feb, tweeduizend achttien", @@ -2920,7 +2921,7 @@ }, { "Input": "Ik ben tussen 2 tot 7 feb tweeduizend achttien weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 2 tot 7 feb tweeduizend achttien", @@ -2932,7 +2933,7 @@ }, { "Input": "Ik ben feb tussen 2-7 tweeduizend achttien weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "feb tussen 2-7 tweeduizend achttien", @@ -2944,7 +2945,7 @@ }, { "Input": "Het gebeurde in juni van negentiennegenennegentig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni van negentiennegenennegentig", @@ -2956,7 +2957,7 @@ }, { "Input": "In negentienachtentwintig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "negentienachtentwintig", @@ -2968,7 +2969,7 @@ }, { "Input": "Ik ben de eerste week van tweeduizend zevenentwintig weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste week van tweeduizend zevenentwintig", @@ -2980,7 +2981,7 @@ }, { "Input": "Ik ben het eerste kwartaal van tweeduizend twintig weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het eerste kwartaal van tweeduizend twintig", @@ -2992,7 +2993,7 @@ }, { "Input": "In de lente van negentienachtenzeventig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de lente van negentienachtenzeventig", @@ -3004,7 +3005,7 @@ }, { "Input": "Jaar tweehonderdzevenenzestig,", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Jaar tweehonderdzevenenzestig", @@ -3016,7 +3017,7 @@ }, { "Input": "Ik ben de week na de volgende weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de week na de volgende", @@ -3028,7 +3029,7 @@ }, { "Input": "Het gebeurde in de afgelopen 2 decennia", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de afgelopen 2 decennia", @@ -3040,7 +3041,7 @@ }, { "Input": "Het gebeurde in de laatste twee decennia", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de laatste twee decennia", @@ -3052,7 +3053,7 @@ }, { "Input": "Het gebeurde in het volgende decennium", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het volgende decennium", @@ -3064,7 +3065,8 @@ }, { "Input": "Het zal 4 weken in de toekomst gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "4 weken in de toekomst", @@ -3076,7 +3078,8 @@ }, { "Input": "Het zal 2 dagen daarna gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 dagen daarna", @@ -3088,7 +3091,7 @@ }, { "Input": "Cortana kan een tijd begin volgende week voor ons vinden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin volgende week", @@ -3100,7 +3103,7 @@ }, { "Input": "Natuurlijk, laten we eind van volgende week Skypen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van volgende week", @@ -3112,7 +3115,7 @@ }, { "Input": "Cortana kan half maart een ontmoeting voor ons regelen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half maart", @@ -3124,7 +3127,7 @@ }, { "Input": "en anders tegen midzomer?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "midzomer", @@ -3136,7 +3139,7 @@ }, { "Input": "Ik kan begin van volgende week een tijd voor ons vastleggen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin van volgende week", @@ -3148,7 +3151,7 @@ }, { "Input": "Ik ben 11-2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11-2016", @@ -3160,7 +3163,7 @@ }, { "Input": "Ik ben 11/2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11/2016", @@ -3172,7 +3175,7 @@ }, { "Input": "Ik ben 2016/11 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016/11", @@ -3184,7 +3187,7 @@ }, { "Input": "Ik ben 2016-11 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016-11", @@ -3196,7 +3199,7 @@ }, { "Input": "Ik ben 2016 november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 november", @@ -3208,7 +3211,7 @@ }, { "Input": "Ik ben november, 2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november, 2016", @@ -3220,7 +3223,7 @@ }, { "Input": "Ik ben 2016, nov weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016, nov", @@ -3232,7 +3235,7 @@ }, { "Input": "Ik ben tussen de 1e januari en de 5e april weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen de 1e januari en de 5e april", @@ -3244,7 +3247,8 @@ }, { "Input": "Ik ben tussen de 1e januari 2015 en de 5e feb 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen de 1e januari 2015 en de 5e feb 2018", @@ -3256,7 +3260,7 @@ }, { "Input": "Ik ben tussen de 1e januari 2015 en feb 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen de 1e januari 2015 en feb 2018", @@ -3268,7 +3272,8 @@ }, { "Input": "Ik ben tussen 2015 en feb 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 2015 en feb 2018", @@ -3280,7 +3285,7 @@ }, { "Input": "Ik ben van 1 feb tot maart 2019 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1 feb tot maart 2019", @@ -3292,7 +3297,8 @@ }, { "Input": "Ik ben tussen 1 feb en maart 2019 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 1 feb en maart 2019", @@ -3304,7 +3310,8 @@ }, { "Input": "Ik ben tussen juni 2015 en mei 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen juni 2015 en mei 2018", @@ -3316,7 +3323,8 @@ }, { "Input": "Ik ben tussen mei 2015 en 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen mei 2015 en 2018", @@ -3328,7 +3336,8 @@ }, { "Input": "Ik ben tussen mei 2015 en juni 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen mei 2015 en juni 2018", @@ -3340,7 +3349,8 @@ }, { "Input": "Ik ben tussen 2015 en de 5e van januari 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 2015 en de 5e van januari 2018", @@ -3352,7 +3362,7 @@ }, { "Input": "Ik ben van 2015 tot 5 mei 2017 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 2015 tot 5 mei 2017", @@ -3364,7 +3374,7 @@ }, { "Input": "Ik ben van laatste maandag april tot 2019 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van laatste maandag april tot 2019", @@ -3376,7 +3386,7 @@ }, { "Input": "Ik ben van week 31 tot week 35 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van week 31 tot week 35", @@ -3388,7 +3398,8 @@ }, { "Input": "Ik ben tussen week 31 en week 35 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen week 31 en week 35", @@ -3400,7 +3411,8 @@ }, { "Input": "Ik zal hier blijven van vandaag tot tweeënhalve dag later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van vandaag tot tweeënhalve dag later", @@ -3412,7 +3424,7 @@ }, { "Input": "Wat is mijn bonus van april 2017?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "april 2017", @@ -3424,7 +3436,7 @@ }, { "Input": "Ik was daar niet in dezelfde maand dat het gebeurd", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dezelfde maand", @@ -3436,7 +3448,7 @@ }, { "Input": "Ik was daar niet in dezelfde week dat het gebeurd", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dezelfde week", @@ -3448,7 +3460,7 @@ }, { "Input": "Ik was er niet dat jaar.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dat jaar", @@ -3460,7 +3472,8 @@ }, { "Input": "Ik heb al mijn werk al meer dan 2 weken voor vandaag afgerond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 weken voor vandaag", @@ -3472,7 +3485,7 @@ }, { "Input": "Ik kom binnen 2 weken vanaf vandaag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "binnen 2 weken vanaf vandaag", @@ -3484,7 +3497,8 @@ }, { "Input": "Ik kom binnen minder dan 2 weken vanaf vandaag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen minder dan 2 weken vanaf vandaag", @@ -3496,7 +3510,8 @@ }, { "Input": "Deze taak zou meer dan 2 dagen voor gisteren moeten zijn gedaan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 dagen voor gisteren", @@ -3508,7 +3523,8 @@ }, { "Input": "Deze taak zal minder dan 3 dagen na morgen afgerond zijn", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "javascript, java, python", "Results": [ { "Text": "minder dan 3 dagen na morgen", @@ -3520,7 +3536,7 @@ }, { "Input": "Ik miste okt. 2001", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "okt. 2001", @@ -3532,7 +3548,7 @@ }, { "Input": "verkoop waarvan de datum dit decennium is", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dit decennium", @@ -3544,7 +3560,7 @@ }, { "Input": "Ik ben het derde kwartaal weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het derde kwartaal", @@ -3556,7 +3572,7 @@ }, { "Input": "Ik ben het derde kwartaal van volgend jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het derde kwartaal van volgend jaar", @@ -3568,7 +3584,7 @@ }, { "Input": "Ik ben het vierde kwartaal van volgend jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het vierde kwartaal van volgend jaar", @@ -3580,12 +3596,12 @@ }, { "Input": "Zet alsjeblieft $2000 om naar Britse ponden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Het aandeel van deze bank is 20% lager in het jaar tot op heden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "jaar tot op heden", @@ -3597,7 +3613,7 @@ }, { "Input": "van 1-10 tot 7-11", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1-10 tot 7-11", @@ -3609,7 +3625,7 @@ }, { "Input": "Ik zal mijn werk doen tussen nu en november 15e", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tussen nu en november 15e", @@ -3621,7 +3637,7 @@ }, { "Input": "Ik heb mijn werk tussen 22 jan en nu afgerond", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tussen 22 jan en nu", @@ -3633,7 +3649,7 @@ }, { "Input": "15.00 : ik ben deze week weg", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -3645,8 +3661,8 @@ }, { "Input": "deze week 8.00 zou een datumreeks en een tijdstip moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -3658,8 +3674,8 @@ }, { "Input": "deze week 20.00 zou een datumreeks en een tijdstip moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -3671,7 +3687,7 @@ }, { "Input": "week 10 20.00 zou een datumreeks en een tijdstip moeten zijn", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "week 10", @@ -3683,7 +3699,7 @@ }, { "Input": "week 10 10:20 zou een datumreeks en een tijdstip moeten zijn", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "week 10", @@ -3695,7 +3711,7 @@ }, { "Input": "6,107.31 augustus 2019 zou het decimaal niet moeten bevatten", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "augustus 2019", @@ -3707,7 +3723,7 @@ }, { "Input": "Ik was daar niet van 01/aug/2019 tot vandaag", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 01/aug/2019 tot vandaag", @@ -3719,7 +3735,7 @@ }, { "Input": "Ik was daar niet van 01-aug-2019 tot vandaag", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 01-aug-2019 tot vandaag", @@ -3731,8 +3747,8 @@ }, { "Input": "plan alsjeblieft een meeting in voor de week die 4 februari aanvangt", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die 4 februari aanvangt", @@ -3744,8 +3760,8 @@ }, { "Input": "plan alsjeblieft een meeting in voor de week die 4 februari start", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die 4 februari start", @@ -3757,8 +3773,8 @@ }, { "Input": "plan alsjeblieft een meeting in voor de week die op 4 februari start", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die op 4 februari start", @@ -3770,8 +3786,8 @@ }, { "Input": "plan alsjeblieft een meeting in voor de week die op 4 februari begint", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die op 4 februari begint", @@ -3783,8 +3799,8 @@ }, { "Input": "plan alsjeblieft een meeting in voor de week die 4 februari begint", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die 4 februari begint", @@ -3796,7 +3812,7 @@ }, { "Input": "Boek een reis van 26e juni van 2020 tot 28e juni van 2020", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 26e juni van 2020 tot 28e juni van 2020", @@ -3805,5 +3821,27 @@ "Length": 43 } ] + }, + { + "Input": "Laat me de gegevens van augustus 99 zien", + "Results": [ + { + "Text": "augustus 99", + "Type": "daterange", + "Start": 24, + "Length": 11 + } + ] + }, + { + "Input": "Laat me de gegevens van augustus '99 zien", + "Results": [ + { + "Text": "augustus '99", + "Type": "daterange", + "Start": 24, + "Length": 12 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Dutch/DatePeriodParser.json b/Specs/DateTime/Dutch/DatePeriodParser.json index 744a00a1ac..83438bb7ca 100644 --- a/Specs/DateTime/Dutch/DatePeriodParser.json +++ b/Specs/DateTime/Dutch/DatePeriodParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze maand van 4 tot 22", @@ -30,7 +30,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maand van 4-23", @@ -56,7 +56,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3 tot 12 van sept", @@ -82,7 +82,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van vrijdag de 11e tot dinsdag de 15e", @@ -108,7 +108,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maand 4 tot 23", @@ -134,7 +134,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze maand 4 tot 23", @@ -160,7 +160,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze maand tussen 4 en 22", @@ -186,7 +186,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 en 12 van sept", @@ -212,7 +212,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 4 tot 22 januari 1995", @@ -238,7 +238,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 4-22 januari 1995", @@ -264,7 +264,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen de 4e van september tot en met de 8e van september", @@ -290,7 +290,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week", @@ -316,7 +316,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "komende week", @@ -342,7 +342,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "huidige week", @@ -368,7 +368,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "februari", @@ -394,7 +394,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze september", @@ -420,7 +420,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen september", @@ -446,7 +446,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende juni", @@ -472,7 +472,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de derde week van deze maand", @@ -498,7 +499,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de laatste week van juli", @@ -524,7 +525,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "week van september de 16e", @@ -550,7 +551,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maand van september de 16e", @@ -576,7 +577,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015.3", @@ -602,7 +603,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015-3", @@ -628,7 +629,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3-2015", @@ -654,7 +655,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { @@ -662,7 +663,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "komende 2 dagen", @@ -688,7 +689,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "afgelopen paar dagen", @@ -714,7 +716,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "afgelopen enkele dagen", @@ -740,7 +743,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de week", @@ -766,7 +769,7 @@ "Context": { "ReferenceDateTime": "2026-01-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week", @@ -792,7 +795,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mijn week", @@ -818,7 +821,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het weekend", @@ -844,7 +847,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dit weekend", @@ -870,7 +873,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mijn weekend", @@ -896,7 +899,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 okt. tot 22 oktober", @@ -922,7 +925,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 januari 2016 - 22-01-2016", @@ -948,7 +951,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 1e van jan tot woens, de 22e jan", @@ -974,7 +977,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag tot morgen", @@ -1000,7 +1003,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 2 okt. tot 22 oktober", @@ -1026,7 +1029,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 2 okt. en 22 oktober", @@ -1052,7 +1055,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19-20 november", @@ -1078,7 +1081,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19 tot 20 november", @@ -1104,7 +1107,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 19 en 20 november", @@ -1130,7 +1133,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de week", @@ -1156,7 +1159,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van week", @@ -1182,7 +1185,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest deze week", @@ -1208,7 +1211,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van mijn week", @@ -1234,7 +1237,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van huidige week", @@ -1260,7 +1263,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de maand", @@ -1286,7 +1289,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van het jaar", @@ -1312,7 +1315,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dit weekend", @@ -1338,7 +1341,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dit weekend", @@ -1364,7 +1367,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "juni 2016", @@ -1390,7 +1393,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgend jaar juni", @@ -1416,7 +1419,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgend jaar", @@ -1442,7 +1445,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "komende 3 dagen", @@ -1468,7 +1471,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "komende 3 maanden", @@ -1491,7 +1494,7 @@ }, { "Input": "Ik ben over 3 jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, @@ -1502,7 +1505,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de eerste week van okt", @@ -1528,7 +1531,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de derde week van 2027", @@ -1554,7 +1558,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "volgend jaar de derde week", @@ -1580,7 +1585,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het derde kwartaal van 2016", @@ -1606,7 +1611,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dit jaar het derde kwartaal", @@ -1632,7 +1637,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 het derde kwartaal", @@ -1658,7 +1663,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K3 dit jaar", @@ -1684,7 +1689,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 K3", @@ -1710,7 +1715,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K3", @@ -1736,7 +1741,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K2", @@ -1762,7 +1767,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K1 2016", @@ -1788,7 +1793,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "K4 2016", @@ -1814,7 +1819,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze zomer", @@ -1834,7 +1839,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende lente", @@ -1854,7 +1859,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de zomer", @@ -1874,7 +1879,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zomer", @@ -1894,7 +1899,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zomer 2016", @@ -1914,7 +1919,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zomer van 2016", @@ -1934,7 +1939,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aankomende maand", @@ -1960,7 +1965,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maand", @@ -1986,7 +1991,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind deze maand", @@ -2013,7 +2018,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind deze week", @@ -2040,7 +2045,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind dit jaar", @@ -2067,7 +2072,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin volgend jaar", @@ -2094,7 +2099,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin volgende week", @@ -2121,7 +2126,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin volgende maand", @@ -2148,7 +2153,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind vorig jaar", @@ -2175,7 +2180,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind vorige week", @@ -2202,7 +2207,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind vorige maand", @@ -2229,7 +2234,7 @@ "Context": { "ReferenceDateTime": "2017-11-14T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week tussen woensdag en vrijdag", @@ -2255,7 +2260,7 @@ "Context": { "ReferenceDateTime": "2017-11-17T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week", @@ -2281,7 +2286,8 @@ "Context": { "ReferenceDateTime": "2017-11-17T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de eerste week van dit jaar", @@ -2307,7 +2313,7 @@ "Context": { "ReferenceDateTime": "2017-11-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerste week van 2015", @@ -2333,7 +2339,8 @@ "Context": { "ReferenceDateTime": "2017-11-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tweede week van 2015", @@ -2359,7 +2366,7 @@ "Context": { "ReferenceDateTime": "2017-11-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste week van 2015", @@ -2385,7 +2392,8 @@ "Context": { "ReferenceDateTime": "2017-12-18T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "jaar 247", @@ -2411,7 +2419,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren 1970", @@ -2437,7 +2446,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren 2000", @@ -2463,7 +2473,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren '70", @@ -2489,7 +2500,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "jaren '70", @@ -2515,7 +2527,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren '40", @@ -2541,7 +2554,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren zeventig", @@ -2567,7 +2581,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren negentien zeventig", @@ -2593,7 +2608,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren tweeduizend tien", @@ -2619,7 +2635,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren tweeduizend", @@ -2645,7 +2662,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de jaren nul", @@ -2671,7 +2689,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 2 tot 7 feb, tweeduizend achttien", @@ -2697,7 +2716,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 2 en 7 feb tweeduizend achttien", @@ -2723,7 +2743,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "in feb tussen 2-7 tweeduizend achttien", @@ -2749,7 +2770,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "juni negentiennegenennegentig", @@ -2775,7 +2797,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "negentienachtentwintig", @@ -2801,7 +2823,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zeventienhonderdnegenentachtig", @@ -2827,7 +2849,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de derde week van tweeduizend zevenentwintig", @@ -2853,7 +2876,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "het derde kwartaal van tweeduizend twintig", @@ -2879,7 +2903,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de lente van negentienachtenzeventig", @@ -2899,7 +2924,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "jaar tweehonderdzevenenzestig", @@ -2925,7 +2951,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de week na de volgende", @@ -2951,7 +2977,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de maand na de volgende", @@ -2977,7 +3004,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "het jaar na het volgende", @@ -3003,7 +3031,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "het weekend na het volgende", @@ -3029,7 +3058,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2014-2018", @@ -3055,7 +3085,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 2014-2018", @@ -3081,7 +3112,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 2014 tot 2018", @@ -3107,7 +3139,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "in 2014 tot en met 2018", @@ -3133,7 +3166,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van tweeduizend tot tweeduizend veertien", @@ -3159,7 +3193,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de afgelopen 2 decennia", @@ -3185,7 +3220,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "de laatste 2 decennia", @@ -3211,7 +3247,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "het volgende decennium", @@ -3237,7 +3274,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "javascript, python", "Results": [ { "Text": "de volgende 3 decennia", @@ -3263,7 +3301,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "4 weken in de toekomst", @@ -3289,7 +3328,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 dagen daarna", @@ -3315,7 +3355,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin van volgende week", @@ -3342,7 +3382,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van volgende week", @@ -3369,7 +3409,7 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin van volgende week", @@ -3396,7 +3436,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "midzomer", @@ -3417,7 +3458,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 dagen", @@ -3443,7 +3485,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 10 maanden", @@ -3469,7 +3512,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 3 jaar", @@ -3495,7 +3539,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 jaar 1 maand en 12 dagen", @@ -3521,7 +3566,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen de volgende 3 jaar", @@ -3547,7 +3593,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen de aankomende 5 jaar 1 maand en 12 dagen", @@ -3573,7 +3620,7 @@ "Context": { "ReferenceDateTime": "2018-04-02T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 02 tot 07 april", @@ -3599,7 +3646,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { @@ -3607,7 +3654,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 juni", @@ -3633,7 +3680,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016, nov", @@ -3659,7 +3706,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november, 2016", @@ -3685,7 +3732,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november 2016", @@ -3711,7 +3758,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016-11", @@ -3737,7 +3784,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 - 11", @@ -3763,7 +3810,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016/11", @@ -3789,7 +3836,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 / 11", @@ -3815,7 +3862,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11-2016", @@ -3841,7 +3888,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11 - 2016", @@ -3867,7 +3914,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11/2016", @@ -3893,7 +3940,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11 / 2016", @@ -3920,7 +3967,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "Comment": "Compound timex represent value dependency and will be split at the model level", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 1 januari en 5 april", @@ -3946,7 +3993,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 1 januari 2015 en 5 februari 2018", @@ -3972,7 +4019,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 1 januari 2015 en feb 2018", @@ -3998,7 +4046,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 2015 en feb 2018", @@ -4024,7 +4073,8 @@ "Context": { "ReferenceDateTime": "2018-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 1 feb tot maart 2019", @@ -4050,7 +4100,8 @@ "Context": { "ReferenceDateTime": "2018-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 1 feb en maart 2019", @@ -4076,7 +4127,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen juni 2015 en mei 2018", @@ -4102,7 +4154,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen mei 2015 en 2018", @@ -4128,7 +4181,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen mei 2015 en juni 2018", @@ -4154,7 +4208,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 2015 en 5 januari 2018", @@ -4180,7 +4235,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 2015 tot 5 mei 2017", @@ -4206,7 +4262,8 @@ "Context": { "ReferenceDateTime": "2018-05-04T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van de laatste maandag in april tot 2019", @@ -4232,7 +4289,8 @@ "Context": { "ReferenceDateTime": "2018-05-04T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van week 31 tot week 35", @@ -4258,7 +4316,8 @@ "Context": { "ReferenceDateTime": "2018-05-04T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen week 31 en week 35", @@ -4284,7 +4343,8 @@ "Context": { "ReferenceDateTime": "2018-05-04T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van vandaag tot tweeënhalve dag later", @@ -4310,7 +4370,8 @@ "Context": { "ReferenceDateTime": "2017-11-17T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "dezelfde week", @@ -4337,7 +4398,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "dezelfde maand", @@ -4364,7 +4426,8 @@ "Context": { "ReferenceDateTime": "2016-11-11T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "dat weekend", @@ -4391,7 +4454,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "datzelfde jaar", @@ -4418,7 +4482,7 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerder in de week", @@ -4444,7 +4508,8 @@ "Context": { "ReferenceDateTime": "2018-05-13T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "eerder deze maand", @@ -4470,7 +4535,8 @@ "Context": { "ReferenceDateTime": "2018-05-28T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "eerder dit jaar", @@ -4496,7 +4562,7 @@ "Context": { "ReferenceDateTime": "2017-11-10T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "later deze week", @@ -4522,7 +4588,8 @@ "Context": { "ReferenceDateTime": "2018-05-28T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "later deze maand", @@ -4548,7 +4615,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "later dit jaar", @@ -4574,7 +4642,8 @@ "Context": { "ReferenceDateTime": "2017-11-08T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "later in het jaar", @@ -4600,7 +4669,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 weken na vandaag", @@ -4625,7 +4695,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "minder dan 2 weken vanaf vandaag", @@ -4651,7 +4722,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 2 weken vanaf vandaag", @@ -4677,7 +4749,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 weken voor vandaag", @@ -4702,7 +4775,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 dagen voor gisteren", @@ -4727,7 +4801,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "minder dan 3 dagen na morgen", @@ -4753,7 +4828,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "15e eeuw", @@ -4779,7 +4855,8 @@ "Context": { "ReferenceDateTime": "2018-05-29T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "21e eeuw", @@ -4805,7 +4882,8 @@ "Context": { "ReferenceDateTime": "2018-08-31T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "dit decennium", @@ -4831,7 +4909,7 @@ "Context": { "ReferenceDateTime": "2018-10-24T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1-10 tot 7-11", @@ -4857,7 +4935,7 @@ "Context": { "ReferenceDateTime": "2018-10-24T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 25-10 tot 25-01", @@ -4883,7 +4961,7 @@ "Context": { "ReferenceDateTime": "2019-01-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -4909,7 +4987,7 @@ "Context": { "ReferenceDateTime": "2017-01-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -4935,7 +5013,7 @@ "Context": { "ReferenceDateTime": "2016-01-01T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -4961,7 +5039,7 @@ "Context": { "ReferenceDateTime": "2019-04-23T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tussen nu en 15 november", @@ -4987,7 +5065,7 @@ "Context": { "ReferenceDateTime": "2019-04-25T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tussen 22 jan en nu", @@ -5013,7 +5091,7 @@ "Context": { "ReferenceDateTime": "2019-07-11T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -5039,7 +5117,7 @@ "Context": { "ReferenceDateTime": "2019-07-11T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -5065,7 +5143,7 @@ "Context": { "ReferenceDateTime": "2019-07-11T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "deze week", @@ -5091,7 +5169,7 @@ "Context": { "ReferenceDateTime": "2019-07-11T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "week 10", @@ -5117,7 +5195,7 @@ "Context": { "ReferenceDateTime": "2019-07-11T00:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "week 10", @@ -5143,8 +5221,8 @@ "Context": { "ReferenceDateTime": "2019-07-30T15:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van aankomende vrijdag tot 1 okt 2020", @@ -5170,7 +5248,7 @@ "Context": { "ReferenceDateTime": "2019-07-30T15:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "augustus 2019", @@ -5196,7 +5274,7 @@ "Context": { "ReferenceDateTime": "2019-10-14T15:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 1-aug-2019 tot vandaag", @@ -5222,7 +5300,7 @@ "Context": { "ReferenceDateTime": "2019-09-30T15:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 01/aug/2019 tot vandaag", @@ -5248,8 +5326,8 @@ "Context": { "ReferenceDateTime": "2019-11-07T00:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die 4 februari aanvangt", @@ -5275,8 +5353,8 @@ "Context": { "ReferenceDateTime": "2019-11-07T00:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die 4 februari start", @@ -5302,8 +5380,8 @@ "Context": { "ReferenceDateTime": "2019-11-07T00:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die op 4 februari start", @@ -5329,8 +5407,8 @@ "Context": { "ReferenceDateTime": "2019-11-07T00:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die op 4 februari begint", @@ -5356,8 +5434,8 @@ "Context": { "ReferenceDateTime": "2019-11-07T00:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "de week die 4 februari begint", @@ -5383,8 +5461,8 @@ "Context": { "ReferenceDateTime": "2020-04-23T18:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "einde van 2000", @@ -5411,8 +5489,8 @@ "Context": { "ReferenceDateTime": "2020-04-23T18:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "begin van 2000", @@ -5439,8 +5517,8 @@ "Context": { "ReferenceDateTime": "2020-04-23T18:00:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "halverwege 2000", @@ -5461,5 +5539,51 @@ "Length": 15 } ] + }, + { + "Input": "Laat me de gegevens van augustus 99 zien", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "augustus 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 24, + "Length": 11 + } + ] + }, + { + "Input": "Laat me de gegevens van augustus '99 zien", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "augustus '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 24, + "Length": 12 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Dutch/DateTimeExtractor.json b/Specs/DateTime/Dutch/DateTimeExtractor.json index 3ef7439856..9ce633eea6 100644 --- a/Specs/DateTime/Dutch/DateTimeExtractor.json +++ b/Specs/DateTime/Dutch/DateTimeExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "Ik ga nu terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nu", @@ -13,7 +13,7 @@ }, { "Input": "Ik ga zo snel mogelijk terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zo snel mogelijk", @@ -25,7 +25,7 @@ }, { "Input": "Ik ga terug op 15 om 8:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00", @@ -37,7 +37,7 @@ }, { "Input": "Ik ga terug op 15 om 8:00:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00:30", @@ -49,7 +49,7 @@ }, { "Input": "Ik ga terug op 15 om 8.00:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8.00:30", @@ -61,7 +61,7 @@ }, { "Input": "Ik ga terug op 15, 20u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15, 20u", @@ -73,7 +73,7 @@ }, { "Input": "Ik ga terug op 21/04/2016, 20u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21/04/2016, 20u", @@ -85,7 +85,7 @@ }, { "Input": "Ik ga terug op 23 Okt om 7", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23 Okt om 7", @@ -97,7 +97,7 @@ }, { "Input": "Ik ga terug op 14 oktober 20:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 20:00", @@ -109,7 +109,7 @@ }, { "Input": "Ik ga terug op 14 oktober om 8:00:00u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober om 8:00:00u", @@ -121,7 +121,7 @@ }, { "Input": "Ik ga terug op 14 oktober, 8:00u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober, 8:00u", @@ -133,7 +133,7 @@ }, { "Input": "Ik ga morgen om 8:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen om 8:00", @@ -145,7 +145,7 @@ }, { "Input": "Ik ga morgen rond 8 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen rond 8 uur", @@ -157,7 +157,7 @@ }, { "Input": "Ik ga morgen voor 8u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen voor 8u", @@ -169,7 +169,7 @@ }, { "Input": "Ik ga morgen 8:00:05u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen 8:00:05u", @@ -181,7 +181,7 @@ }, { "Input": "Ik ga volgende week vrijdag om half 4 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week vrijdag om half 4", @@ -193,7 +193,7 @@ }, { "Input": "Ik ga terug op 5 mei 2016, 20 minuten over 8 in de avond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 mei 2016, 20 minuten over 8 in de avond", @@ -205,7 +205,7 @@ }, { "Input": "Ik ga terug 20.00 op 15", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20.00 op 15", @@ -217,7 +217,7 @@ }, { "Input": "Ik ga terug om zeven op 15", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zeven op 15", @@ -229,7 +229,7 @@ }, { "Input": "Ik ga terug om 20u komende zondag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20u komende zondag", @@ -241,7 +241,7 @@ }, { "Input": "Ik ga vandaag om 20u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag om 20u", @@ -253,7 +253,7 @@ }, { "Input": "Ik ga terug om kwart voor zeven morgen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor zeven morgen", @@ -265,7 +265,7 @@ }, { "Input": "Ik ga terug om 19u, 22-12-2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19u, 22-12-2016", @@ -277,7 +277,7 @@ }, { "Input": "Ik ga terug zeven uur morgen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zeven uur morgen", @@ -289,7 +289,7 @@ }, { "Input": "Ik ga terug om 7 uur morgenochtend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7 uur morgenochtend", @@ -301,7 +301,7 @@ }, { "Input": "Ik ga terug om 19:00 op zondagavond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:00 op zondagavond", @@ -313,7 +313,7 @@ }, { "Input": "Ik ga terug 20 minuten over vijf morgenochtend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20 minuten over vijf morgenochtend", @@ -325,7 +325,7 @@ }, { "Input": "Ik ga terug op 14 oktober om 8:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober om 8:00", @@ -337,7 +337,7 @@ }, { "Input": "Ik ga terug om 7u, deze ochtend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7u, deze ochtend", @@ -349,7 +349,7 @@ }, { "Input": "Ik ga terug om 20u 's avonds, maandag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20u 's avonds, maandag", @@ -361,7 +361,7 @@ }, { "Input": "Ik ga terug 20u in de avond, 1 jan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20u in de avond, 1 jan", @@ -373,7 +373,7 @@ }, { "Input": "Ik ga terug om 22h vanavond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22h vanavond", @@ -385,7 +385,7 @@ }, { "Input": "Ik ga terug om 8u deze morgen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8u deze morgen", @@ -397,7 +397,7 @@ }, { "Input": "Ik ga terug om 20u vanavond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20u vanavond", @@ -409,7 +409,7 @@ }, { "Input": "Ik ga terug vanavond rond 7", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond rond 7", @@ -421,7 +421,7 @@ }, { "Input": "Ik ga terug deze morgen om 7", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om 7", @@ -433,7 +433,7 @@ }, { "Input": "Ik ga terug vanmorgen om 7u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanmorgen om 7u", @@ -445,7 +445,7 @@ }, { "Input": "Ik ga deze morgen om zeven terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om zeven", @@ -457,7 +457,7 @@ }, { "Input": "Ik ga deze morgen om 7:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om 7:00", @@ -469,7 +469,7 @@ }, { "Input": "Ik ga vanavond om 7 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond om 7", @@ -481,7 +481,8 @@ }, { "Input": "voor 2 personen vanavond om 21.30u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vanavond om 21.30u", @@ -493,7 +494,8 @@ }, { "Input": "voor 2 personen vanavond om 21.30:31u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vanavond om 21.30:31u", @@ -505,7 +507,7 @@ }, { "Input": "Ik ga eind van de dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van de dag", @@ -517,7 +519,7 @@ }, { "Input": "Ik ga morgen einde van de dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen einde van de dag", @@ -529,7 +531,7 @@ }, { "Input": "Ik ga zondag eind van de dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zondag eind van de dag", @@ -541,7 +543,7 @@ }, { "Input": "Ik ga terug op de 5e om 4u ‘s morgens", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 5e om 4u ‘s morgens", @@ -553,7 +555,7 @@ }, { "Input": "Ik ga terug op 16-12-2016 om 12.23:59u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16-12-2016 om 12.23:59u", @@ -565,7 +567,7 @@ }, { "Input": "Ik ga terug over 5 uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 5 uur", @@ -577,7 +579,7 @@ }, { "Input": "bekijk of ik beschikbaar ben om 15u op zondag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15u op zondag", @@ -589,7 +591,7 @@ }, { "Input": "Afspraak voor morgenochtend om 9 uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend om 9 uur", @@ -601,7 +603,7 @@ }, { "Input": "Ik ga morgenochtend om 9 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend om 9 uur", @@ -613,7 +615,7 @@ }, { "Input": "Ik ga morgenochtend om 9u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend om 9u", @@ -625,7 +627,7 @@ }, { "Input": "Ik ga morgen om 9 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen om 9 uur", @@ -637,7 +639,7 @@ }, { "Input": "deze vrijdag om 13u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag om 13u", @@ -649,7 +651,7 @@ }, { "Input": "VOEG LUNCH TOE OM 12.30u OP VRIJDAG", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "om 12.30u OP VRIJDAG", @@ -661,7 +663,7 @@ }, { "Input": "Voeg 649 toe middernacht vannacht", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "middernacht vannacht", @@ -673,7 +675,7 @@ }, { "Input": "Ik ga op 1 augustus om 11u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 augustus om 11u", @@ -685,7 +687,7 @@ }, { "Input": "Ik ga op 1 augustus om 23u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 augustus om 23u", @@ -697,7 +699,7 @@ }, { "Input": "Ik ga 1 augustus 23u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 augustus 23u", @@ -709,7 +711,7 @@ }, { "Input": "Ik ga 25/2 om 11u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "25/2 om 11u", @@ -721,7 +723,7 @@ }, { "Input": "Ik ga op 6 jan 2017 6.37u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "6 jan 2017 6.37u", @@ -733,7 +735,7 @@ }, { "Input": "16 Nov. 2016 10.38", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 Nov. 2016 10.38", @@ -745,7 +747,7 @@ }, { "Input": "Ik vertrek 1 dag en 2 uur later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 dag en 2 uur later", @@ -757,7 +759,7 @@ }, { "Input": "Ik ben druk over een uur, dus bel me later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over een uur", @@ -769,7 +771,7 @@ }, { "Input": "Ik ontmoette hem 2 maanden 1 dag en 2 uur geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 maanden 1 dag en 2 uur geleden", @@ -781,7 +783,7 @@ }, { "Input": "Ik ontmoette hem 2 maanden 1 dag 2 uur geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 maanden 1 dag 2 uur geleden", @@ -793,7 +795,7 @@ }, { "Input": "Ik vertrek 1 dag en 30 minuten later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 dag en 30 minuten later", @@ -805,7 +807,7 @@ }, { "Input": "Ik vertrek over 2 minuten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 2 minuten", @@ -817,7 +819,7 @@ }, { "Input": "Ik ga nu meteen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nu meteen", @@ -829,7 +831,7 @@ }, { "Input": "Ik ga op 15 om 8:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00", @@ -841,7 +843,7 @@ }, { "Input": "Ik ga op 15 om 8:00:30 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00:30", @@ -853,7 +855,7 @@ }, { "Input": "Ik ga op de 15e, 20:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 15e, 20:00", @@ -865,7 +867,7 @@ }, { "Input": "Ik ga 21-04-2016, 20.00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21-04-2016, 20.00", @@ -877,7 +879,7 @@ }, { "Input": "Ik ga 23 okt. om zeven uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23 okt. om zeven uur", @@ -889,7 +891,7 @@ }, { "Input": "Ik ga 14 oktober 8:00 's morgens terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 8:00 's morgens", @@ -901,7 +903,7 @@ }, { "Input": "Ik ga 14 oktober 8:00:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 8:00:00", @@ -913,7 +915,7 @@ }, { "Input": "Ik ga 14 oktober, 8:00 uur 's morgens terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober, 8:00 uur 's morgens", @@ -925,7 +927,7 @@ }, { "Input": "Ik ga morgen 8:00 's ochtends terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen 8:00 's ochtends", @@ -937,7 +939,7 @@ }, { "Input": "Ik ga morgen rond 8:00 's ochtends terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen rond 8:00 's ochtends", @@ -949,7 +951,7 @@ }, { "Input": "Ik ga morgen voor 8:00 's ochtends terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen voor 8:00 's ochtends", @@ -961,7 +963,7 @@ }, { "Input": "Ik ga morgen 8:00:05 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen 8:00:05", @@ -973,7 +975,7 @@ }, { "Input": "Ik ga volgende vrijdag om half 4 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende vrijdag om half 4", @@ -985,7 +987,7 @@ }, { "Input": "Ik ga 5 mei, 2016, 20.20 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 mei, 2016, 20.20", @@ -997,7 +999,7 @@ }, { "Input": "Ik ga terug op de 15e om 20.00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 15e om 20.00", @@ -1009,7 +1011,7 @@ }, { "Input": "Ik ga terug om zeven uur op de 15e", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zeven uur op de 15e", @@ -1021,7 +1023,7 @@ }, { "Input": "Ik ga volgende week zondag 20.00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende week zondag 20.00", @@ -1033,7 +1035,7 @@ }, { "Input": "Ik ga 20.00 vandaag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20.00 vandaag", @@ -1045,7 +1047,7 @@ }, { "Input": "Ik ga morgen kwart voor zeven terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen kwart voor zeven", @@ -1057,7 +1059,7 @@ }, { "Input": "Ik ga 19.00, 22-12-2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19.00, 22-12-2016", @@ -1069,7 +1071,7 @@ }, { "Input": "Ik ga morgen zeven uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen zeven uur", @@ -1081,7 +1083,7 @@ }, { "Input": "Ik ga morgenochtend om 7 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend om 7 uur", @@ -1093,7 +1095,7 @@ }, { "Input": "Ik ga zondagmiddag om 7:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zondagmiddag om 7:00", @@ -1105,7 +1107,7 @@ }, { "Input": "Ik ga morgenochtend tien voor half zes terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend tien voor half zes", @@ -1117,7 +1119,7 @@ }, { "Input": "Ik ga 14 oktober 8:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 8:00", @@ -1129,7 +1131,7 @@ }, { "Input": "Ik ga om 7 uur vanmorgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7 uur vanmorgen", @@ -1141,7 +1143,7 @@ }, { "Input": "Ik ga 8 uur 's avonds, maandag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur 's avonds, maandag", @@ -1153,7 +1155,7 @@ }, { "Input": "Ik ga 10 uur vanavond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10 uur vanavond", @@ -1165,7 +1167,7 @@ }, { "Input": "Ik ga 8 uur vanmorgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur vanmorgen", @@ -1177,7 +1179,7 @@ }, { "Input": "Ik ga 8 uur vanavond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur vanavond", @@ -1189,7 +1191,7 @@ }, { "Input": "Ik ga vanavond rond 7 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond rond 7 uur", @@ -1201,7 +1203,7 @@ }, { "Input": "Ik ga vanmorgen om 7 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanmorgen om 7 uur", @@ -1213,7 +1215,7 @@ }, { "Input": "Ik ga vanmorgen om zeven uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanmorgen om zeven uur", @@ -1225,7 +1227,7 @@ }, { "Input": "Ik ga vanmorgen om 7:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanmorgen om 7:00", @@ -1237,7 +1239,8 @@ }, { "Input": "Ik ga deze avond om 7 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "deze avond om 7 uur", @@ -1249,7 +1252,8 @@ }, { "Input": "Ik ga vanavond om 7 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vanavond om 7 uur", @@ -1261,7 +1265,8 @@ }, { "Input": "Ik ga vanavond om 21:30 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vanavond om 21:30", @@ -1273,7 +1278,9 @@ }, { "Input": "Ik ga vanavond om 21:30:31 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", + "Results": [ { "Text": "vanavond om 21:30:31", @@ -1285,7 +1292,7 @@ }, { "Input": "Ik ga het eind van de dag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het eind van de dag", @@ -1297,7 +1304,7 @@ }, { "Input": "Ik ga eind van morgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van morgen", @@ -1309,7 +1316,7 @@ }, { "Input": "Ik ga eind van de zondag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van de zondag", @@ -1321,7 +1328,7 @@ }, { "Input": "Ik ga op de 5e om 4:00 's ochtends terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 5e om 4:00 's ochtends", @@ -1333,7 +1340,7 @@ }, { "Input": "Ik ga 2016-12-16 12:23:59 's middags terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016-12-16 12:23:59 's middags", @@ -1345,7 +1352,7 @@ }, { "Input": "Ik ga over 5 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 5 uur", @@ -1357,7 +1364,7 @@ }, { "Input": "kijk of ik beschikbaar ben om 15:00 op zon", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15:00 op zon", @@ -1369,7 +1376,7 @@ }, { "Input": "Boek afspraak in voor morgenochtend om 9 uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend om 9 uur", @@ -1381,7 +1388,7 @@ }, { "Input": "deze vrijdag om één uur 's middags", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag om één uur 's middags", @@ -1393,7 +1400,7 @@ }, { "Input": "VOEG LUNCH TOE OM 12.30 'S MIDDAGS OP VRIJ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "om 12.30 'S MIDDAGS OP VRIJ", @@ -1405,7 +1412,7 @@ }, { "Input": "Voeg 649 middernacht vanavond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "middernacht vanavond", @@ -1417,7 +1424,7 @@ }, { "Input": "Ik ga de 1e van augustus 11:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 1e van augustus 11:00", @@ -1429,7 +1436,7 @@ }, { "Input": "Ik ga de 1e van augustus 23:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 1e van augustus 23:00", @@ -1441,7 +1448,7 @@ }, { "Input": "Ik ga 25-02 11:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "25-02 11:00", @@ -1453,7 +1460,7 @@ }, { "Input": "Ik ga 6 jan 2017 - 6.37 's ochtends terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "6 jan 2017 - 6.37 's ochtends", @@ -1465,7 +1472,7 @@ }, { "Input": "16 nov. 2016 10:38", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 nov. 2016 10:38", @@ -1477,7 +1484,7 @@ }, { "Input": "Ik vertrek 1 dag, 2 uur later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 dag, 2 uur later", @@ -1489,7 +1496,7 @@ }, { "Input": "Ik ben over een uur druk, dus bel me later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over een uur", @@ -1501,7 +1508,7 @@ }, { "Input": "Ik ontmoette hem 2 maanden, 1 dag, 2 uur geleden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 maanden, 1 dag, 2 uur geleden", @@ -1513,7 +1520,7 @@ }, { "Input": "Boek alsjeblieft Skypegesprek vandaag om 9:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag om 9:00", @@ -1525,7 +1532,7 @@ }, { "Input": "Boek alsjeblieft Skypegesprek vandaag om 21:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag om 21:00", @@ -1537,7 +1544,7 @@ }, { "Input": "Ik vertrek over 2 uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 2 uur", @@ -1549,7 +1556,7 @@ }, { "Input": "Ik zal teruggaan op woens. 26 okt. 15:50:06 2016.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "woens. 26 okt. 15:50:06 2016", @@ -1561,7 +1568,7 @@ }, { "Input": "Woens. 26 okt. 15:50:06 2016 is geen dag in 2019.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "woens. 26 okt. 15:50:06 2016", @@ -1573,7 +1580,7 @@ }, { "Input": "Ik zal om 20.30 vandaag teruggaan.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.30 vandaag", @@ -1585,7 +1592,7 @@ }, { "Input": "Ik zal vandaag om 20.30 teruggaan.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "vandaag om 20.30", @@ -1597,7 +1604,7 @@ }, { "Input": "Ik zal 20.30 vandaag teruggaan.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.30 vandaag", diff --git a/Specs/DateTime/Dutch/DateTimeModel.json b/Specs/DateTime/Dutch/DateTimeModel.json index beb02cc00e..17a787c30a 100644 --- a/Specs/DateTime/Dutch/DateTimeModel.json +++ b/Specs/DateTime/Dutch/DateTimeModel.json @@ -1574,7 +1574,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:56:30", @@ -1593,6 +1593,30 @@ } ] }, + { + "Input": "Ik ben 00:00 terug", + "Context": { + "ReferenceDateTime": "2023-11-07T00:00:00" + }, + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "00:00", + "Start": 7, + "End": 11, + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + } + } + ] + }, { "Input": "Het is half acht", "Context": { @@ -8464,7 +8488,7 @@ "Context": { "ReferenceDateTime": "2019-01-25T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maandag 21", @@ -8493,7 +8517,7 @@ "Context": { "ReferenceDateTime": "2019-01-25T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zondag 31", @@ -8522,7 +8546,7 @@ "Context": { "ReferenceDateTime": "2019-02-25T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag 31", @@ -8546,6 +8570,35 @@ } ] }, + { + "Input": "Heb je een arrangement op zaterdag 30!", + "Context": { + "ReferenceDateTime": "2023-07-05T12:00:00" + }, + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "zaterdag 30", + "Start": 26, + "End": 36, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2022-07-30" + }, + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2023-09-30" + } + ] + } + } + ] + }, { "Input": "Heb je een plan na half mei?", "Context": { diff --git a/Specs/DateTime/Dutch/DateTimeParser.json b/Specs/DateTime/Dutch/DateTimeParser.json index c158fbda86..ead82b2afe 100644 --- a/Specs/DateTime/Dutch/DateTimeParser.json +++ b/Specs/DateTime/Dutch/DateTimeParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nu", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zo snel mogelijk", @@ -52,7 +52,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00", @@ -76,7 +76,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00:20", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15, 20:00", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 15e om 4 uur 's morgens", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21-04-2016, 20:00", @@ -172,7 +172,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23 okt. om zeven", @@ -196,7 +196,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 8:00", @@ -220,7 +220,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 8:00:31", @@ -244,7 +244,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober rond 8:00", @@ -268,7 +268,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober om 8:00:31", @@ -292,7 +292,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober, 8:00", @@ -316,7 +316,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 mei, 2016, 10 voor half negen 's avonds", @@ -340,7 +340,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20:00 op 15", @@ -364,7 +364,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20:00 op de 15e", @@ -388,7 +388,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zeven op 15", @@ -412,7 +412,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20:00 vandaag", @@ -436,7 +436,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor zeven morgen", @@ -460,7 +460,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:00, 22-12-2016", @@ -484,7 +484,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen 8:00", @@ -508,7 +508,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenochtend om 7", @@ -532,7 +532,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond rond 7", @@ -556,7 +556,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7:00 op volgende zondagmiddag", @@ -580,7 +580,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien voor half zes morgenochtend", @@ -604,7 +604,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7, vanmorgen", @@ -628,7 +628,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10, vanavond", @@ -652,7 +652,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20:00 's avonds, zondag", @@ -676,7 +676,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22:00 vanavond", @@ -700,7 +700,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8:00 vanmorgen", @@ -724,7 +724,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20:00 vanavond", @@ -748,7 +748,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het eind van de dag", @@ -772,7 +772,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van morgen", @@ -796,7 +796,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van de zondag", @@ -820,7 +820,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 5 uur", @@ -844,7 +844,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15 om 8:00:24", @@ -868,7 +868,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14 oktober 8:00:13", @@ -892,7 +892,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om 7", @@ -916,7 +916,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om 7 uur 's ochtends", @@ -940,7 +940,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om zeven", @@ -964,7 +964,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze morgen om 7:00", @@ -988,7 +988,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze avond om 7", @@ -1012,7 +1012,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond om 7", @@ -1036,7 +1036,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16-12-2016 12:23:59", @@ -1060,7 +1060,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "6 jan 2017 - 6:37", @@ -1084,7 +1084,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 nov. 2016 10:38", @@ -1108,7 +1108,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T19:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 dag 2 uren later", @@ -1132,7 +1133,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T19:15:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 maand 2 dagen 2 uren 30 min geleden", @@ -1156,7 +1158,7 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over een uur", @@ -1180,7 +1182,8 @@ "Context": { "ReferenceDateTime": "2017-11-23T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "over minder dan een uur", @@ -1205,7 +1208,7 @@ "Context": { "ReferenceDateTime": "2018-11-21T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eind van de dag", @@ -1229,7 +1232,7 @@ "Context": { "ReferenceDateTime": "2018-11-21T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aan het eind van de dag", @@ -1253,7 +1256,8 @@ "Context": { "ReferenceDateTime": "2018-11-21T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", + "NotSupported": "python", "Results": [ { "Text": "woens 26 okt 15:50:06 2016", @@ -1277,7 +1281,8 @@ "Context": { "ReferenceDateTime": "2018-11-21T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", + "NotSupported": "python", "Results": [ { "Text": "woens 26 okt 15:50:06 2016", @@ -1301,7 +1306,7 @@ "Context": { "ReferenceDateTime": "2018-12-26T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.30 vandaag", @@ -1325,7 +1330,7 @@ "Context": { "ReferenceDateTime": "2018-12-26T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "vandaag om 20.30", @@ -1349,7 +1354,7 @@ "Context": { "ReferenceDateTime": "2018-12-26T12:00:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.30 vandaag", diff --git a/Specs/DateTime/Dutch/DateTimePeriodExtractor.json b/Specs/DateTime/Dutch/DateTimePeriodExtractor.json index 6c15417318..3935fc1900 100644 --- a/Specs/DateTime/Dutch/DateTimePeriodExtractor.json +++ b/Specs/DateTime/Dutch/DateTimePeriodExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "Ik ben vijf tot zeven vandaag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijf tot zeven vandaag", @@ -13,7 +13,7 @@ }, { "Input": "Ik ben morgen vijf tot zeven weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen vijf tot zeven", @@ -25,7 +25,7 @@ }, { "Input": "Ik ben van 5 tot 6 volgende zondag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 volgende zondag", @@ -37,7 +37,7 @@ }, { "Input": "Ik ben van 5 tot 18:00 volgende zondag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 18:00 volgende zondag", @@ -49,7 +49,7 @@ }, { "Input": "Ik ben van 16:00 tot 17:00 vandaag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot 17:00 vandaag", @@ -61,7 +61,7 @@ }, { "Input": "Ik ben van 16:00 vandaag tot 17:00 morgen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 vandaag tot 17:00 morgen", @@ -73,7 +73,7 @@ }, { "Input": "Ik ben van 16:00 tot 17:00 morgen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot 17:00 morgen", @@ -85,7 +85,7 @@ }, { "Input": "Ik ben van 16:00 tot 17:00 van 6-6-2017 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot 17:00 van 6-6-2017", @@ -97,7 +97,7 @@ }, { "Input": "Ik ben van 16:00 tot 17:00 5 mei, 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot 17:00 5 mei, 2018", @@ -109,7 +109,7 @@ }, { "Input": "Ik ben van 4:00 tot 17:00 5 mei, 2018 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 4:00 tot 17:00 5 mei, 2018", @@ -121,7 +121,7 @@ }, { "Input": "Ik ben van 16:00 op 1 jan, 2016 tot 17:00 vandaag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 op 1 jan, 2016 tot 17:00 vandaag", @@ -133,7 +133,7 @@ }, { "Input": "Ik ben van 14:00, 21-2-2016 tot 3:32, 23-04-2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 14:00, 21-2-2016 tot 3:32, 23-04-2016", @@ -145,7 +145,7 @@ }, { "Input": "Ik ben van vandaag om 4 uur tot volgende woens om 5 uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van vandaag om 4 uur tot volgende woens om 5 uur", @@ -157,7 +157,7 @@ }, { "Input": "Ik ben tussen 16:00 en 17:00 vandaag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 16:00 en 17:00 vandaag", @@ -169,7 +169,8 @@ }, { "Input": "Ik ben tussen 16:00 op 1 jan, 2016 en 17:00 vandaag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 16:00 op 1 jan, 2016 en 17:00 vandaag", @@ -181,7 +182,7 @@ }, { "Input": "Ik ga vanavond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond", @@ -193,7 +194,7 @@ }, { "Input": "Ik ga deze nacht terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze nacht", @@ -205,7 +206,7 @@ }, { "Input": "Ik ga deze avond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze avond", @@ -217,7 +218,7 @@ }, { "Input": "Ik ga deze ochtend terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze ochtend", @@ -229,7 +230,7 @@ }, { "Input": "Ik ga deze middag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze middag", @@ -241,7 +242,7 @@ }, { "Input": "Ik ga volgende nacht terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende nacht", @@ -253,7 +254,7 @@ }, { "Input": "Ik ga gisterenavond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "gisterenavond", @@ -265,7 +266,7 @@ }, { "Input": "Ik ga morgenavond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenavond", @@ -277,7 +278,7 @@ }, { "Input": "Ik ga volgende maandagmiddag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maandagmiddag", @@ -289,7 +290,7 @@ }, { "Input": "Ik ga de nacht van de 5e mei terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de nacht van de 5e mei", @@ -301,7 +302,7 @@ }, { "Input": "Ik ga laatste 3 minuut terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste 3 minuut", @@ -313,7 +314,7 @@ }, { "Input": "Ik ga afgelopen 3 minuut terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen 3 minuut", @@ -325,7 +326,7 @@ }, { "Input": "Ik ga voorgaande 3 minuut terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voorgaande 3 minuut", @@ -337,7 +338,7 @@ }, { "Input": "Ik ga voorgaande 3 minuten terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voorgaande 3 minuten", @@ -349,7 +350,7 @@ }, { "Input": "Ik ga de volgende 5 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende 5 uur", @@ -361,7 +362,7 @@ }, { "Input": "Ik ga de laatste minuut terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste minuut", @@ -373,7 +374,7 @@ }, { "Input": "Ik ga volgend uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgend uur", @@ -385,7 +386,8 @@ }, { "Input": "Ik ga laatste paar minuten terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "laatste paar minuten", @@ -397,7 +399,8 @@ }, { "Input": "Ik ga laatste aantal minuten terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "laatste aantal minuten", @@ -409,7 +412,7 @@ }, { "Input": "Ik ga dinsdag in de ochtend terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de ochtend", @@ -421,7 +424,7 @@ }, { "Input": "Ik ga dinsdag in de middag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de middag", @@ -433,7 +436,7 @@ }, { "Input": "Ik ga dinsdag in de avond terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de avond", @@ -445,7 +448,7 @@ }, { "Input": "laten we dinsdag vroeg in de ochtend afspreken ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de ochtend", @@ -457,7 +460,7 @@ }, { "Input": "laten we dinsdag laat in de ochtend afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de ochtend", @@ -469,7 +472,7 @@ }, { "Input": "laten we dinsdag vroeg in de middag afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de middag", @@ -481,7 +484,7 @@ }, { "Input": "laten we dinsdag laat in de middag afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de middag", @@ -493,7 +496,7 @@ }, { "Input": "laten we dinsdag vroeg in de avond afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de avond", @@ -505,7 +508,7 @@ }, { "Input": "laten we dinsdag laat in de avond afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de avond", @@ -517,7 +520,7 @@ }, { "Input": "laten we dinsdag vroeg in de nacht afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de nacht", @@ -529,7 +532,7 @@ }, { "Input": "laten we dinsdag laat in de nacht afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de nacht", @@ -541,7 +544,7 @@ }, { "Input": "laten we op dinsdag vroeg in de ochtend afspreken ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de ochtend", @@ -553,7 +556,7 @@ }, { "Input": "laten we op dinsdag laat in de ochtend afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de ochtend", @@ -565,7 +568,7 @@ }, { "Input": "laten we op dinsdag vroeg in de middag afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de middag", @@ -577,7 +580,7 @@ }, { "Input": "laten we op dinsdag laat in de middag afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de middag", @@ -589,7 +592,7 @@ }, { "Input": "laten we op dinsdag vroeg in de avond afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de avond", @@ -601,7 +604,7 @@ }, { "Input": "laten we op dinsdag laat in de avond afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de avond", @@ -613,7 +616,7 @@ }, { "Input": "laten we op dinsdag vroeg in de nacht afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de nacht", @@ -625,7 +628,7 @@ }, { "Input": "laten we op dinsdag laat in de nacht afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de nacht", @@ -637,7 +640,7 @@ }, { "Input": "laten we op dinsdag vroeg in de morgen afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de morgen", @@ -649,7 +652,7 @@ }, { "Input": "laten we op dinsdag laat in de morgen afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de morgen", @@ -661,7 +664,7 @@ }, { "Input": "Ik ben rest van de dag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de dag", @@ -673,7 +676,7 @@ }, { "Input": "Ik ben rest van deze dag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van deze dag", @@ -685,7 +688,7 @@ }, { "Input": "Ik ben rest van huidige dag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van huidige dag", @@ -697,7 +700,7 @@ }, { "Input": "Cortana, plan alsjeblieft een skype voor zakelijk gesprek met Wayne, op vrijdag tussen 13:00 en 16:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdag tussen 13:00 en 16:00", @@ -709,7 +712,8 @@ }, { "Input": "Kan je ons morgen tussen 8:00 en 12:00 inplannen?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 8:00 en 12:00", @@ -721,7 +725,7 @@ }, { "Input": "Kan je ons de 9e dec tussen 8:00 en 14:00 inplannen?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 9e dec tussen 8:00 en 14:00", @@ -733,7 +737,7 @@ }, { "Input": "Hoi Cortana- leg alsjeblieft een skypegesprek met Jennifer vast. Het is een meeting van 30 minuten op deze vrijdag, in de middag ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag, in de middag", @@ -745,7 +749,7 @@ }, { "Input": "Hoi Cortana- leg alsjeblieft een skypegesprek met Jennifer vast. Het is een meeting van 30 minuten in de middag, deze vrijdag ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de middag, deze vrijdag", @@ -757,7 +761,8 @@ }, { "Input": "Kan je 23-09-2015 13:00 tot 4 voor ons vastleggen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "23-09-2015 13:00 tot 4", @@ -769,7 +774,8 @@ }, { "Input": "Kan je 23-09-2015 13:30 tot 4 voor ons vastleggen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "23-09-2015 13:30 tot 4", @@ -781,7 +787,7 @@ }, { "Input": "Ik ga dinsdagmorgen terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagmorgen", @@ -793,7 +799,7 @@ }, { "Input": "Ik ga dinsdagmiddag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagmiddag", @@ -805,7 +811,8 @@ }, { "Input": "Het zal 2 uur in de toekomst gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 uur in de toekomst", @@ -817,7 +824,8 @@ }, { "Input": "Het zal tussen 10 en 11:30 op 1-1-2015 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10 en 11:30 op 1-1-2015", @@ -829,7 +837,8 @@ }, { "Input": "Het zal 1-1-2015 tussen 10 en 11:30 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1-1-2015 tussen 10 en 11:30", @@ -841,7 +850,7 @@ }, { "Input": "Het zal van 10:30 tot 3 op 1-1-2015 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30 tot 3 op 1-1-2015", @@ -853,7 +862,7 @@ }, { "Input": "Het zal tussen 3 en 5 op 1-1-2015 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 en 5 op 1-1-2015", @@ -865,7 +874,7 @@ }, { "Input": "Het zal van 3:30 tot 5:55 op 1-1-2015 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3:30 tot 5:55 op 1-1-2015", @@ -877,7 +886,7 @@ }, { "Input": "Het zal 1-1-2015 na 2:00 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1-1-2015 na 2:00", @@ -889,7 +898,7 @@ }, { "Input": "Het zal vandaag voor 16:00 gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag voor 16:00", @@ -901,7 +910,7 @@ }, { "Input": "Het zal volgende woensdag later dan 10 uur 's morgens gebeuren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende woensdag later dan 10 uur 's morgens", @@ -913,7 +922,7 @@ }, { "Input": "Het gebeurde op afgelopen dinsdag tegen 2 in de middag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen dinsdag tegen 2 in de middag", @@ -925,7 +934,7 @@ }, { "Input": "Laten we op 1 feb niet later dan 6:00 gaan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 feb niet later dan 6:00", @@ -937,12 +946,12 @@ }, { "Input": "Het gebeurde op volgende week na 2:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Maak me onbeschikbaar van 04-12-2019 6.00 tot 05-12-2019 20.00", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 04-12-2019 6.00 tot 05-12-2019 20.00", diff --git a/Specs/DateTime/Dutch/DateTimePeriodParser.json b/Specs/DateTime/Dutch/DateTimePeriodParser.json index b5ed8ba10f..77330a3908 100644 --- a/Specs/DateTime/Dutch/DateTimePeriodParser.json +++ b/Specs/DateTime/Dutch/DateTimePeriodParser.json @@ -4,7 +4,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vandaag tussen vijf en zeven", @@ -30,7 +31,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 op 22/4/2016", @@ -56,7 +57,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 op 22 april", @@ -82,7 +83,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 ‘s middags op 22 april", @@ -108,7 +109,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 januari van 5 tot 6", @@ -134,7 +136,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 15 en 16 uur ’s middags", @@ -160,7 +163,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 15 en 16 uur ‘s middags", @@ -186,7 +190,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 15 en 16 uur", @@ -212,7 +217,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van morgen half acht tot 16 uur ‘s middags", @@ -238,7 +243,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanaf 4 uur vandaag tot morgen 5 uur ’s middags", @@ -264,7 +269,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanaf 16 uur vandaag tot morgen 17 uur ’s middags", @@ -290,7 +295,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vanaf 14:00 tot 2016-04-23 15:32", @@ -316,7 +322,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 2016-2-21 14:00 tot 2016-04-23 03:32", @@ -342,7 +348,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vandaag tussen 16 en 17 uur in de middag", @@ -368,7 +374,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanaf 4 uur tot vandaag 5 uur in de middag", @@ -394,7 +400,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 1 januari 2016 16 uur tot vandaag 17 uur in de middag", @@ -420,7 +427,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond", @@ -446,7 +453,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond", @@ -472,7 +479,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze avond", @@ -498,7 +505,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond", @@ -524,7 +531,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze ochtend", @@ -550,7 +557,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenavond", @@ -576,7 +583,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste avond", @@ -602,7 +609,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgenavond", @@ -628,7 +635,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgennacht", @@ -654,7 +661,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aankomende maandagmiddag", @@ -680,7 +687,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste 3 minuten", @@ -706,7 +713,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen 3 minuten", @@ -732,7 +739,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "laatste drie minuten", @@ -758,7 +766,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 uur", @@ -784,7 +793,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste minuut", @@ -810,7 +819,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "volgende uur", @@ -836,7 +846,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen een paar uur", @@ -862,7 +873,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagochtend", @@ -888,7 +899,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "aankomende dinsdagochtend", @@ -914,7 +926,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagochtend", @@ -940,7 +952,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "dinsdagmiddag", @@ -966,7 +979,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagavond", @@ -992,7 +1005,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagochtend vroeg", @@ -1020,8 +1033,8 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "Parsing cannot be done on both sides of the day/date, and time(-related) entities ('vroeg' (early), 'ochtend' (morning)) need to be placed together", - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg op de dinsdagochtend", @@ -1047,7 +1060,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagochtend vroeg", @@ -1074,7 +1087,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de ochtend", @@ -1102,8 +1115,8 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "Parsing cannot be done on both sides of the day/date, and time(-related) entities ('in het begin', 'middag') need to be placed together", - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "begin van dinsdagmiddag", @@ -1129,7 +1142,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagmiddag in het begin", @@ -1156,7 +1169,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag later in de middag", @@ -1183,7 +1196,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de avond", @@ -1210,7 +1223,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in het begin van de avond", @@ -1237,7 +1250,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagavond laat", @@ -1264,7 +1277,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagavond", @@ -1290,7 +1303,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagavond laat", @@ -1317,7 +1330,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de ochtend", @@ -1345,8 +1358,8 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "Parsing cannot be done on both sides of the day/date, and time(-related) entities ('aan het einde', 'ochtend') need to be placed together", - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "einde van dinsdagochtend", @@ -1372,7 +1385,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagochtend aan het einde", @@ -1400,8 +1413,8 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "Parsing cannot be done on both sides of the day/date, and time(-related) entities ('aan het einde', 'middag') need to be placed together", - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het einde van dinsdagmiddag", @@ -1427,7 +1440,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagmiddag aan het einde", @@ -1454,7 +1467,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag aan het einde van de middag", @@ -1481,7 +1494,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de avond", @@ -1507,7 +1520,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de avond", @@ -1534,8 +1547,8 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "Parsing cannot be done on both sides of the day/date, and time(-related) entities ('laat', 'avond') need to be placed together", - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat op dinsdagavond", @@ -1561,7 +1574,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de dag", @@ -1587,7 +1600,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van deze dag", @@ -1613,7 +1626,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van mijn dag", @@ -1639,7 +1652,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van vandaag", @@ -1665,7 +1678,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van vandaag", @@ -1691,7 +1704,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 2016-02-21 14:00 uur tot 2016-02-23 03:32", @@ -1717,7 +1730,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vrijdag tussen 1 en 4 uur ‘s middags", @@ -1743,7 +1757,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vrijdag tussen 13 en 16 uur ‘s middags", @@ -1769,7 +1784,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vrijdag tussen 13 en 16 uur", @@ -1795,7 +1811,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 8 uur ‘s ochtends en 2 uur ’s middags", @@ -1821,7 +1838,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 8 uur ‘s ochtends en 14 uur ’s middags", @@ -1847,7 +1865,7 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9 december tussen 8 uur ‘s ochtends en 2 uur ‘s middags", @@ -1873,7 +1891,7 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9 december tussen 8 uur ‘s ochtends en 14 uur ‘s middags", @@ -1900,8 +1918,8 @@ "ReferenceDateTime": "2017-11-13T16:12:00" }, "Comment": "Words that are related to each other, such as 'aanstaande' and 'vrijdag', may not be seperated by other words from a different entity such as 'middag'", - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdagmiddag aanstaande", @@ -1927,7 +1945,8 @@ "Context": { "ReferenceDateTime": "2017-11-13T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "aanstaande vrijdagmiddag", @@ -1953,7 +1972,8 @@ "Context": { "ReferenceDateTime": "2017-11-13T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "deze vrijdagmiddag", @@ -1979,7 +1999,7 @@ "Context": { "ReferenceDateTime": "2017-11-13T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende vrijdagmiddag", @@ -2005,7 +2025,8 @@ "Context": { "ReferenceDateTime": "2017-11-13T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "afgelopen vrijdagmiddag", @@ -2031,7 +2052,7 @@ "Context": { "ReferenceDateTime": "2017-11-14T19:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdagmiddag tussen 1 en 4", @@ -2057,7 +2078,7 @@ "Context": { "ReferenceDateTime": "2017-11-14T19:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vrijdagmiddag tussen 13 en 16", @@ -2083,7 +2104,8 @@ "Context": { "ReferenceDateTime": "2017-11-14T19:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vrijdag tussen 13 en 16", @@ -2109,7 +2131,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 februari in de ochtend", @@ -2135,7 +2157,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdagochtend", @@ -2161,7 +2183,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de middag", @@ -2187,7 +2209,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 2 uur", @@ -2213,7 +2236,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 15 seconden", @@ -2239,7 +2263,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 minuten", @@ -2265,7 +2290,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 uur", @@ -2291,7 +2317,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen een dag en 5 uur", @@ -2317,7 +2344,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 2 dagen, 1 uur, 5 minuten en 30 seconden", @@ -2343,7 +2371,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 2 dagen, 1 uur, 5 minuten en 30 seconden", @@ -2369,7 +2398,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen aankomende 2 dagen, 1 uur, 5 minuten en 30 seconden", @@ -2395,7 +2425,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 uur", @@ -2421,7 +2452,8 @@ "Context": { "ReferenceDateTime": "2018-04-19T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag tussen 8 en 9", @@ -2447,7 +2479,8 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag 11-4", @@ -2473,7 +2506,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1/1/2015 tussen 10 en 11:30", @@ -2499,7 +2532,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1/1/2015 tussen 10 en 11:30", @@ -2525,7 +2558,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30 tot 3 op 1/1/2015", @@ -2551,7 +2584,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30 tot 15 op 1/1/2015", @@ -2577,7 +2610,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 en 5 op 1/1/2015", @@ -2603,7 +2636,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1/1/2015 van 3:30 tot 5:55", @@ -2629,7 +2662,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "vandaag vijf tot zeven", @@ -2655,7 +2689,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 op 22-4-2016", @@ -2681,7 +2715,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 op 22 april", @@ -2707,7 +2741,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 5 tot 18:00 op 22 april", @@ -2733,7 +2768,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 17 tot 18:00 op 22 april", @@ -2759,7 +2795,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 op de 1e van jan", @@ -2785,7 +2821,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen van 15:00 tot 16:00", @@ -2811,7 +2847,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen van 15 tot 16", @@ -2837,7 +2874,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3:00 tot 4:00 morgen", @@ -2863,7 +2900,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht tot 16:00 morgen", @@ -2889,7 +2926,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht tot 16 morgen", @@ -2915,7 +2952,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 vandaag tot 17:00 morgen", @@ -2941,7 +2978,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 14:00, 21-2-2016 tot 3:32, 23-04-2016", @@ -2967,7 +3004,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 16:00 en 17:00 vandaag", @@ -2993,7 +3030,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 16:00 op 1 jan, 2016 en 17:00 vandaag", @@ -3019,7 +3057,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond", @@ -3045,7 +3083,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vanavond", @@ -3071,7 +3109,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze nacht", @@ -3097,7 +3135,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze avond", @@ -3123,7 +3161,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze ochtend", @@ -3149,7 +3187,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze middag", @@ -3175,7 +3213,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende nacht", @@ -3201,7 +3239,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen nacht", @@ -3227,7 +3265,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vorige nacht", @@ -3253,7 +3291,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgennacht", @@ -3279,7 +3317,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "volgende maandagmiddag", @@ -3305,7 +3343,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen 3 min", @@ -3331,7 +3369,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "volgende 5 uren", @@ -3357,7 +3396,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laatste minuut", @@ -3383,7 +3422,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "komend uur", @@ -3409,7 +3449,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "komende paar uur", @@ -3435,7 +3476,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de ochtend", @@ -3461,7 +3502,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de ochtend van deze dinsdag", @@ -3487,7 +3528,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag, in de ochtend", @@ -3513,7 +3554,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de middag", @@ -3539,7 +3580,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag in de avond", @@ -3565,7 +3606,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg in de ochtend dinsdag", @@ -3592,7 +3633,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg in de ochtend op dinsdag", @@ -3619,7 +3660,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat in de ochtend dinsdag", @@ -3646,7 +3687,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg in de middag dinsdag", @@ -3673,7 +3714,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat in de middag dinsdag", @@ -3700,7 +3741,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg in de avond dinsdag", @@ -3727,7 +3768,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat in de avond dinsdag", @@ -3754,7 +3795,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg in de nacht dinsdag", @@ -3781,7 +3822,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat in de nacht dinsdag", @@ -3808,7 +3849,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de ochtend", @@ -3835,7 +3876,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de ochtend", @@ -3862,7 +3903,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de middag", @@ -3889,7 +3930,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de middag", @@ -3916,7 +3957,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de avond", @@ -3943,7 +3984,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de avond", @@ -3970,7 +4011,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag vroeg in de nacht", @@ -3997,7 +4038,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "dinsdag laat in de nacht", @@ -4024,7 +4065,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rest van de huidige dag", @@ -4050,7 +4091,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 14:00, 21-2-2016 tot 3:32, 23-04-2016", @@ -4076,7 +4117,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de late nacht op dinsdag", @@ -4103,7 +4144,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "morgen tussen 8:00 en 14:00", @@ -4129,7 +4171,7 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9 dec tussen 8:00 en 14:00", @@ -4155,7 +4197,7 @@ "Context": { "ReferenceDateTime": "2017-11-13T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze vrijdag, in de middag", @@ -4181,7 +4223,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 feb 's ochtends", @@ -4207,7 +4249,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 uren in de toekomst", @@ -4233,7 +4276,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 15 seconden", @@ -4259,7 +4303,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 5 uren", @@ -4285,7 +4330,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 1 dag en 5 uren", @@ -4311,7 +4357,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen 2 dagen, 1 uur, 5 minuten, 30 seconden", @@ -4337,7 +4384,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen volgende 2 dagen, 1 uur, 5 minuten, 30 seconden", @@ -4363,7 +4411,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen aankomende 2 dagen, 1 uur, 5 minuten, 30 seconden", @@ -4389,7 +4438,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "binnen de volgende 5 uur", @@ -4415,7 +4465,8 @@ "Context": { "ReferenceDateTime": "2018-04-19T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag 8 tot 9", @@ -4441,7 +4492,8 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag 12-4", @@ -4467,7 +4519,8 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "maandag 11-4", @@ -4493,7 +4546,8 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10 en 11:30 op 1-1-2015", @@ -4519,7 +4573,8 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1-1-2015 tussen 10 en 11:30", @@ -4545,7 +4600,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30 tot 3 op 1-1-2015", @@ -4571,7 +4626,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 en 5 op 1-1-2015", @@ -4597,7 +4652,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 en 5 op 1/1/2015", @@ -4623,7 +4678,7 @@ "Context": { "ReferenceDateTime": "2018-05-16T08:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3:30 tot 5:55 op 1-1-2015", @@ -4649,8 +4704,8 @@ "Context": { "ReferenceDateTime": "2017-11-09T16:12:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "op volgende week vrijdag tussen 8.00 en 14.00", @@ -4676,7 +4731,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "van 04-12-2019 6.00 tot 05-12-2019 20.00", @@ -4702,8 +4757,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "tussen half acht en 16.00", diff --git a/Specs/DateTime/Dutch/DurationExtractor.json b/Specs/DateTime/Dutch/DurationExtractor.json index b8e609cea6..e69dd3aec2 100644 --- a/Specs/DateTime/Dutch/DurationExtractor.json +++ b/Specs/DateTime/Dutch/DurationExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "Ik ga 3u weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3u", @@ -13,7 +13,7 @@ }, { "Input": "Ik ga 3 dgn weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 dgn", @@ -25,7 +25,7 @@ }, { "Input": "Ik ga 3dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3dagen", @@ -37,7 +37,7 @@ }, { "Input": "Ik ga 3,5 jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3,5 jaar", @@ -49,7 +49,7 @@ }, { "Input": "Ik ga 3,5 jr weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3,5 jr", @@ -61,7 +61,7 @@ }, { "Input": "Ik ga 3 u weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 u", @@ -73,7 +73,7 @@ }, { "Input": "Ik ga 3 uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 uur", @@ -85,7 +85,7 @@ }, { "Input": "Ik ga 3 uren weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 uren", @@ -97,7 +97,7 @@ }, { "Input": "Ik ga 3 dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 dagen", @@ -109,7 +109,7 @@ }, { "Input": "Ik ga 3 maanden weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 maanden", @@ -121,7 +121,7 @@ }, { "Input": "Ik ga 3 minuten weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 minuten", @@ -133,7 +133,7 @@ }, { "Input": "Ik ga 3 min weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 min", @@ -145,7 +145,7 @@ }, { "Input": "Ik ga 123,45 seconden weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "123,45 seconden", @@ -157,7 +157,7 @@ }, { "Input": "Ik ga twee weken weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken", @@ -169,7 +169,7 @@ }, { "Input": "Ik ga twintig minuten weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twintig minuten", @@ -181,7 +181,7 @@ }, { "Input": "Ik ga vierentwintig uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vierentwintig uur", @@ -193,7 +193,7 @@ }, { "Input": "Ik ga de hele dag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele dag", @@ -205,7 +205,7 @@ }, { "Input": "Ik ga de hele week weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele week", @@ -217,7 +217,7 @@ }, { "Input": "Ik ga de hele maand weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele maand", @@ -229,7 +229,7 @@ }, { "Input": "Ik ga het hele jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het hele jaar", @@ -241,7 +241,7 @@ }, { "Input": "Ik ga een hele dag weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een hele dag", @@ -253,7 +253,7 @@ }, { "Input": "Ik ga een hele week weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een hele week", @@ -265,7 +265,7 @@ }, { "Input": "Ik ga een hele maand weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een hele maand", @@ -277,7 +277,7 @@ }, { "Input": "Ik ga een heel jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een heel jaar", @@ -289,7 +289,7 @@ }, { "Input": "Ik ga een uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een uur", @@ -301,7 +301,7 @@ }, { "Input": "Ik ga een jaar weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een jaar", @@ -313,7 +313,7 @@ }, { "Input": "half jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half jaar", @@ -325,7 +325,7 @@ }, { "Input": "een half jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een half jaar", @@ -337,7 +337,7 @@ }, { "Input": "Ik ga 3 min. weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 min.", @@ -349,7 +349,7 @@ }, { "Input": "Ik ga 30 min. weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "30 min.", @@ -361,7 +361,7 @@ }, { "Input": "Ik ga een half uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een half uur", @@ -373,7 +373,7 @@ }, { "Input": "Ik ga een halfuur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een halfuur", @@ -385,7 +385,8 @@ }, { "Input": "Ik ga anderhalf uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "anderhalf uur", @@ -397,7 +398,7 @@ }, { "Input": "Ik ga twee uren weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee uren", @@ -409,7 +410,8 @@ }, { "Input": "Ik ga tweeëneenhalf uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tweeëneenhalf uur", @@ -421,7 +423,7 @@ }, { "Input": "over een week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een week", @@ -433,7 +435,7 @@ }, { "Input": "Over een dag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een dag", @@ -445,7 +447,7 @@ }, { "Input": "een uur lang", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een uur lang", @@ -457,7 +459,7 @@ }, { "Input": "een maand lang", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een maand lang", @@ -469,7 +471,7 @@ }, { "Input": "Ik ga een paar uur lang weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een paar uur lang", @@ -481,7 +483,7 @@ }, { "Input": "Ik ga een paar minuten lang weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een paar minuten lang", @@ -493,7 +495,7 @@ }, { "Input": "Ik ga een paar dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een paar dagen", @@ -505,7 +507,7 @@ }, { "Input": "Ik ga enkele dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "enkele dagen", @@ -517,7 +519,7 @@ }, { "Input": "Ik ga 1 jaar, 1 maand en 21 dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 jaar, 1 maand en 21 dagen", @@ -529,7 +531,7 @@ }, { "Input": "Ik ga 1 maand en 2 dagen weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 maand en 2 dagen", @@ -541,7 +543,7 @@ }, { "Input": "Ik realiseerde me dat jij nog een week weg bent.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een week", @@ -553,7 +555,7 @@ }, { "Input": "Kunnen we nog een maand wachten?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een maand", @@ -565,7 +567,7 @@ }, { "Input": "Ik vertrek voor 3u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3u", @@ -577,7 +579,7 @@ }, { "Input": "Ik vertrek voor 3,5jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3,5jaar", @@ -589,7 +591,7 @@ }, { "Input": "Ik vertrek voor 3 u", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 u", @@ -601,7 +603,7 @@ }, { "Input": "Ik vertrek voor 3 uren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 uren", @@ -613,7 +615,7 @@ }, { "Input": "Ik vertrek voor 3 maanden", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 maanden", @@ -625,7 +627,7 @@ }, { "Input": "Ik vertrek voor 3 minuten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 minuten", @@ -637,7 +639,7 @@ }, { "Input": "Ik vertrek voor 3 min", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 min", @@ -649,7 +651,7 @@ }, { "Input": "Ik vertrek voor 123,45 sec", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "123,45 sec", @@ -661,7 +663,7 @@ }, { "Input": "Ik vertrek voor twee weken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken", @@ -673,7 +675,7 @@ }, { "Input": "Ik vertrek voor twintig minuten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twintig minuten", @@ -685,7 +687,7 @@ }, { "Input": "Ik vertrek voor de hele dag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele dag", @@ -697,7 +699,7 @@ }, { "Input": "Ik vertrek voor de hele week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele week", @@ -709,7 +711,7 @@ }, { "Input": "Ik vertrek voor de hele maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele maand", @@ -721,7 +723,7 @@ }, { "Input": "Ik vertrek voor het hele jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het hele jaar", @@ -733,7 +735,7 @@ }, { "Input": "Ik vertrek voor de gehele dag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de gehele dag", @@ -745,7 +747,7 @@ }, { "Input": "Ik vertrek voor de gehele week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de gehele week", @@ -757,7 +759,7 @@ }, { "Input": "Ik vertrek voor de gehele maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de gehele maand", @@ -769,7 +771,7 @@ }, { "Input": "Ik vertrek voor het gehele jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het gehele jaar", @@ -781,7 +783,7 @@ }, { "Input": "Ik vertrek voor een uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een uur", @@ -793,7 +795,7 @@ }, { "Input": "Ik vertrek voor een jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een jaar", @@ -805,7 +807,7 @@ }, { "Input": "Ik vertrek voor 30 minuten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "30 minuten", @@ -817,7 +819,7 @@ }, { "Input": "Ik vertrek voor een half uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een half uur", @@ -829,7 +831,7 @@ }, { "Input": "Ik vertrek voor een halfuur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een halfuur", @@ -841,7 +843,8 @@ }, { "Input": "Ik vertrek voor anderhalf uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "anderhalf uur", @@ -853,7 +856,7 @@ }, { "Input": "Ik vertrek voor halfuur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "halfuur", @@ -865,7 +868,7 @@ }, { "Input": "Ik vertrek voor twee uren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee uren", @@ -877,7 +880,8 @@ }, { "Input": "Ik vertrek voor tweeënhalf uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tweeënhalf uur", @@ -889,7 +893,7 @@ }, { "Input": "Over een week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een week", @@ -901,7 +905,7 @@ }, { "Input": "voor een uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een uur", @@ -913,7 +917,7 @@ }, { "Input": "voor een maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een maand", @@ -925,7 +929,7 @@ }, { "Input": "Ik vertrek voor paar uren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "paar uren", @@ -937,7 +941,7 @@ }, { "Input": "Ik vertrek voor een paar minuten", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een paar minuten", @@ -949,7 +953,7 @@ }, { "Input": "Ik vertrek voor aantal dagen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "aantal dagen", @@ -961,7 +965,7 @@ }, { "Input": "Ik vertrek voor enkele dagen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "enkele dagen", @@ -973,7 +977,7 @@ }, { "Input": "Ik vertrek voor 1 jaar, 1 maand, 21 dagen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 jaar, 1 maand, 21 dagen", @@ -985,7 +989,7 @@ }, { "Input": "Ik vertrek voor 2 dagen, 1 maand", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 dagen, 1 maand", @@ -997,7 +1001,7 @@ }, { "Input": "Ik besefte dat je nog een week weg bent", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een week", @@ -1009,7 +1013,7 @@ }, { "Input": "Kunnen we nog een werkdag wachten?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een werkdag", @@ -1021,7 +1025,7 @@ }, { "Input": "Ik vertrek voor twee decennia", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee decennia", @@ -1033,7 +1037,7 @@ }, { "Input": "Ik vertrek voor veertien dagen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "veertien dagen", diff --git a/Specs/DateTime/Dutch/DurationParser.json b/Specs/DateTime/Dutch/DurationParser.json index 19a5467c3d..93aa0bdebd 100644 --- a/Specs/DateTime/Dutch/DurationParser.json +++ b/Specs/DateTime/Dutch/DurationParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3u", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 dagen", @@ -52,7 +52,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3,5 jaar", @@ -76,7 +76,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 u", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 uur", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 maanden", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 minuten", @@ -172,7 +172,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 min", @@ -196,7 +196,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "123,45 sec", @@ -220,7 +220,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken", @@ -244,7 +244,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twintig min", @@ -268,7 +268,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vierentwintig uur", @@ -292,7 +292,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele dag", @@ -316,7 +316,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele week", @@ -340,7 +340,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele maand", @@ -364,7 +364,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het hele jaar", @@ -388,7 +388,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de volle dag", @@ -412,7 +412,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de volle week", @@ -436,7 +436,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de volle maand", @@ -460,7 +460,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het volle jaar", @@ -484,7 +484,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een uur", @@ -508,7 +508,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half jaar", @@ -532,7 +532,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een half jaar", @@ -556,7 +556,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "anderhalf uur", @@ -580,7 +581,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "anderhalve dag", @@ -604,7 +606,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "een kwartier", @@ -628,7 +631,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "een kwart uur", @@ -652,7 +656,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een half uur", @@ -676,7 +680,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee uur", @@ -700,7 +704,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tweeëneenhalf uur", @@ -724,7 +729,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 jaar, 1 maand en 21 dagen", @@ -748,7 +754,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 dagen en 1 maand", @@ -772,7 +779,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "een week en drie dagen", @@ -796,7 +804,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "een paar weken", @@ -820,7 +829,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "een paar dagen", @@ -844,7 +854,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "minder dan een paar dagen", @@ -869,7 +880,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "meer dan een uur", @@ -894,7 +905,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een uur", @@ -918,7 +929,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een week", @@ -942,7 +953,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een maand", @@ -966,7 +977,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3u", @@ -990,7 +1001,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3,5jaar", @@ -1014,7 +1025,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 u", @@ -1038,7 +1049,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 uren", @@ -1062,7 +1073,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 maanden", @@ -1086,7 +1097,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 minuten", @@ -1110,7 +1121,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 min", @@ -1134,7 +1145,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "123,45 sec", @@ -1158,7 +1169,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee weken", @@ -1182,7 +1193,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twintig minuten", @@ -1206,7 +1217,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele dag", @@ -1230,7 +1241,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele week", @@ -1254,7 +1265,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de hele maand", @@ -1278,7 +1289,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het hele jaar", @@ -1302,7 +1313,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de gehele dag", @@ -1326,7 +1337,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de gehele week", @@ -1350,7 +1361,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de gehele maand", @@ -1374,7 +1385,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het gehele jaar", @@ -1398,7 +1409,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een uur", @@ -1422,7 +1433,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "gehele dag", @@ -1446,7 +1457,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "30 minuten", @@ -1470,7 +1481,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "anderhalf uur", @@ -1494,7 +1506,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "halfuur", @@ -1518,7 +1530,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee uren", @@ -1542,7 +1554,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tweeënhalf uur", @@ -1566,7 +1579,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "1 jaar, 1 maand, 21 dagen", @@ -1590,7 +1604,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2 dagen, 1 maand", @@ -1614,7 +1629,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "een week en drie dagen", @@ -1638,7 +1654,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een aantal weken", @@ -1662,7 +1678,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "een aantal dagen", @@ -1686,7 +1702,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "minder dan een aantal dagen", @@ -1711,7 +1727,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "meer dan een uur", @@ -1736,7 +1752,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een uur", @@ -1760,7 +1776,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nog een week", @@ -1784,7 +1800,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "nog een werkdag", @@ -1808,7 +1825,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "twee decennia", @@ -1832,7 +1850,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "veertien dagen", diff --git a/Specs/DateTime/Dutch/HolidayExtractor.json b/Specs/DateTime/Dutch/HolidayExtractor.json index f052016a8b..4bea2c9bed 100644 --- a/Specs/DateTime/Dutch/HolidayExtractor.json +++ b/Specs/DateTime/Dutch/HolidayExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "Ik ga terug met kerst", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kerst", @@ -13,7 +13,7 @@ }, { "Input": " Ik ga terug met kerst ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kerst", @@ -25,7 +25,7 @@ }, { "Input": "Ik ga terug op Nieuwjaarsdag.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Nieuwjaarsdag", @@ -37,7 +37,7 @@ }, { "Input": "Ik ga terug met thanksgiving", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "thanksgiving", @@ -49,7 +49,7 @@ }, { "Input": "Ik ga terug op vaderdag.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vaderdag", @@ -61,7 +61,7 @@ }, { "Input": "Ik ga terug op Nieuwjaarsdag dit jaar", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Nieuwjaarsdag dit jaar", @@ -73,7 +73,7 @@ }, { "Input": " Ik ga terug op Nieuwjaarsdag 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Nieuwjaarsdag 2016", @@ -85,7 +85,7 @@ }, { "Input": "Ik ga terug op nieuwjaarsdag 2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "nieuwjaarsdag 2016", @@ -97,7 +97,7 @@ }, { "Input": "Ik ga terug op koningsdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "koningsdag", @@ -109,7 +109,7 @@ }, { "Input": "Ik ga op Kerst terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Kerst", @@ -121,7 +121,7 @@ }, { "Input": "Ik ga op Eerste Kerstdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Eerste Kerstdag", @@ -133,7 +133,7 @@ }, { "Input": "Ik ga op Yuandan terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Yuandan", @@ -145,7 +145,7 @@ }, { "Input": "Ik ga op Thanksgiving terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Thanksgiving", @@ -157,7 +157,7 @@ }, { "Input": "Ik ga op Vaderdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Vaderdag", @@ -169,7 +169,7 @@ }, { "Input": "Ik ga op Yuandan dit jaar terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Yuandan dit jaar", @@ -181,7 +181,7 @@ }, { "Input": "Ik ga op Yuandan 2016 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Yuandan 2016", @@ -193,7 +193,7 @@ }, { "Input": "Ik ga terug op Eerste Paasdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Eerste Paasdag", @@ -205,7 +205,7 @@ }, { "Input": "Ik ga op Martin Luther Kingdag terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Martin Luther Kingdag", @@ -217,7 +217,7 @@ }, { "Input": "MLKdag is een Amerikaanse nationale feestdag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "MLKdag", @@ -229,12 +229,12 @@ }, { "Input": "Er is een feestdag vernoemd naar de naam van Martin Luther King", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik ga terug op Dodenherdenking", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "Dodenherdenking", diff --git a/Specs/DateTime/Dutch/MergedExtractor.json b/Specs/DateTime/Dutch/MergedExtractor.json index 588a38500c..2adb03d79a 100644 --- a/Specs/DateTime/Dutch/MergedExtractor.json +++ b/Specs/DateTime/Dutch/MergedExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "dit is 2 dagen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2 dagen", @@ -13,7 +13,7 @@ }, { "Input": "dit is voor 16:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor 16:00", @@ -25,7 +25,7 @@ }, { "Input": "dit is voor 16:00 morgen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor 16:00 morgen", @@ -37,7 +37,7 @@ }, { "Input": "dit is voor morgen 16:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor morgen 16:00", @@ -49,7 +49,7 @@ }, { "Input": "dit is na 16:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "na 16:00", @@ -61,7 +61,7 @@ }, { "Input": "dit is na 16:00 morgen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "na 16:00 morgen", @@ -73,7 +73,7 @@ }, { "Input": "dit is na morgen 16.00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "na morgen 16.00", @@ -85,7 +85,7 @@ }, { "Input": "Ik ben over 5 minuten terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 5 minuten", @@ -97,7 +97,7 @@ }, { "Input": "afgelopen week", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "afgelopen week", @@ -109,7 +109,7 @@ }, { "Input": "plan een meeting over 10 uur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "over 10 uur", @@ -121,7 +121,7 @@ }, { "Input": "Hoe ziet deze deze dag eruit?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze dag", @@ -133,7 +133,7 @@ }, { "Input": "Hoe ziet deze week eruit?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "deze week", @@ -145,7 +145,7 @@ }, { "Input": "Hoe ziet mijn week eruit?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mijn week", @@ -157,7 +157,7 @@ }, { "Input": "Hoe ziet de week eruit?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de week", @@ -169,7 +169,7 @@ }, { "Input": "Hoe ziet mijn dag eruit?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mijn dag", @@ -181,7 +181,7 @@ }, { "Input": "Hoe ziet de dag eruit?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de dag", @@ -193,7 +193,8 @@ }, { "Input": "Plan een meeting 's ochtends van 9:00 tot 11:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "'s ochtends van 9:00 tot 11:00", @@ -205,7 +206,7 @@ }, { "Input": "Plan een meeting morgen van 9:00 tot 11:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "morgen van 9:00 tot 11:00", @@ -217,7 +218,7 @@ }, { "Input": "Wijzig de meeting van de 22e juli in Bellevue naar de 22e augustus", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de 22e juli", @@ -235,7 +236,7 @@ }, { "Input": "na 2-7", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "na 2-7", @@ -247,7 +248,7 @@ }, { "Input": "sinds 2-7", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "sinds 2-7", @@ -259,7 +260,7 @@ }, { "Input": "voor 2-7", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor 2-7", @@ -271,7 +272,7 @@ }, { "Input": "06-06 12:15", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "06-06 12:15", @@ -283,7 +284,7 @@ }, { "Input": "06-06-12 15:15", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "06-06-12 15:15", @@ -295,7 +296,7 @@ }, { "Input": "06-06, 2015", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "06-06, 2015", @@ -307,7 +308,7 @@ }, { "Input": "29 mei", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "29 mei", @@ -319,7 +320,7 @@ }, { "Input": "29 maart", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "29 maart", @@ -331,7 +332,7 @@ }, { "Input": "Ik ben geboren maart", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maart", @@ -343,7 +344,7 @@ }, { "Input": "Ik geboren in de maart", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "maart", @@ -355,7 +356,7 @@ }, { "Input": "mei", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "mei", @@ -367,37 +368,37 @@ }, { "Input": "Wat zijn de openingstijden van Palomino?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "in de zon", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "welke email hebben een reactie gehad?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Hij is vaak alleen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "vaak een vogel", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "uren van michigan", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik wijzig de afspraak van 15:00 naar 4", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15:00", @@ -415,7 +416,7 @@ }, { "Input": "Ik wijzig de afspraak van 15:00 naar 4,", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15:00", @@ -433,7 +434,7 @@ }, { "Input": "Ik wijzig de afspraak van drie uur 's middags naar vier", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "drie uur 's middags", @@ -451,7 +452,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar elf", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -469,7 +470,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 4.,", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -487,7 +488,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar elf!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -505,7 +506,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar elf?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -523,7 +524,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 20!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -541,7 +542,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar twintig!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -559,7 +560,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar dertien!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -577,7 +578,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 13!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -595,7 +596,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 0!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -613,7 +614,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 24!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -631,7 +632,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar nul.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -649,7 +650,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar vierentwintig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -667,7 +668,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 4, hoe denk je?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -685,7 +686,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 4.3", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -697,7 +698,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar zesentwintig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -709,7 +710,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 4 of later", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -721,7 +722,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar 25", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -733,7 +734,7 @@ }, { "Input": "Ik wijzig de afspraak van tien uur 's ochtends naar vijfentwintig", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien uur 's ochtends", @@ -751,7 +752,7 @@ }, { "Input": "volgende meeting zal plaatsvinden op 16 maart, 2017, zullen we anders een gesprek hebben om 2 uur deze middag? ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16 maart, 2017", @@ -769,7 +770,7 @@ }, { "Input": "1 april, 2018, we kunnen het 2 uur vanmiddag plannen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 april, 2018", @@ -787,7 +788,7 @@ }, { "Input": "Het bereik is voor 2012", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor 2012", @@ -799,7 +800,7 @@ }, { "Input": "Het bereik is tot 2012", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tot 2012", @@ -811,7 +812,8 @@ }, { "Input": "Het bereik is 2012 of erna", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "2012 of erna", @@ -823,7 +825,7 @@ }, { "Input": "Ik ben 11-2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11-2016", @@ -835,7 +837,7 @@ }, { "Input": "Ik ben 2016-11 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016-11", @@ -847,7 +849,7 @@ }, { "Input": "Ik ben 2016 november weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016 november", @@ -859,7 +861,7 @@ }, { "Input": "Ik ben november, 2016 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "november, 2016", @@ -871,7 +873,7 @@ }, { "Input": "Ik ben 2016, nov weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016, nov", @@ -883,7 +885,7 @@ }, { "Input": "Hij zal later dan of op 1-1-2016 aankomen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "later dan of op 1-1-2016", @@ -895,7 +897,7 @@ }, { "Input": "Hij zal voor of op 1-1-2016 vertrekken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor of op 1-1-2016", @@ -907,7 +909,7 @@ }, { "Input": "Deze taak zal af komen op of eerder dan 1-1-2016", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "op of eerder dan 1-1-2016", @@ -919,7 +921,7 @@ }, { "Input": "Deze taak zal af komen voor of in feb 2018", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "voor of in feb 2018", @@ -931,7 +933,7 @@ }, { "Input": "Je kunt niet eerder dan of in 2016 vertrekken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "eerder dan of in 2016", @@ -943,7 +945,7 @@ }, { "Input": "Je kunt kantoor niet verlaten om of na 18:30 vandaag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "om of na 18:30 vandaag", @@ -955,7 +957,7 @@ }, { "Input": "Je moet op of voor overmorgen vertrekken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "op of voor overmorgen", @@ -967,7 +969,7 @@ }, { "Input": "Je moet op of vroeger dan 15:00 15-5-2018 vertrekken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "op of vroeger dan 15:00 15-5-2018", @@ -979,7 +981,7 @@ }, { "Input": "Ben je twee dagen na vandaag beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen na vandaag", @@ -991,7 +993,7 @@ }, { "Input": "Ben je drie weken vanaf morgen beschikbaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "drie weken vanaf morgen", @@ -1003,7 +1005,7 @@ }, { "Input": "Waar was je twee dagen voor gisteren?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "twee dagen voor gisteren", @@ -1015,12 +1017,13 @@ }, { "Input": "Wat de verkoop per jaar?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Ik heb al mijn werk al meer dan 2 weken voor vandaag afgerond", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 weken voor vandaag", @@ -1032,7 +1035,7 @@ }, { "Input": "Ik zal binnen 2 weken vanaf vandaag terugkomen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "binnen 2 weken vanaf vandaag", @@ -1044,7 +1047,8 @@ }, { "Input": "Ik zal minder dan 2 weken vanaf vandaag terugkomen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "minder dan 2 weken vanaf vandaag", @@ -1056,7 +1060,8 @@ }, { "Input": "Deze taak zou meer dan 2 dagen voor gisteren afgerond moeten zijn", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "meer dan 2 dagen voor gisteren", @@ -1068,7 +1073,8 @@ }, { "Input": "Deze taak zal minder dan 3 dagen na morgen afgerond zijn", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "minder dan 3 dagen na morgen", @@ -1080,7 +1086,7 @@ }, { "Input": "Laten we 3 minuten vanaf nu beginnen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3 minuten vanaf nu", @@ -1092,7 +1098,8 @@ }, { "Input": "Laten we 3 minuten vanaf vandaag beginnen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "3 minuten", diff --git a/Specs/DateTime/Dutch/TimeExtractor.json b/Specs/DateTime/Dutch/TimeExtractor.json index 135c4cb4c3..d365318fb2 100644 --- a/Specs/DateTime/Dutch/TimeExtractor.json +++ b/Specs/DateTime/Dutch/TimeExtractor.json @@ -9,7 +9,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om zeven uur terug", @@ -21,7 +21,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7 uur ‘s avonds terug", @@ -33,7 +33,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:56 ‘s avonds terug", @@ -45,7 +45,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Ik ben om 7:56:35 ‘s avonds terug", @@ -57,7 +57,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12:34 terug", @@ -69,7 +69,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12:34:20 terug", @@ -81,7 +81,7 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om T12:34:20 terug", @@ -93,7 +93,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 00:00 terug", @@ -105,7 +105,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Ik ben om 00:00:30 terug", @@ -117,7 +117,7 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 7 uur", @@ -129,7 +129,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is zeven uur", @@ -141,7 +141,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 8 uur ‘s ochtends", @@ -153,7 +153,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 8 uur ‘s nachts", @@ -165,7 +165,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half negen", @@ -177,7 +177,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is kwart over acht", @@ -189,7 +189,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is kwart voor 10 ‘s avonds", @@ -201,7 +201,7 @@ "Length": 23 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is drie minuten voor acht", @@ -213,7 +213,7 @@ "Length": 22 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half acht", @@ -225,7 +225,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Het is half acht ‘s avonds", @@ -237,7 +237,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half acht ‘s ochtends", @@ -249,7 +249,7 @@ "Length": 21 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is kwart voor 8 in de ochtend", @@ -261,7 +261,7 @@ "Length": 26 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 10 voor half negen in de avond", @@ -273,7 +273,7 @@ "Length": 30 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7 uur in de avond terug", @@ -285,7 +285,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:00 ‘s avonds terug", @@ -297,7 +297,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Ik ben om 7:00:14 ‘s avonds terug", @@ -309,7 +309,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om vier uur ‘s middags terug", @@ -321,7 +321,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga terug om zeven uur dertig ‘s avonds", @@ -333,7 +333,7 @@ "Length": 26 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga terug om vier uur vijfendertig ‘s middags", @@ -345,7 +345,7 @@ "Length": 32 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf over elf", @@ -357,7 +357,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om drie minuten voor vijf ", @@ -369,7 +369,7 @@ "Length": 22 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om half zes 's avonds", @@ -381,7 +381,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik kom middagloos terug", @@ -393,7 +393,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben ‘s middags terug", @@ -405,7 +405,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12 uur ‘s middags terug", @@ -417,7 +417,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben tegen 11’en terug", @@ -429,7 +429,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Ik ben tegen 11-en terug", @@ -441,7 +441,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 340pm terug", @@ -453,7 +453,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 1140 a.m. terug", @@ -465,7 +465,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "middernacht", @@ -477,7 +477,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "mid morgen", @@ -489,7 +489,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "mid-morgen", @@ -501,7 +501,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "middag", @@ -513,7 +513,7 @@ "Length": 6 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "mid middag", @@ -525,7 +525,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "I'll be back 7 p m", @@ -537,7 +537,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7 uur p.m. terug", @@ -549,7 +549,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:56 a m terug", @@ -561,7 +561,7 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:56:35 a.m. terug", @@ -573,7 +573,7 @@ "Length": 12 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om 7:56:35 am", @@ -585,7 +585,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om 7:56:35 a. m.", @@ -597,7 +597,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om zeven uur dertig p.m.", @@ -609,7 +609,7 @@ "Length": 21 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 340 pm terug", @@ -621,7 +621,7 @@ "Length": 6 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 1140 a m terug", @@ -633,17 +633,17 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "welke emails hebben p als onderwerp gekregen", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "welke emails hebben een antwoord gehad", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12 uur lunchtijd terug", @@ -655,7 +655,7 @@ "Length": 16 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben met lunchtijd 12 uur terug", @@ -667,11 +667,11 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 19:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:00", @@ -683,7 +683,7 @@ }, { "Input": "Ik ben om 19:56 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:56", @@ -695,7 +695,7 @@ }, { "Input": "Ik ben om 19:56:35 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:56:35", @@ -707,7 +707,7 @@ }, { "Input": "Ik ben om 12:34:20u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12:34:20u", @@ -719,7 +719,7 @@ }, { "Input": "Ik ben om 00:00:30 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "00:00:30", @@ -731,7 +731,7 @@ }, { "Input": "Het is 8 uur 's morgens", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur 's morgens", @@ -743,7 +743,7 @@ }, { "Input": "Het is 8 uur 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur 's avonds", @@ -755,7 +755,7 @@ }, { "Input": "Het is half negen 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half negen 's avonds", @@ -767,7 +767,7 @@ }, { "Input": "Het is kwart voor 10 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor 10 's avonds", @@ -779,7 +779,7 @@ }, { "Input": "Het is half acht 's morgens", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht 's morgens", @@ -791,7 +791,7 @@ }, { "Input": "Het is kwart voor 8 's morgens", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor 8 's morgens", @@ -803,7 +803,7 @@ }, { "Input": "Het is tien voor half 9 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien voor half 9 's avonds", @@ -815,7 +815,7 @@ }, { "Input": "Ik ga half acht 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht 's avonds", @@ -827,7 +827,7 @@ }, { "Input": "Ik ga vijf over half acht 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijf over half acht 's avonds", @@ -839,7 +839,7 @@ }, { "Input": "Ik ga vijf over elf terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijf over elf", @@ -851,7 +851,7 @@ }, { "Input": "Ik ga drie minuten voor half zes terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "drie minuten voor half zes", @@ -863,7 +863,7 @@ }, { "Input": "Ik ga half zes 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half zes 's avonds", @@ -875,7 +875,7 @@ }, { "Input": "Ik ga 's avonds half zes terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds half zes", @@ -887,7 +887,7 @@ }, { "Input": "Ik ben rond het middaguur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rond het middaguur", @@ -899,7 +899,7 @@ }, { "Input": "Ik ben het middaguur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het middaguur", @@ -911,7 +911,7 @@ }, { "Input": "Ik ben rond elven terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rond elven", @@ -923,7 +923,7 @@ }, { "Input": "Ik ben 15:40 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15:40", @@ -935,7 +935,7 @@ }, { "Input": "Ik ben 11:40 's morgens terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11:40 's morgens", @@ -947,7 +947,7 @@ }, { "Input": "halverwege de ochtend", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "halverwege de ochtend", @@ -959,7 +959,7 @@ }, { "Input": "halverwege de middag", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "halverwege de middag", @@ -971,7 +971,7 @@ }, { "Input": "het middaguur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het middaguur", @@ -983,7 +983,7 @@ }, { "Input": "Ik ben 19:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:00", @@ -995,7 +995,7 @@ }, { "Input": "Ik ben 7:56 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7:56", @@ -1007,7 +1007,7 @@ }, { "Input": "Ik ben 7:56:35 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7:56:35", @@ -1019,7 +1019,7 @@ }, { "Input": "Ik ben 12 uur lunchtijd terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 uur lunchtijd", @@ -1031,7 +1031,7 @@ }, { "Input": "Ik ben lunchtijd 12 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "lunchtijd 12 uur", @@ -1043,7 +1043,7 @@ }, { "Input": "Ik ben om lunchtijd 12 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "om lunchtijd 12 uur", @@ -1055,12 +1055,12 @@ }, { "Input": "Cortana, plan een vergadering voor volgende week.\nBentonville, AR 72716 P: 479.277", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "21:00 schikt me", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21:00", @@ -1072,7 +1072,7 @@ }, { "Input": "9:00 schikt me", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9:00", @@ -1084,7 +1084,7 @@ }, { "Input": "Ik ben om 21:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21:00", @@ -1096,7 +1096,7 @@ }, { "Input": "Ik ben om 9:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9:00", @@ -1109,12 +1109,12 @@ { "Input": "Dit product is geprijsd als 1.6714.", "Comment": "1 shouldn't recognized as time here", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "15.00 : Ik zal deze week weg zijn", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "15.00", @@ -1126,8 +1126,8 @@ }, { "Input": "deze week 8.00 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "8.00", @@ -1139,8 +1139,8 @@ }, { "Input": "deze week 20.00 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.00", @@ -1152,8 +1152,8 @@ }, { "Input": "week 10 20.00 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.00", @@ -1165,8 +1165,8 @@ }, { "Input": "week 10 10.20 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "10.20", @@ -1178,7 +1178,7 @@ }, { "Input": "De doeltijd is 20.10", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.10", diff --git a/Specs/DateTime/Dutch/TimeParser.json b/Specs/DateTime/Dutch/TimeParser.json index 8d3c930ea1..24cfd08473 100644 --- a/Specs/DateTime/Dutch/TimeParser.json +++ b/Specs/DateTime/Dutch/TimeParser.json @@ -18,7 +18,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " zet de wekker op tien over half negen ‘s ochtends", @@ -39,7 +39,7 @@ "Length": 32 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " zet de wekker op tien over half negen ‘s avonds", @@ -60,7 +60,7 @@ "Length": 30 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "zet de wekker op kwart voor elf", @@ -81,7 +81,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "zet de wekker op vijftien uur vijftien", @@ -102,7 +102,7 @@ "Length": 21 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "zet de wekker op vijftien uur dertig", @@ -123,7 +123,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "zet de wekker op tien over tien", @@ -144,7 +144,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "zet de wekker op vijf voor elf ‘s avonds", @@ -165,7 +165,7 @@ "Length": 23 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "ik ben om 7 uur terug", @@ -186,7 +186,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " ik ben er om 7 uur ‘s avonds", @@ -207,7 +207,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "ik ben om 7:56pm terug", @@ -228,7 +228,7 @@ "Length": 6 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "ik ben om 7:56:30pm terug", @@ -249,7 +249,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "ik ben om 7:56:30 pm terug", @@ -270,7 +270,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "ik ben om 12:34 terug", @@ -291,7 +291,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "ik ben om 12:34:25 terug", @@ -312,7 +312,7 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 7 uur", @@ -333,7 +333,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is zeven uur", @@ -354,7 +354,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 8 uur ‘s ochtends", @@ -375,7 +375,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 8 uur ‘s avonds", @@ -396,7 +396,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half negen", @@ -417,7 +417,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Het is half negen ‘s avonds", @@ -438,7 +438,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is kwart over acht", @@ -459,7 +459,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Het is kwart over acht", @@ -480,7 +480,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is kwart voor tien", @@ -501,7 +501,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is drie minuten voor acht", @@ -522,7 +522,7 @@ "Length": 22 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half acht", @@ -543,7 +543,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half acht ‘s avonds", @@ -564,7 +564,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is half acht ‘s ochtends", @@ -585,7 +585,7 @@ "Length": 21 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is kwart voor acht ‘s ochtends", @@ -606,7 +606,7 @@ "Length": 27 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Het is 20 minuten over acht in de avond", @@ -627,7 +627,7 @@ "Length": 32 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7 uur ‘s avonds terug", @@ -648,7 +648,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik kom 3 uur in de middag terug", @@ -669,7 +669,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:00:05 ‘s avonds terug", @@ -690,7 +690,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7 uur 's avonds terug", @@ -711,7 +711,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om half acht ‘s avonds terug", @@ -732,7 +732,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf over half acht ‘s avonds terug", @@ -753,7 +753,7 @@ "Length": 29 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om tien voor half twaalf ’s avonds", @@ -774,7 +774,7 @@ "Length": 31 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben rond de middag terug", @@ -795,7 +795,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12 uur ‘s middags terug", @@ -816,7 +816,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben tegen 11’en terug", @@ -837,7 +837,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": " Ik ben tegen 11-en terug", @@ -858,7 +858,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 340pm terug", @@ -879,7 +879,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 1140 a.m. terug", @@ -900,7 +900,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "middernacht", @@ -921,7 +921,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "midmorgen", @@ -942,7 +942,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "halverwege de ochtend", @@ -963,7 +963,7 @@ "Length": 21 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "halverwege de middag", @@ -984,7 +984,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "middag", @@ -1005,7 +1005,7 @@ "Length": 6 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "12 uur ‘s middags", @@ -1026,7 +1026,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben met lunchtijd terug", @@ -1047,7 +1047,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om middernacht terug", @@ -1068,7 +1068,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12 uur in de nacht terug", @@ -1089,7 +1089,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 1 uur terug", @@ -1110,7 +1110,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 12 uur lunchtijd terug", @@ -1131,7 +1131,7 @@ "Length": 16 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 1 uur lunchtijd terug", @@ -1152,7 +1152,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:56:13 pm terug", @@ -1173,7 +1173,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "I'll ben om 12:34:45 terug", @@ -1194,7 +1194,7 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7:00:25 ‘s avonds terug", @@ -1215,7 +1215,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om zeven uur dertig ‘s ochtends terug", @@ -1236,7 +1236,7 @@ "Length": 28 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf over elf", @@ -1257,7 +1257,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om drie minuten voor half zes", @@ -1278,7 +1278,7 @@ "Length": 26 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om half zes ’s avonds terug", @@ -1299,7 +1299,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben op de middag terug", @@ -1320,7 +1320,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 7h01 terug", @@ -1341,7 +1341,7 @@ "Length": 4 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben om 10 H 10 pm terug", @@ -1362,7 +1362,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf over zes terug", @@ -1383,7 +1383,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om tien over zes terug", @@ -1404,7 +1404,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om kwart over zes terug", @@ -1425,7 +1425,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om tien voor half zeven terug", @@ -1446,7 +1446,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf voor half zeven terug", @@ -1467,7 +1467,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om half zeven terug", @@ -1488,7 +1488,7 @@ "Length": 10 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf over half zeven terug", @@ -1509,7 +1509,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om tien over half zeven terug", @@ -1530,7 +1530,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om kwart voor zeven terug", @@ -1551,7 +1551,7 @@ "Length": 16 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om tien voor zeven terug", @@ -1572,7 +1572,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ga om vijf voor zeven terug", @@ -1593,11 +1593,11 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "zet een alarm voor tien over half negen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien over half negen", @@ -1618,7 +1618,7 @@ }, { "Input": "zet een alarm voor tien over half negen 's morgens", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien over half negen 's morgens", @@ -1639,7 +1639,7 @@ }, { "Input": "zet een alarm voor tien over half negen 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien over half negen 's avonds", @@ -1660,7 +1660,7 @@ }, { "Input": "zet een alarm voor kwart voor elf", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor elf", @@ -1681,7 +1681,7 @@ }, { "Input": "zet een alarm voor kwart over drie 's middags", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart over drie 's middags", @@ -1702,7 +1702,7 @@ }, { "Input": "zet een alarm voor half vier 's middags", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half vier 's middags", @@ -1723,7 +1723,7 @@ }, { "Input": "zet een alarm voor tien over tien", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien over tien", @@ -1744,7 +1744,7 @@ }, { "Input": "zet een alarm voor vijf voor elf 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijf voor elf 's avonds", @@ -1765,7 +1765,7 @@ }, { "Input": "Ik ben om 7 u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7 u", @@ -1786,7 +1786,7 @@ }, { "Input": "Ik ben om zeven uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "zeven uur", @@ -1807,7 +1807,7 @@ }, { "Input": "Ik ben om 19:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:00", @@ -1828,7 +1828,7 @@ }, { "Input": "Ik ben om 19:56 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:56", @@ -1849,7 +1849,7 @@ }, { "Input": "Ik ben om 19:56:30 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:56:30", @@ -1870,7 +1870,7 @@ }, { "Input": "Ik ben om 12:34 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12:34", @@ -1891,7 +1891,7 @@ }, { "Input": "Ik ben om 12:34:25 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12:34:25", @@ -1912,7 +1912,7 @@ }, { "Input": "Het is 8 uur 's morgens", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur 's morgens", @@ -1933,7 +1933,7 @@ }, { "Input": "Het is 8 uur 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8 uur 's avonds", @@ -1954,7 +1954,7 @@ }, { "Input": "Het is half 9 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half 9 's avonds", @@ -1975,7 +1975,7 @@ }, { "Input": "Het is kwart voor 10 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor 10 's avonds", @@ -1996,7 +1996,7 @@ }, { "Input": "Het is half acht 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht 's avonds", @@ -2017,7 +2017,7 @@ }, { "Input": "Het is half acht 's ochtends", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht 's ochtends", @@ -2038,7 +2038,7 @@ }, { "Input": "Het is kwart voor 8 's ochtends", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "kwart voor 8 's ochtends", @@ -2059,7 +2059,7 @@ }, { "Input": "Het is 10 voor half negen 's avonds", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10 voor half negen 's avonds", @@ -2080,7 +2080,7 @@ }, { "Input": "Ik ben 7 uur 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7 uur 's avonds", @@ -2101,7 +2101,7 @@ }, { "Input": "Ik ben 's avonds 7 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds 7 uur", @@ -2122,7 +2122,7 @@ }, { "Input": "Ik ben 's avonds 7:00 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds 7:00", @@ -2143,7 +2143,7 @@ }, { "Input": "Ik ben 's avonds 7:00:05 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds 7:00:05", @@ -2164,7 +2164,7 @@ }, { "Input": "Ik ben 's avonds zeven uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds zeven uur", @@ -2185,7 +2185,7 @@ }, { "Input": "Ik ga half acht 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht 's avonds", @@ -2206,7 +2206,7 @@ }, { "Input": "Ik ga vijf over half acht 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijf over half acht 's avonds", @@ -2227,7 +2227,7 @@ }, { "Input": "Ik ga tien voor half twaalf 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien voor half twaalf 's avonds", @@ -2248,7 +2248,7 @@ }, { "Input": "Ik ben rond het middaguur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rond het middaguur", @@ -2269,7 +2269,7 @@ }, { "Input": "Ik ben rond elven terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "rond elven", @@ -2290,7 +2290,7 @@ }, { "Input": "Ik ben 15:40 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15:40", @@ -2311,7 +2311,7 @@ }, { "Input": "Ik ben 11:40 's morgens terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11:40 's morgens", @@ -2332,7 +2332,7 @@ }, { "Input": "het middaguur", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het middaguur", @@ -2353,7 +2353,7 @@ }, { "Input": "Ik ben 12 uur lunchtijd terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 uur lunchtijd", @@ -2374,7 +2374,7 @@ }, { "Input": "Ik ben 12 uur middernacht terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 uur middernacht", @@ -2395,7 +2395,7 @@ }, { "Input": "Ik ben 12 uur 's nachts terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12 uur 's nachts", @@ -2416,7 +2416,7 @@ }, { "Input": "Ik ben 1 uur middernacht terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 uur middernacht", @@ -2437,7 +2437,7 @@ }, { "Input": "Ik ben 11 uur lunchtijd terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11 uur lunchtijd", @@ -2458,7 +2458,7 @@ }, { "Input": "Ik ben 1 uur lunchtijd terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1 uur lunchtijd", @@ -2479,7 +2479,7 @@ }, { "Input": "Ik ben om lunchtijd 11 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "om lunchtijd 11 uur", @@ -2500,7 +2500,7 @@ }, { "Input": "Ik ben 19:56:13 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "19:56:13", @@ -2521,7 +2521,7 @@ }, { "Input": "Ik ben 12:34:45 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12:34:45", @@ -2542,7 +2542,7 @@ }, { "Input": "Ik ben 's avonds 7:00:25 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds 7:00:25", @@ -2563,7 +2563,7 @@ }, { "Input": "Ik ga half acht 's morgens terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half acht 's morgens", @@ -2584,7 +2584,7 @@ }, { "Input": "Ik ga vijf over elf terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vijf over elf", @@ -2605,7 +2605,7 @@ }, { "Input": "Ik ga drie minuten voor half zes terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "drie minuten voor half zes", @@ -2626,7 +2626,7 @@ }, { "Input": "Ik ga half zes 's avonds terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "half zes 's avonds", @@ -2647,7 +2647,7 @@ }, { "Input": "Ik ga 's avonds half zes terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds half zes", @@ -2668,7 +2668,7 @@ }, { "Input": "Ik ben het middaguur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "het middaguur", @@ -2689,7 +2689,7 @@ }, { "Input": "Ik ben om lunchtijd 12 uur terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "om lunchtijd 12 uur", @@ -2710,7 +2710,7 @@ }, { "Input": "Ik ben om 7:01u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7:01u", @@ -2731,7 +2731,7 @@ }, { "Input": "Ik ben om 22:10u terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22:10u", @@ -2752,7 +2752,7 @@ }, { "Input": "Ik ben om drie minuten na 22:10 terug", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "drie minuten na 22:10", @@ -2773,7 +2773,7 @@ }, { "Input": "15.00 : Ik zal op deze week weg zijn", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "15.00", @@ -2794,8 +2794,8 @@ }, { "Input": "deze week 8.00 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "8.00", @@ -2816,8 +2816,8 @@ }, { "Input": "deze week 20.00 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.00", @@ -2838,8 +2838,8 @@ }, { "Input": "week 10 20.00 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.00", @@ -2860,8 +2860,8 @@ }, { "Input": "week 10 10.20 zou een datumreeks en een tijd moeten zijn", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "10.20", @@ -2882,7 +2882,7 @@ }, { "Input": "De doeltijd is 20.10", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20.10", diff --git a/Specs/DateTime/Dutch/TimePeriodExtractor.json b/Specs/DateTime/Dutch/TimePeriodExtractor.json index dfbd25689a..7fc0b3d072 100644 --- a/Specs/DateTime/Dutch/TimePeriodExtractor.json +++ b/Specs/DateTime/Dutch/TimePeriodExtractor.json @@ -9,7 +9,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 17:00 tot 18:00", @@ -21,7 +21,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 17:00 tot 18:00 uur", @@ -33,7 +33,7 @@ "Length": 23 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 5 tot 6 ʼs middags", @@ -45,7 +45,7 @@ "Length": 22 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 5 tot zeven in de ochtend", @@ -57,7 +57,7 @@ "Length": 29 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 5:00 tot 6:00PM", @@ -69,7 +69,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg tussen 5 en 6PM", @@ -81,7 +81,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg tussen 5PM en 6PM", @@ -93,7 +93,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg tussen 5 en 6 ʼs middags", @@ -105,7 +105,7 @@ "Length": 24 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 4pm tot 5pm", @@ -117,7 +117,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 4-5pm", @@ -129,7 +129,7 @@ "Length": 5 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 4:00 tot 5pm", @@ -141,7 +141,7 @@ "Length": 12 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 4:00-5pm", @@ -153,7 +153,7 @@ "Length": 8 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 4:00 tot 7 uur", @@ -165,7 +165,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 3pm tot half acht ", @@ -177,7 +177,7 @@ "Length": 21 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 4pm-5pm", @@ -189,7 +189,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 4pm - 5pm", @@ -201,7 +201,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 16:00 – 17:00", @@ -213,7 +213,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 16:00–17:00", @@ -225,7 +225,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 16:00 – 17:00", @@ -237,7 +237,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 16:00–17:00", @@ -249,7 +249,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg 20 minuten voor drie tot acht ʼs avonds", @@ -261,7 +261,7 @@ "Length": 39 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 4 pm tot 5 pm", @@ -273,7 +273,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 4pm tot half zes", @@ -285,7 +285,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 16:00 tot 17:00", @@ -297,7 +297,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 16:00 tot half zes", @@ -309,7 +309,7 @@ "Length": 22 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 3 uur in de ochtend tot 5pm", @@ -321,7 +321,7 @@ "Length": 31 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg van 3 uur in de ochtend tot vijf uur in de middag", @@ -333,7 +333,7 @@ "Length": 49 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg tussen 16:00 uur en half zes", @@ -345,7 +345,7 @@ "Length": 28 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Ik ben weg tussen 3 uur in de ochtend en 17:00 uur", @@ -357,7 +357,7 @@ "Length": 39 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de ochtend afspreken", @@ -369,7 +369,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de middag afspreken", @@ -381,7 +381,7 @@ "Length": 12 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de avond afspreken ", @@ -393,7 +393,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we ʼs avonds afspreken ", @@ -405,7 +405,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de nacht afspreken ", @@ -417,7 +417,7 @@ "Length": 11 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we ʼs nachts afspreken ", @@ -429,7 +429,7 @@ "Length": 9 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de avonden afspreken", @@ -441,7 +441,7 @@ "Length": 13 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de vroege ochtenden afspreken", @@ -453,7 +453,7 @@ "Length": 22 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we in de late ochtenden afspreken", @@ -465,7 +465,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we vroeg in de ochtend afspreken", @@ -477,7 +477,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we laat in de ochtend afspreken", @@ -489,7 +489,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we vroeg in de middag afspreken", @@ -501,7 +501,7 @@ "Length": 18 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we laat in de middag afspreken", @@ -513,7 +513,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we vroeg in de avond afspreken", @@ -525,7 +525,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we laat in de avond afspreken", @@ -537,7 +537,7 @@ "Length": 16 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we vroeg in de nacht afspreken", @@ -549,7 +549,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we ʼs nachts laat afspreken", @@ -561,7 +561,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "laten we ʼs nachts vroeg afspreken", @@ -573,7 +573,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van twee tot vijf ʼs middags", @@ -585,7 +585,7 @@ "Length": 28 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Feestje bij Jean van 18:00 tot 23:00 uur", @@ -597,7 +597,7 @@ "Length": 23 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van 14:00 tot 16:30", @@ -609,7 +609,7 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van twee tot vijf in de middag", @@ -621,7 +621,7 @@ "Length": 30 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van 1 uur ʼs middags tot 4", @@ -633,7 +633,7 @@ "Length": 26 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van 1 uur in de middag tot 4.", @@ -645,7 +645,7 @@ "Length": 28 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van 13:30 tot 4!", @@ -657,7 +657,7 @@ "Length": 15 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken van 13:30 uur tot 4!", @@ -669,22 +669,22 @@ "Length": 19 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken 13:30 voor 4 personen", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken 13:30 uur voor 4 personen", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "afspraak maken om 13:30 uur voor 4 personen", "Results": [], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Hi Cortana- Maak alsjeblieft een skype afspraak met Jennifer. Ik heb een afspraak van 30 minuten in de middag nodig, deze vrijdag zal ik vertrekken.", @@ -696,7 +696,7 @@ "Length": 12 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "Hi Cortana- Maak alsjeblieft een skype afspraak met Jennifer. Ik heb vrijdag een afspraak van 30 minuten nodig, in de middag zal ik vertrekken.", @@ -708,7 +708,7 @@ "Length": 12 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "maak afspraak van 1:30 tot 3:30", @@ -720,7 +720,7 @@ "Length": 17 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "maak afspraak van 1:30 pm tot 3:30", @@ -732,7 +732,7 @@ "Length": 20 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "maak afspraak van 1:30 pm tot 3:30 pm", @@ -744,7 +744,7 @@ "Length": 23 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "maak afspraak van 1 tot 3:30", @@ -756,7 +756,7 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "maak afspraak van 1:30 tot 3", @@ -768,11 +768,12 @@ "Length": 14 } ], - "NotSupportedByDesign": "javascript,python,java" + "NotSupportedByDesign": "javascript,java" }, { "Input": "maak afspraak tussen 10 en 11:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10 en 11:30", @@ -784,7 +785,8 @@ }, { "Input": "maak afspraak tussen 10:10am en 12:50", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10:10am en 12:50", @@ -796,7 +798,8 @@ }, { "Input": "maak afspraak tussen 10:10pm en 3", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10:10pm en 3", @@ -808,7 +811,7 @@ }, { "Input": "maak afspraak van 22:10 tot 10", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 22:10 tot 10", @@ -820,7 +823,7 @@ }, { "Input": "maak afspraak van 10:30am tot 23", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30am tot 23", @@ -832,7 +835,7 @@ }, { "Input": "Ik ben 5 tot 18:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 tot 18:00", @@ -844,7 +847,7 @@ }, { "Input": "Ik ben 5 tot 6 's middags weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 tot 6 's middags", @@ -856,7 +859,7 @@ }, { "Input": "Ik ben 5 tot zeven uur 's morgens weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 tot zeven uur 's morgens", @@ -868,7 +871,7 @@ }, { "Input": "Ik ben van 5 tot 18:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 18:00", @@ -880,7 +883,7 @@ }, { "Input": "Ik ben tussen 5 en 18:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 5 en 18:00", @@ -892,7 +895,7 @@ }, { "Input": "Ik ben tussen 17:00 en 18:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 17:00 en 18:00", @@ -904,7 +907,7 @@ }, { "Input": "Ik ben tussen 5 en 6 's middags weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 5 en 6 's middags", @@ -916,7 +919,7 @@ }, { "Input": "Ik ben 16:00 tot 17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16:00 tot 17:00", @@ -928,7 +931,7 @@ }, { "Input": "Ik ben 4 tot 17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4 tot 17:00", @@ -940,7 +943,7 @@ }, { "Input": "Ik ben 4:00 tot 17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4:00 tot 17:00", @@ -952,7 +955,7 @@ }, { "Input": "Ik ben 4:00 tot 7 uur weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4:00 tot 7 uur", @@ -964,7 +967,7 @@ }, { "Input": "Ik ben 15:00 tot half acht weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15:00 tot half acht", @@ -976,7 +979,7 @@ }, { "Input": "Ik ben 16:00-17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16:00-17:00", @@ -988,7 +991,7 @@ }, { "Input": "Ik ben tien over half drie tot acht uur 's avonds weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tien over half drie tot acht uur 's avonds", @@ -1000,7 +1003,7 @@ }, { "Input": "Ik ben van 16:00 tot 17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot 17:00", @@ -1012,7 +1015,7 @@ }, { "Input": "Ik ben van 16:00 tot half zes weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot half zes", @@ -1024,7 +1027,7 @@ }, { "Input": "Ik ben van 3 uur 's ochtends tot 17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3 uur 's ochtends tot 17:00", @@ -1036,7 +1039,7 @@ }, { "Input": "Ik ben van 3 uur 's ochtends tot vijf uur 's middags weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3 uur 's ochtends tot vijf uur 's middags", @@ -1048,7 +1051,7 @@ }, { "Input": "Ik ben tussen 16:00 en half zes weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 16:00 en half zes", @@ -1060,7 +1063,7 @@ }, { "Input": "Ik ben tussen 3 uur 's ochtends en 17:00 weg", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 uur 's ochtends en 17:00", @@ -1072,7 +1075,7 @@ }, { "Input": "laten we 's ochtends afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s ochtends", @@ -1084,7 +1087,7 @@ }, { "Input": "laten we 's middags afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s middags", @@ -1096,7 +1099,7 @@ }, { "Input": "laten we 's nachts afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s nachts", @@ -1108,7 +1111,7 @@ }, { "Input": "laten we 's avonds afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds", @@ -1120,7 +1123,7 @@ }, { "Input": "laten we vroeg in de ochtenden afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "vroeg in de ochtenden", @@ -1132,7 +1135,7 @@ }, { "Input": "laten we laat in de ochtenden afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat in de ochtenden", @@ -1144,7 +1147,7 @@ }, { "Input": "laten we laat in de nacht afspreken", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "laat in de nacht", @@ -1156,7 +1159,7 @@ }, { "Input": "regel een meeting van twee tot vijf uur 's middags", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van twee tot vijf uur 's middags", @@ -1168,7 +1171,7 @@ }, { "Input": "Feest bij Jean van 6 tot 23:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 6 tot 23:00", @@ -1180,7 +1183,7 @@ }, { "Input": "regel meeting van 14:00 tot 16:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 14:00 tot 16:30", @@ -1192,7 +1195,7 @@ }, { "Input": "regel meeting van twee tot vijf 's middags", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van twee tot vijf 's middags", @@ -1204,7 +1207,7 @@ }, { "Input": "regel meeting 13:00 tot 16:00", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13:00 tot 16:00", @@ -1216,7 +1219,7 @@ }, { "Input": "regel meeting 13:00 tot 16:00.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13:00 tot 16:00", @@ -1228,7 +1231,7 @@ }, { "Input": "regel meeting 13:30 tot 4!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "13:30 tot 4", @@ -1240,12 +1243,12 @@ }, { "Input": "regel meeting 13:30 tot 4 mensen", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "Hoi Cortana- plan alsjeblieft een Skypemeeting met Jennifer. Ik heb een meeting van 30 min 's middags nodig, deze vrijdag vertrek ik.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s middags", @@ -1257,7 +1260,7 @@ }, { "Input": "Hoi Cortana- plan alsjeblieft een Skypemeeting met Jennifer. Ik heb een meeting van 30 min in de middag nodig, deze vrijdag vertrek ik.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de middag", @@ -1269,7 +1272,7 @@ }, { "Input": "regel meeting van 1:30 tot 3:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 tot 3:30", @@ -1281,7 +1284,7 @@ }, { "Input": "regel meeting van 13:30 tot 3:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:30 tot 3:30", @@ -1293,7 +1296,7 @@ }, { "Input": "regel meeting van 13:30 tot 15:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:30 tot 15:30", @@ -1305,7 +1308,7 @@ }, { "Input": "regel meeting van 1 tot 3:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1 tot 3:30", @@ -1317,7 +1320,7 @@ }, { "Input": "regel meeting van 1:30 tot 3", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 tot 3", @@ -1329,7 +1332,8 @@ }, { "Input": "regel meeting tussen 10 en 11:30", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10 en 11:30", @@ -1341,7 +1345,8 @@ }, { "Input": "regel meeting tussen 10:10 en 12:50", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 10:10 en 12:50", @@ -1353,7 +1358,8 @@ }, { "Input": "regel meeting tussen 22:10 en 3", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tussen 22:10 en 3", @@ -1365,7 +1371,7 @@ }, { "Input": "regel meeting van 22:10 tot 10", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 22:10 tot 10", @@ -1377,7 +1383,7 @@ }, { "Input": "regel meeting van 10:30 tot 23", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30 tot 23", @@ -1389,7 +1395,7 @@ }, { "Input": "bel me niet tijdens kantooruren", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tijdens kantooruren", @@ -1401,7 +1407,7 @@ }, { "Input": "Ik zal lunchtijd weg zijn.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "lunchtijd", @@ -1413,8 +1419,8 @@ }, { "Input": "Hij heeft lunchpauze", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "lunchpauze", @@ -1426,8 +1432,8 @@ }, { "Input": "Dit populaire, familievriendelijke concert komt terug naar de Hall voor weer een lunchconcert vol met traditionele kerstliederen en feestfavorieten", - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "lunchconcert", diff --git a/Specs/DateTime/Dutch/TimePeriodParser.json b/Specs/DateTime/Dutch/TimePeriodParser.json index f514780dfb..b3b7dbbb10 100644 --- a/Specs/DateTime/Dutch/TimePeriodParser.json +++ b/Specs/DateTime/Dutch/TimePeriodParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 tot 18:00", @@ -30,7 +30,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 tot 6 's avonds", @@ -56,7 +56,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5 tot zeven 's morgens", @@ -82,7 +82,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 18:00", @@ -108,7 +108,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 5 tot 6 in de avond", @@ -134,7 +134,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 5 en 6 's avonds", @@ -160,7 +160,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 17:00 en 18:00", @@ -186,7 +186,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 5 en 6 's middags", @@ -212,7 +212,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:00 tot 17:00", @@ -238,7 +238,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 16:00 tot 17:00", @@ -264,7 +264,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 4 tot 5 's avonds", @@ -290,7 +290,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4:00 tot 7 uur", @@ -316,7 +316,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16:00-17:00", @@ -342,7 +342,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "16:00 - 17:00", @@ -368,7 +368,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3 uur 's ochtends tot 17:00", @@ -394,7 +394,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 3 uur 's ochtends en 17:00", @@ -420,7 +420,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 16:00 en 17:00", @@ -446,7 +446,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s ochtends", @@ -472,7 +472,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s middags", @@ -498,7 +498,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s nachts", @@ -524,7 +524,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "'s avonds", @@ -550,7 +550,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de avonden", @@ -576,7 +576,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de vroege morgens", @@ -603,7 +603,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de late morgens", @@ -630,7 +630,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de vroege morgen", @@ -657,7 +657,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de late morgen", @@ -684,7 +684,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de vroege middag", @@ -711,7 +711,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de late middag", @@ -738,7 +738,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de vroege avond", @@ -765,7 +765,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de late avond", @@ -792,7 +792,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de vroege nacht", @@ -819,7 +819,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "in de late nacht", @@ -846,7 +846,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1 's middags tot 4", @@ -872,7 +872,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:00 tot 4", @@ -898,9 +898,9 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupported": "dotnet", + "NotSupported": "dotnet,python", "Comment": "Not supported because the extraction is not at the end of the Input", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:00 tot 4", @@ -926,7 +926,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 's middags tot 4", @@ -952,7 +952,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:30 tot 4", @@ -978,9 +978,9 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupported": "dotnet", + "NotSupported": "dotnet,python", "Comment": "Not supported because the extraction is not at the end of the Input", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:30 tot 4", @@ -1006,7 +1006,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "de ochtend", @@ -1032,7 +1032,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 tot 3", @@ -1058,7 +1058,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 11:00 tot 3", @@ -1084,7 +1084,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 23:00 tot 3", @@ -1110,7 +1110,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 23:01 tot 11", @@ -1136,7 +1136,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 11:01 's ochtends tot 11", @@ -1162,7 +1162,8 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 11:01 tot 11", @@ -1188,7 +1189,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 11:00 tot 11:50", @@ -1214,7 +1215,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 's middags tot 3:30", @@ -1240,7 +1241,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:30 tot 3:30", @@ -1266,7 +1267,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 13:30 tot 15:30", @@ -1292,7 +1293,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 15:00 tot 15:30", @@ -1318,7 +1319,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 0:01 tot 13:00", @@ -1344,7 +1345,8 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 0:01 's ochtends tot 1", @@ -1370,7 +1372,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 0:01 tot 1", @@ -1396,7 +1398,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 3 tot 3:30", @@ -1422,7 +1424,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 tot 3", @@ -1448,7 +1450,8 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "van 1:30 tot 3 's middags", @@ -1474,7 +1477,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 1:30 tot 15:00", @@ -1500,7 +1503,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 11 tot 15:00", @@ -1526,7 +1529,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 11 tot 11:50", @@ -1552,7 +1555,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 11 tot 3 's ochtends", @@ -1578,7 +1581,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10 tot 11:00", @@ -1604,7 +1607,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 23 tot 3:00", @@ -1630,7 +1633,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 23 tot 15:00", @@ -1656,7 +1659,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 10 en 11:30", @@ -1682,7 +1685,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 10:10 en 12:50", @@ -1708,7 +1711,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "tussen 22:10 en 3", @@ -1734,7 +1737,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 22:10 tot 10", @@ -1760,7 +1763,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "van 10:30 tot 23", @@ -1786,7 +1789,8 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", + "NotSupported": "python", "Results": [ { "Text": "tijdens de werkuren", @@ -1812,8 +1816,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "lunchtijd", @@ -1839,8 +1843,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "lunchpauze", @@ -1866,8 +1870,8 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupported": "dotnet", - "NotSupportedByDesign": "java, javascript, python", + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "lunchconcert", diff --git a/Specs/DateTime/English/DateExtractor.json b/Specs/DateTime/English/DateExtractor.json index 7195b9bb60..8e2ff50169 100644 --- a/Specs/DateTime/English/DateExtractor.json +++ b/Specs/DateTime/English/DateExtractor.json @@ -745,6 +745,110 @@ } ] }, + { + "Input": "I'll go back on April first 2021.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "April first 2021", + "Type": "date", + "Start": 16, + "Length": 16 + } + ] + }, + { + "Input": "I'll go back Jun third 2023", + "NotSupported": "javascript", + "Results": [ + { + "Text": "Jun third 2023", + "Type": "date", + "Start": 13, + "Length": 14 + } + ] + }, + { + "Input": "I'll go back September the second 2025.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "September the second 2025", + "Type": "date", + "Start": 13, + "Length": 25 + } + ] + }, + { + "Input": "I'll go back March one 2020", + "NotSupported": "javascript", + "Results": [ + { + "Text": "March one 2020", + "Type": "date", + "Start": 13, + "Length": 14 + } + ] + }, + { + "Input": "I'll go back Aug twelve 2024.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "Aug twelve 2024", + "Type": "date", + "Start": 13, + "Length": 15 + } + ] + }, + { + "Input": "I'll go back February twenty fifth", + "Results": [ + { + "Text": "February twenty fifth", + "Type": "date", + "Start": 13, + "Length": 21 + } + ] + }, + { + "Input": "I'll go back on Nov the twelfth.", + "Results": [ + { + "Text": "Nov the twelfth", + "Type": "date", + "Start": 16, + "Length": 15 + } + ] + }, + { + "Input": "I'll go back January thirty one", + "Results": [ + { + "Text": "January thirty one", + "Type": "date", + "Start": 13, + "Length": 18 + } + ] + }, + { + "Input": "I'll go back Oct twenty three.", + "Results": [ + { + "Text": "Oct twenty three", + "Type": "date", + "Start": 13, + "Length": 16 + } + ] + }, { "Input": "i went back two months ago", "Results": [ @@ -1285,7 +1389,7 @@ "NotSupported": "javascript, python", "Results": [ { - "Text": "the 20th next month", + "Text": "20th next month", "Type": "date", "Start": 12, "Length": 19 @@ -1329,7 +1433,7 @@ }, { "Input": "on september the twenty-first nineteen seventy eight", - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "september the twenty-first nineteen seventy eight", @@ -1341,7 +1445,7 @@ }, { "Input": "on september 10, nineteen zero one", - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "september 10, nineteen zero one", @@ -1353,7 +1457,7 @@ }, { "Input": "on the tenth of september, two thousand", - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "tenth of september, two thousand", @@ -1620,7 +1724,7 @@ }, { "Input": "i'll go back twenty second of june 2017", - "NotSupported": "python,javascript", + "NotSupported": "javascript", "Results": [ { "Text": "twenty second of june 2017", @@ -1632,7 +1736,7 @@ }, { "Input": "i'll go back twenty-second of june 2017", - "NotSupported": "python,javascript", + "NotSupported": "javascript", "Results": [ { "Text": "twenty-second of june 2017", @@ -1680,5 +1784,60 @@ "Length": 17 } ] + }, + { + "Input": "Book me a trip on Monday 8th", + "Results": [ + { + "Text": "Monday 8th", + "Type": "date", + "Start": 18, + "Length": 10 + } + ] + }, + { + "Input": "the photograph appeared in the 01/07 issue of the magazine", + "Results": [ + { + "Text": "the 01/07", + "Type": "date", + "Start": 27, + "Length": 9 + } + ] + }, + { + "Input": "the contract is expected to start on 10/11", + "Results": [ + { + "Text": "10/11", + "Type": "date", + "Start": 37, + "Length": 5 + } + ] + }, + { + "Input": "the software used in the 11/3/2020 election can be easily hacked", + "Results": [ + { + "Text": "the 11/3/2020", + "Type": "date", + "Start": 21, + "Length": 13 + } + ] + }, + { + "Input": "this article was published on 06/10/2020", + "Results": [ + { + "Text": "06/10/2020", + "Type": "date", + "Start": 30, + "Length": 10 + } + ] } ] diff --git a/Specs/DateTime/English/DateParser.json b/Specs/DateTime/English/DateParser.json index e3b3bf72ff..3520312fba 100644 --- a/Specs/DateTime/English/DateParser.json +++ b/Specs/DateTime/English/DateParser.json @@ -728,6 +728,218 @@ } ] }, + { + "Input": "I'll go back on April first 2021.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "April first 2021", + "Type": "date", + "Value": { + "Timex": "2021-04-01", + "FutureResolution": { + "date": "2021-04-01" + }, + "PastResolution": { + "date": "2021-04-01" + } + }, + "Start": 16, + "Length": 16 + } + ] + }, + { + "Input": "I'll go back Jun third 2023", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "Jun third 2023", + "Type": "date", + "Value": { + "Timex": "2023-06-03", + "FutureResolution": { + "date": "2023-06-03" + }, + "PastResolution": { + "date": "2023-06-03" + } + }, + "Start": 13, + "Length": 14 + } + ] + }, + { + "Input": "I'll go back September the second 2025.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "September the second 2025", + "Type": "date", + "Value": { + "Timex": "2025-09-02", + "FutureResolution": { + "date": "2025-09-02" + }, + "PastResolution": { + "date": "2025-09-02" + } + }, + "Start": 13, + "Length": 25 + } + ] + }, + { + "Input": "I'll go back March one 2020", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "March one 2020", + "Type": "date", + "Value": { + "Timex": "2020-03-01", + "FutureResolution": { + "date": "2020-03-01" + }, + "PastResolution": { + "date": "2020-03-01" + } + }, + "Start": 13, + "Length": 14 + } + ] + }, + { + "Input": "I'll go back Aug twelve 2024.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "Aug twelve 2024", + "Type": "date", + "Value": { + "Timex": "2024-08-12", + "FutureResolution": { + "date": "2024-08-12" + }, + "PastResolution": { + "date": "2024-08-12" + } + }, + "Start": 13, + "Length": 15 + } + ] + }, + { + "Input": "I'll go back February twenty fifth", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "February twenty fifth", + "Type": "date", + "Value": { + "Timex": "XXXX-02-25", + "FutureResolution": { + "date": "2024-02-25" + }, + "PastResolution": { + "date": "2023-02-25" + } + }, + "Start": 13, + "Length": 21 + } + ] + }, + { + "Input": "I'll go back on Nov the twelfth.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "Nov the twelfth", + "Type": "date", + "Value": { + "Timex": "XXXX-11-12", + "FutureResolution": { + "date": "2023-11-12" + }, + "PastResolution": { + "date": "2022-11-12" + } + }, + "Start": 16, + "Length": 15 + } + ] + }, + { + "Input": "I'll go back January thirty one", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "January thirty one", + "Type": "date", + "Value": { + "Timex": "XXXX-01-31", + "FutureResolution": { + "date": "2024-01-31" + }, + "PastResolution": { + "date": "2023-01-31" + } + }, + "Start": 13, + "Length": 18 + } + ] + }, + { + "Input": "I'll go back Oct twenty three.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "Oct twenty three", + "Type": "date", + "Value": { + "Timex": "XXXX-10-23", + "FutureResolution": { + "date": "2023-10-23" + }, + "PastResolution": { + "date": "2022-10-23" + } + }, + "Start": 13, + "Length": 16 + } + ] + }, { "Input": "I'll go back on Friday", "Context": { @@ -2564,6 +2776,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, + "NotSupported": "python", "Results": [ { "Text": "two days from tomorrow", @@ -2587,6 +2800,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, + "NotSupported": "python", "Results": [ { "Text": "four days from yesterday", @@ -2702,6 +2916,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, + "NotSupported": "python", "Results": [ { "Text": "3-7-27", @@ -2725,6 +2940,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, + "NotSupported": "python", "Results": [ { "Text": "05/05/89", @@ -2748,6 +2964,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, + "NotSupported": "python", "Results": [ { "Text": "05/05/71", @@ -2771,6 +2988,7 @@ "Context": { "ReferenceDateTime": "2018-05-07T00:00:00" }, + "NotSupported": "python", "Results": [ { "Text": "two sundays from now", @@ -2818,7 +3036,7 @@ "Context": { "ReferenceDateTime": "2018-05-31T00:00:00" }, - "NotSupported": "javascript", + "NotSupported": "javascript, python", "Results": [ { "Text": "two days after today", @@ -2938,7 +3156,7 @@ "Context": { "ReferenceDateTime": "2018-08-21T08:00:00" }, - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "twenty second of june 2017", @@ -3008,7 +3226,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "java, javascript", + "NotSupported": "java, javascript, python", "Results": [ { "Text": "Feb 29", @@ -3032,7 +3250,7 @@ "Context": { "ReferenceDateTime": "2019-03-22T00:00:00" }, - "NotSupported": "java, javascript", + "NotSupported": "java, javascript, python", "Results": [ { "Text": "2/29", @@ -3056,7 +3274,7 @@ "Context": { "ReferenceDateTime": "2020-03-22T00:00:00" }, - "NotSupported": "java, javascript", + "NotSupported": "java, javascript, python", "Results": [ { "Text": "Feb 29th", @@ -3143,5 +3361,97 @@ "Length": 9 } ] + }, + { + "Input": "the photograph appeared in the 01/07 issue of the magazine", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "the 01/07", + "Type": "date", + "Value": { + "Timex": "XXXX-01-07", + "FutureResolution": { + "date": "2024-01-07" + }, + "PastResolution": { + "date": "2023-01-07" + } + }, + "Start": 27, + "Length": 9 + } + ] + }, + { + "Input": "the contract is expected to start on 10/11", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "10/11", + "Type": "date", + "Value": { + "Timex": "XXXX-10-11", + "FutureResolution": { + "date": "2023-10-11" + }, + "PastResolution": { + "date": "2022-10-11" + } + }, + "Start": 37, + "Length": 5 + } + ] + }, + { + "Input": "the software used in the 11/3/2020 election can be easily hacked", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "the 11/3/2020", + "Type": "date", + "Value": { + "Timex": "2020-11-03", + "FutureResolution": { + "date": "2020-11-03" + }, + "PastResolution": { + "date": "2020-11-03" + } + }, + "Start": 21, + "Length": 13 + } + ] + }, + { + "Input": "this article was published on 06/10/2020", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "06/10/2020", + "Type": "date", + "Value": { + "Timex": "2020-06-10", + "FutureResolution": { + "date": "2020-06-10" + }, + "PastResolution": { + "date": "2020-06-10" + } + }, + "Start": 30, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/English/DatePeriodExtractor.json b/Specs/DateTime/English/DatePeriodExtractor.json index e99c9f76a0..28b481b2be 100644 --- a/Specs/DateTime/English/DatePeriodExtractor.json +++ b/Specs/DateTime/English/DatePeriodExtractor.json @@ -3915,5 +3915,29 @@ "Length": 43 } ] + }, + { + "Input": "Show me the records for August 99", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "August 99", + "Type": "daterange", + "Start": 24, + "Length": 9 + } + ] + }, + { + "Input": "Show me the records for August '99", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "August '99", + "Type": "daterange", + "Start": 24, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/English/DatePeriodParser.json b/Specs/DateTime/English/DatePeriodParser.json index 9be0c5a87a..3816e3c3b2 100644 --- a/Specs/DateTime/English/DatePeriodParser.json +++ b/Specs/DateTime/English/DatePeriodParser.json @@ -6128,5 +6128,51 @@ "Length": 14 } ] + }, + { + "Input": "Show me the records for August 99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "August 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 24, + "Length": 9 + } + ] + }, + { + "Input": "Show me the records for August '99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "August '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 24, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/English/DateTimeExtractor.json b/Specs/DateTime/English/DateTimeExtractor.json index e42a7c80de..6c326e8e74 100644 --- a/Specs/DateTime/English/DateTimeExtractor.json +++ b/Specs/DateTime/English/DateTimeExtractor.json @@ -32,6 +32,28 @@ } ] }, + { + "Input": "I'll go back on 15 at 00:00", + "Results": [ + { + "Text": "15 at 00:00", + "Type": "datetime", + "Start": 16, + "Length": 11 + } + ] + }, + { + "Input": "I'll go back on 15 at 00:00:00", + "Results": [ + { + "Text": "15 at 00:00:00", + "Type": "datetime", + "Start": 16, + "Length": 14 + } + ] + }, { "Input": "I'll go back on 15 at 8:00", "Results": [ diff --git a/Specs/DateTime/English/DateTimeModel.json b/Specs/DateTime/English/DateTimeModel.json index 87bc77c43b..f697b992e2 100644 --- a/Specs/DateTime/English/DateTimeModel.json +++ b/Specs/DateTime/English/DateTimeModel.json @@ -228,6 +228,238 @@ } ] }, + { + "Input": "I'll go back on April first 2021.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "april first 2021", + "Start": 16, + "End": 31, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "2021-04-01", + "type": "date", + "value": "2021-04-01" + } + ] + } + } + ] + }, + { + "Input": "I'll go back Jun third 2023", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "jun third 2023", + "Start": 13, + "End": 26, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "2023-06-03", + "type": "date", + "value": "2023-06-03" + } + ] + } + } + ] + }, + { + "Input": "I'll go back September the second 2025.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "september the second 2025", + "Start": 13, + "End": 37, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "2025-09-02", + "type": "date", + "value": "2025-09-02" + } + ] + } + } + ] + }, + { + "Input": "I'll go back March one 2020", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "march one 2020", + "TypeName": "datetimeV2.date", + "Start": 13, + "End": 26, + "Resolution": { + "values": [ + { + "timex": "2020-03-01", + "type": "date", + "value": "2020-03-01" + } + ] + } + } + ] + }, + { + "Input": "I'll go back Aug twelve 2024.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "NotSupported": "javascript", + "Results": [ + { + "Text": "aug twelve 2024", + "TypeName": "datetimeV2.date", + "Start": 13, + "End": 27, + "Resolution": { + "values": [ + { + "timex": "2024-08-12", + "type": "date", + "value": "2024-08-12" + } + ] + } + } + ] + }, + { + "Input": "I'll go back February twenty fifth", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "february twenty fifth", + "Start": 13, + "End": 33, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-02-25", + "type": "date", + "value": "2023-02-25" + }, + { + "timex": "XXXX-02-25", + "type": "date", + "value": "2024-02-25" + } + ] + } + } + ] + }, + { + "Input": "I'll go back on Nov the twelfth.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "nov the twelfth", + "Start": 16, + "End": 30, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-11-12", + "type": "date", + "value": "2022-11-12" + }, + { + "timex": "XXXX-11-12", + "type": "date", + "value": "2023-11-12" + } + ] + } + } + ] + }, + { + "Input": "I'll go back January thirty one", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "january thirty one", + "Start": 13, + "End": 30, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-01-31", + "type": "date", + "value": "2023-01-31" + }, + { + "timex": "XXXX-01-31", + "type": "date", + "value": "2024-01-31" + } + ] + } + } + ] + }, + { + "Input": "I'll go back Oct twenty three.", + "Context": { + "ReferenceDateTime": "2023-04-25T00:00:00" + }, + "Results": [ + { + "Text": "oct twenty three", + "Start": 13, + "End": 28, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-10-23", + "type": "date", + "value": "2022-10-23" + }, + { + "timex": "XXXX-10-23", + "type": "date", + "value": "2023-10-23" + } + ] + } + } + ] + }, { "Input": "I'll go back today", "Context": { @@ -9876,7 +10108,7 @@ "Context": { "ReferenceDateTime": "2019-01-25T12:00:00" }, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "sunday 31", @@ -9905,7 +10137,7 @@ "Context": { "ReferenceDateTime": "2019-02-25T12:00:00" }, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "friday 31", @@ -9929,6 +10161,35 @@ } ] }, + { + "Input": "Do you have any arrangement on Saturday 30?", + "Context": { + "ReferenceDateTime": "2023-07-05T12:00:00" + }, + "NotSupportedByDesign": "javascript, java", + "Results": [ + { + "Text": "saturday 30", + "Start": 31, + "End": 41, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2022-07-30" + }, + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2023-09-30" + } + ] + } + } + ] + }, { "Input": "Do you have any plan after mid May?", "Context": { @@ -10581,6 +10842,52 @@ "NotSupported": "javascript, java, python", "Results": [] }, + { + "Input": "I'll be back at 00:00", + "Context": { + "ReferenceDateTime": "2023-03-28T00:00:00" + }, + "Results": [ + { + "Text": "00:00", + "Start": 16, + "End": 20, + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + } + } + ] + }, + { + "Input": "I'll be back tomorrow at 00:00.", + "Context": { + "ReferenceDateTime": "2023-03-28T00:00:00" + }, + "Results": [ + { + "Text": "tomorrow at 00:00", + "Start": 13, + "End": 29, + "TypeName": "datetimeV2.datetime", + "Resolution": { + "values": [ + { + "timex": "2023-03-29T00:00", + "type": "datetime", + "value": "2023-03-29 00:00:00" + } + ] + } + } + ] + }, { "Input": "I'll be back at 9:00a.", "Context": { @@ -21705,7 +22012,7 @@ "Context": { "ReferenceDateTime": "2018-01-07T00:00:00" }, - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "april of 1987", @@ -21730,7 +22037,7 @@ "Context": { "ReferenceDateTime": "2018-01-07T00:00:00" }, - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "april of 87", @@ -25519,5 +25826,107 @@ } } ] + }, + { + "Input": "the photograph appeared in the 01/07 issue of the magazine", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 27, + "End": 35, + "Resolution": { + "values": [ + { + "timex": "XXXX-01-07", + "type": "date", + "value": "2023-01-07" + }, + { + "timex": "XXXX-01-07", + "type": "date", + "value": "2024-01-07" + } + ] + }, + "Text": "the 01/07", + "TypeName": "datetimeV2.date" + } + ] + }, + { + "Input": "the contract is expected to start on 10/11", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 37, + "End": 41, + "Resolution": { + "values": [ + { + "timex": "XXXX-10-11", + "type": "date", + "value": "2022-10-11" + }, + { + "timex": "XXXX-10-11", + "type": "date", + "value": "2023-10-11" + } + ] + }, + "Text": "10/11", + "TypeName": "datetimeV2.date" + } + ] + }, + { + "Input": "the software used in the 11/3/2020 election can be easily hacked", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 21, + "End": 33, + "Resolution": { + "values": [ + { + "timex": "2020-11-03", + "type": "date", + "value": "2020-11-03" + } + ] + }, + "Text": "the 11/3/2020", + "TypeName": "datetimeV2.date" + } + ] + }, + { + "Input": "this article was published on 06/10/2020", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 30, + "End": 39, + "Resolution": { + "values": [ + { + "timex": "2020-06-10", + "type": "date", + "value": "2020-06-10" + } + ] + }, + "Text": "06/10/2020", + "TypeName": "datetimeV2.date" + } + ] } ] diff --git a/Specs/DateTime/English/DateTimeParser.json b/Specs/DateTime/English/DateTimeParser.json index 2fdd6bd7d7..9d94781207 100644 --- a/Specs/DateTime/English/DateTimeParser.json +++ b/Specs/DateTime/English/DateTimeParser.json @@ -45,6 +45,52 @@ } ] }, + { + "Input": "I'll go back on 15 at 00:00", + "Context": { + "ReferenceDateTime": "2023-11-07T00:00:00" + }, + "Results": [ + { + "Text": "15 at 00:00", + "Type": "datetime", + "Value": { + "Timex": "XXXX-XX-15T00:00", + "FutureResolution": { + "dateTime": "2023-11-15 00:00:00" + }, + "PastResolution": { + "dateTime": "2023-10-15 00:00:00" + } + }, + "Start": 16, + "Length": 11 + } + ] + }, + { + "Input": "I'll go back on 15 at 00:00:00", + "Context": { + "ReferenceDateTime": "2023-11-07T00:00:00" + }, + "Results": [ + { + "Text": "15 at 00:00:00", + "Type": "datetime", + "Value": { + "Timex": "XXXX-XX-15T00:00:00", + "FutureResolution": { + "dateTime": "2023-11-15 00:00:00" + }, + "PastResolution": { + "dateTime": "2023-10-15 00:00:00" + } + }, + "Start": 16, + "Length": 14 + } + ] + }, { "Input": "I'll go back on 15 at 8:00", "Context": { diff --git a/Specs/DateTime/English/TimeExtractor.json b/Specs/DateTime/English/TimeExtractor.json index a5c6e67e2b..998e4af51b 100644 --- a/Specs/DateTime/English/TimeExtractor.json +++ b/Specs/DateTime/English/TimeExtractor.json @@ -120,6 +120,17 @@ } ] }, + { + "Input": "I'll be back 00:00:00", + "Results": [ + { + "Text": "00:00:00", + "Type": "time", + "Start": 13, + "Length": 8 + } + ] + }, { "Input": "I'll be back 00:00:30", "Results": [ @@ -307,6 +318,50 @@ } ] }, + { + "Input": "I made this purchase at 10 past 9", + "Results": [ + { + "Text": "10 past 9", + "Type": "time", + "Start": 24, + "Length": 9 + } + ] + }, + { + "Input": "It's 15 past seven o'clock", + "Results": [ + { + "Text": "15 past seven o'clock", + "Type": "time", + "Start": 5, + "Length": 21 + } + ] + }, + { + "Input": "I made this purchase at ten past 9 in the evening", + "Results": [ + { + "Text": "ten past 9 in the evening", + "Type": "time", + "Start": 24, + "Length": 25 + } + ] + }, + { + "Input": "It's fifteen past eight in the morning", + "Results": [ + { + "Text": "fifteen past eight in the morning", + "Type": "time", + "Start": 5, + "Length": 33 + } + ] + }, { "Input": "I'll be back in the afternoon at 7", "Results": [ diff --git a/Specs/DateTime/English/TimeParser.json b/Specs/DateTime/English/TimeParser.json index c5afe910b3..c8b42ae6cf 100644 --- a/Specs/DateTime/English/TimeParser.json +++ b/Specs/DateTime/English/TimeParser.json @@ -299,6 +299,26 @@ } ] }, + { + "Input": "I'll be back 00:00", + "Results": [ + { + "Text": "00:00", + "Type": "time", + "Value": { + "Timex": "T00:00", + "FutureResolution": { + "time": "00:00:00" + }, + "PastResolution": { + "time": "00:00:00" + } + }, + "Start": 13, + "Length": 5 + } + ] + }, { "Input": "I'll be back 12:34", "Results": [ @@ -659,6 +679,86 @@ } ] }, + { + "Input": "I made this purchase at 10 past 9", + "Results": [ + { + "Text": "10 past 9", + "Type": "time", + "Value": { + "Timex": "T09:10", + "FutureResolution": { + "time": "09:10:00" + }, + "PastResolution": { + "time": "09:10:00" + } + }, + "Start": 24, + "Length": 9 + } + ] + }, + { + "Input": "It's 15 past seven o'clock", + "Results": [ + { + "Text": "15 past seven o'clock", + "Type": "time", + "Value": { + "Timex": "T07:15", + "FutureResolution": { + "time": "07:15:00" + }, + "PastResolution": { + "time": "07:15:00" + } + }, + "Start": 5, + "Length": 21 + } + ] + }, + { + "Input": "I made this purchase at ten past 9 in the evening", + "Results": [ + { + "Text": "ten past 9 in the evening", + "Type": "time", + "Value": { + "Timex": "T21:10", + "FutureResolution": { + "time": "21:10:00" + }, + "PastResolution": { + "time": "21:10:00" + } + }, + "Start": 24, + "Length": 25 + } + ] + }, + { + "Input": "It's fifteen past eight in the morning", + "Results": [ + { + "Text": "fifteen past eight in the morning", + "Type": "time", + "Value": { + "Timex": "T08:15", + "FutureResolution": { + "time": "08:15:00" + }, + "PastResolution": { + "time": "08:15:00" + } + }, + "Start": 5, + "Length": 33 + } + ] + }, { "Input": "I'll be back in the afternoon at 7", "Results": [ diff --git a/Specs/DateTime/EnglishOthers/DateParser.json b/Specs/DateTime/EnglishOthers/DateParser.json index 87fb54bc8f..2e3dc22382 100644 --- a/Specs/DateTime/EnglishOthers/DateParser.json +++ b/Specs/DateTime/EnglishOthers/DateParser.json @@ -67,5 +67,97 @@ "Length": 6 } ] + }, + { + "Input": "the photograph appeared in the 01/07 issue of the magazine", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "the 01/07", + "Type": "date", + "Value": { + "Timex": "XXXX-07-01", + "FutureResolution": { + "date": "2023-07-01" + }, + "PastResolution": { + "date": "2022-07-01" + } + }, + "Start": 27, + "Length": 9 + } + ] + }, + { + "Input": "the contract is expected to start on 10/11", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "10/11", + "Type": "date", + "Value": { + "Timex": "XXXX-11-10", + "FutureResolution": { + "date": "2023-11-10" + }, + "PastResolution": { + "date": "2022-11-10" + } + }, + "Start": 37, + "Length": 5 + } + ] + }, + { + "Input": "the software used in the 11/3/2020 election can be easily hacked", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "the 11/3/2020", + "Type": "date", + "Value": { + "Timex": "2020-03-11", + "FutureResolution": { + "date": "2020-03-11" + }, + "PastResolution": { + "date": "2020-03-11" + } + }, + "Start": 21, + "Length": 13 + } + ] + }, + { + "Input": "this article was published on 06/10/2020", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Text": "06/10/2020", + "Type": "date", + "Value": { + "Timex": "2020-10-06", + "FutureResolution": { + "date": "2020-10-06" + }, + "PastResolution": { + "date": "2020-10-06" + } + }, + "Start": 30, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/EnglishOthers/DateTimeModel.json b/Specs/DateTime/EnglishOthers/DateTimeModel.json index ddc0ec6008..df8a407f74 100644 --- a/Specs/DateTime/EnglishOthers/DateTimeModel.json +++ b/Specs/DateTime/EnglishOthers/DateTimeModel.json @@ -22,6 +22,29 @@ } ] }, + { + "Input": "I'll go back 5/3/23 @ 00:00:00", + "Context": { + "ReferenceDateTime": "2023-05-01T00:00:00" + }, + "Results": [ + { + "Text": "5/3/23 @ 00:00:00", + "Start": 13, + "End": 29, + "TypeName": "datetimeV2.datetime", + "Resolution": { + "values": [ + { + "timex": "2023-03-05T00:00:00", + "type": "datetime", + "value": "2023-03-05 00:00:00" + } + ] + } + } + ] + }, { "Input": "The date should be 05-Aug-2016", "Context": { @@ -913,6 +936,29 @@ } ] }, + { + "Input": "The target time is 00:00", + "Context": { + "ReferenceDateTime": "2023-12-26T00:00:00" + }, + "Results": [ + { + "Text": "00:00", + "Start": 19, + "End": 23, + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + } + } + ] + }, { "Input": "I'll go back Sep-23-2020.", "Context": { @@ -1056,5 +1102,107 @@ } } ] + }, + { + "Input": "the photograph appeared in the 01/07 issue of the magazine", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 27, + "End": 35, + "Resolution": { + "values": [ + { + "timex": "XXXX-07-01", + "type": "date", + "value": "2022-07-01" + }, + { + "timex": "XXXX-07-01", + "type": "date", + "value": "2023-07-01" + } + ] + }, + "Text": "the 01/07", + "TypeName": "datetimeV2.date" + } + ] + }, + { + "Input": "the contract is expected to start on 10/11", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 37, + "End": 41, + "Resolution": { + "values": [ + { + "timex": "XXXX-11-10", + "type": "date", + "value": "2022-11-10" + }, + { + "timex": "XXXX-11-10", + "type": "date", + "value": "2023-11-10" + } + ] + }, + "Text": "10/11", + "TypeName": "datetimeV2.date" + } + ] + }, + { + "Input": "the software used in the 11/3/2020 election can be easily hacked", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 21, + "End": 33, + "Resolution": { + "values": [ + { + "timex": "2020-03-11", + "type": "date", + "value": "2020-03-11" + } + ] + }, + "Text": "the 11/3/2020", + "TypeName": "datetimeV2.date" + } + ] + }, + { + "Input": "this article was published on 06/10/2020", + "Context": { + "ReferenceDateTime": "2023-05-05T00:00:00" + }, + "Results": [ + { + "Start": 30, + "End": 39, + "Resolution": { + "values": [ + { + "timex": "2020-10-06", + "type": "date", + "value": "2020-10-06" + } + ] + }, + "Text": "06/10/2020", + "TypeName": "datetimeV2.date" + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/French/DatePeriodExtractor.json b/Specs/DateTime/French/DatePeriodExtractor.json index 30600f3b44..fc478bad22 100644 --- a/Specs/DateTime/French/DatePeriodExtractor.json +++ b/Specs/DateTime/French/DatePeriodExtractor.json @@ -5950,5 +5950,29 @@ "Length": 31 } ] + }, + { + "Input": "Montrez-moi les records d'août 99", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "août 99", + "Type": "daterange", + "Start": 26, + "Length": 7 + } + ] + }, + { + "Input": "Montrez-moi les records d'août '99", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "août '99", + "Type": "daterange", + "Start": 26, + "Length": 8 + } + ] } ] diff --git a/Specs/DateTime/French/DatePeriodParser.json b/Specs/DateTime/French/DatePeriodParser.json index b304394156..0f4ca3e2ea 100644 --- a/Specs/DateTime/French/DatePeriodParser.json +++ b/Specs/DateTime/French/DatePeriodParser.json @@ -7140,5 +7140,51 @@ "Length": 14 } ] + }, + { + "Input": "Montrez-moi les records d'août 99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "août 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 26, + "Length": 7 + } + ] + }, + { + "Input": "Montrez-moi les records d'août '99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "août '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 26, + "Length": 8 + } + ] } ] diff --git a/Specs/DateTime/French/DateTimeModel.json b/Specs/DateTime/French/DateTimeModel.json index 4e608dcb21..c8cdb9076a 100644 --- a/Specs/DateTime/French/DateTimeModel.json +++ b/Specs/DateTime/French/DateTimeModel.json @@ -1302,6 +1302,29 @@ } ] }, + { + "Input": "Je retournerai 00:00", + "Context": { + "ReferenceDateTime": "2023-11-07T00:00:00" + }, + "Results": [ + { + "Text": "00:00", + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + }, + "Start": 15, + "End": 19 + } + ] + }, { "Input": "Je retournerai 19:56:30", "Context": { diff --git a/Specs/DateTime/French/TimeExtractor.json b/Specs/DateTime/French/TimeExtractor.json index c3222a2b15..c689cd1576 100644 --- a/Specs/DateTime/French/TimeExtractor.json +++ b/Specs/DateTime/French/TimeExtractor.json @@ -1251,7 +1251,7 @@ }, { "Input": "Je reviens à midi", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "midi", diff --git a/Specs/DateTime/French/TimeParser.json b/Specs/DateTime/French/TimeParser.json index c3129ed442..3fbb2102ba 100644 --- a/Specs/DateTime/French/TimeParser.json +++ b/Specs/DateTime/French/TimeParser.json @@ -3458,7 +3458,7 @@ }, { "Input": "Je vais revenir à midi", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "midi", @@ -3542,7 +3542,7 @@ }, { "Input": "Je reviendrai à midi", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "midi", @@ -3794,7 +3794,7 @@ }, { "Input": "Je reviens à midi", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "midi", diff --git a/Specs/DateTime/German/DateExtractor.json b/Specs/DateTime/German/DateExtractor.json index 3ca097d27a..edb4e4749a 100644 --- a/Specs/DateTime/German/DateExtractor.json +++ b/Specs/DateTime/German/DateExtractor.json @@ -350,5 +350,27 @@ "Length": 26 } ] + }, + { + "Input": "Mein Geburtsdatum ist der 22.04.1990", + "Results": [ + { + "Text": "der 22.04.1990", + "Type": "date", + "Start": 22, + "Length": 14 + } + ] + }, + { + "Input": "Um wie viel Uhr werde ich am Dienstag, den 15.6. den Doktor sehen?", + "Results": [ + { + "Text": "dienstag, den 15.6", + "Type": "date", + "Start": 29, + "Length": 18 + } + ] } ] diff --git a/Specs/DateTime/German/DatePeriodExtractor.json b/Specs/DateTime/German/DatePeriodExtractor.json index d2a0efd14a..73ede453f1 100644 --- a/Specs/DateTime/German/DatePeriodExtractor.json +++ b/Specs/DateTime/German/DatePeriodExtractor.json @@ -754,5 +754,41 @@ "Length": 10 } ] + }, + { + "Input": "Zeigen Sie mir die Aufzeichnungen vom August 99", + "NotSupportedByDesign": "javascript", + "Results": [ + { + "Text": "August 99", + "Type": "daterange", + "Start": 38, + "Length": 9 + } + ] + }, + { + "Input": "Zeigen Sie mir die Aufzeichnungen vom August '99", + "NotSupportedByDesign": "javascript", + "Results": [ + { + "Text": "August '99", + "Type": "daterange", + "Start": 38, + "Length": 10 + } + ] + }, + { + "Input": "Ich komme am 32.04.2023 wieder.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "04.2023", + "Type": "daterange", + "Start": 16, + "Length": 7 + } + ] } -] \ No newline at end of file +] diff --git a/Specs/DateTime/German/DatePeriodParser.json b/Specs/DateTime/German/DatePeriodParser.json index 7bae9c3d8b..ca93b44de9 100644 --- a/Specs/DateTime/German/DatePeriodParser.json +++ b/Specs/DateTime/German/DatePeriodParser.json @@ -1310,5 +1310,51 @@ "Length": 9 } ] + }, + { + "Input": "Zeigen Sie mir die Aufzeichnungen vom August 99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "August 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 38, + "Length": 9 + } + ] + }, + { + "Input": "Zeigen Sie mir die Aufzeichnungen vom August '99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "August '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 38, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/German/DateTimeModel.json b/Specs/DateTime/German/DateTimeModel.json index 0e914eaff7..62403f628c 100644 --- a/Specs/DateTime/German/DateTimeModel.json +++ b/Specs/DateTime/German/DateTimeModel.json @@ -286,7 +286,6 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupported": "python", "Results": [ { "Text": "vom 12. januar 2016 bis zum 22.01.2016", @@ -1270,6 +1269,29 @@ "NotSupported": "javascript", "Results": [] }, + { + "Input": "Lass uns um 00:00 einen Kaffee trinken gehen", + "Context": { + "ReferenceDateTime": "2023-08-05T00:00:00" + }, + "Results": [ + { + "Text": "00:00", + "Start": 12, + "End": 16, + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + } + } + ] + }, { "Input": "Lass uns um 18:12 einen Kaffee trinken gehen", "Context": { @@ -3924,7 +3946,7 @@ "Context": { "ReferenceDateTime": "2018-11-07T00:00:00" }, - "NotSupported": "java, javascript, python", + "NotSupported": "java, javascript", "Results": [ { "Text": "so 27.02.2022", @@ -5618,5 +5640,80 @@ } } ] + }, + { + "Input": "Ich komme am 32.04.2023 wieder.", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "04.2023", + "Start": 16, + "End": 22, + "TypeName": "datetimeV2.daterange", + "Resolution": { + "values": [ + { + "timex": "2023-04", + "type": "daterange", + "start": "2023-04-01", + "end": "2023-05-01" + } + ] + } + } + ] + }, + { + "Input": "Mein Geburtsdatum ist der 22.04.1990", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "der 22.04.1990", + "Start": 22, + "End": 35, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "1990-04-22", + "type": "date", + "value": "1990-04-22" + } + ] + } + } + ] + }, + { + "Input": "Um wie viel Uhr werde ich am Dienstag, den 15.6. den Doktor sehen?", + "Context": { + "ReferenceDateTime": "2023-08-02T00:00:00" + }, + "Results": [ + { + "Text": "dienstag, den 15.6", + "Start": 29, + "End": 46, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-06-15", + "type": "date", + "value": "2023-06-15" + }, + { + "timex": "XXXX-06-15", + "type": "date", + "value": "2024-06-15" + } + ] + } + } + ] } -] \ No newline at end of file +] diff --git a/Specs/DateTime/German/TimeExtractor.json b/Specs/DateTime/German/TimeExtractor.json index dd02fd917a..afda6b74f5 100644 --- a/Specs/DateTime/German/TimeExtractor.json +++ b/Specs/DateTime/German/TimeExtractor.json @@ -179,6 +179,126 @@ } ] }, + { + "Input": "Es ist 10 nach 3", + "NotSupported": "javascript", + "Results": [ + { + "Text": "10 nach 3", + "Type": "time", + "Start": 7, + "Length": 9 + } + ] + }, + { + "Input": "Es ist 10 nach drei", + "NotSupported": "javascript", + "Results": [ + { + "Text": "10 nach drei", + "Type": "time", + "Start": 7, + "Length": 12 + } + ] + }, + { + "Input": "Es ist zehn nach 3", + "NotSupported": "javascript", + "Results": [ + { + "Text": "zehn nach 3", + "Type": "time", + "Start": 7, + "Length": 11 + } + ] + }, + { + "Input": "Es ist zehn nach drei", + "NotSupported": "javascript", + "Results": [ + { + "Text": "zehn nach drei", + "Type": "time", + "Start": 7, + "Length": 14 + } + ] + }, + { + "Input": "Es ist 5 vor 3", + "NotSupported": "javascript", + "Results": [ + { + "Text": "5 vor 3", + "Type": "time", + "Start": 7, + "Length": 7 + } + ] + }, + { + "Input": "Es ist 5 minuten vor 4", + "NotSupported": "javascript", + "Results": [ + { + "Text": "5 minuten vor 4", + "Type": "time", + "Start": 7, + "Length": 15 + } + ] + }, + { + "Input": "Es ist 5 min vor vier", + "NotSupported": "javascript", + "Results": [ + { + "Text": "5 min vor vier", + "Type": "time", + "Start": 7, + "Length": 14 + } + ] + }, + { + "Input": "Es ist fünf minuten vor 8", + "NotSupported": "javascript", + "Results": [ + { + "Text": "fünf minuten vor 8", + "Type": "time", + "Start": 7, + "Length": 18 + } + ] + }, + { + "Input": "Es ist fünf vor vier", + "NotSupported": "javascript", + "Results": [ + { + "Text": "fünf vor vier", + "Type": "time", + "Start": 7, + "Length": 13 + } + ] + }, + { + "Input": "Es ist fünf minuten vor vier", + "NotSupported": "javascript", + "Results": [ + { + "Text": "fünf minuten vor vier", + "Type": "time", + "Start": 7, + "Length": 21 + } + ] + }, { "Input": "Es ist viertel nach acht", "NotSupported": "javascript", @@ -239,4 +359,4 @@ } ] } -] \ No newline at end of file +] diff --git a/Specs/DateTime/German/TimeParser.json b/Specs/DateTime/German/TimeParser.json index 9785cda5b4..d1d37bfa86 100644 --- a/Specs/DateTime/German/TimeParser.json +++ b/Specs/DateTime/German/TimeParser.json @@ -104,6 +104,90 @@ } ] }, + { + "Input": "Das dürfte gegen 10 nach 3 Vormittags sein.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "10 nach 3 Vormittags", + "Type": "time", + "Value": { + "Timex": "T03:10", + "FutureResolution": { + "time": "03:10:00" + }, + "PastResolution": { + "time": "03:10:00" + } + }, + "Start": 17, + "Length": 20 + } + ] + }, + { + "Input": "Das dürfte gegen 10 nach drei Nachmittag sein.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "10 nach drei Nachmittag", + "Type": "time", + "Value": { + "Timex": "T15:10", + "FutureResolution": { + "time": "15:10:00" + }, + "PastResolution": { + "time": "15:10:00" + } + }, + "Start": 17, + "Length": 23 + } + ] + }, + { + "Input": "Das dürfte gegen zehn nach 3 Vormittags sein.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "zehn nach 3 Vormittags", + "Type": "time", + "Value": { + "Timex": "T03:10", + "FutureResolution": { + "time": "03:10:00" + }, + "PastResolution": { + "time": "03:10:00" + } + }, + "Start": 17, + "Length": 22 + } + ] + }, + { + "Input": "Das dürfte gegen zehn nach drei Nachmittag sein.", + "NotSupported": "javascript", + "Results": [ + { + "Text": "zehn nach drei Nachmittag", + "Type": "time", + "Value": { + "Timex": "T15:10", + "FutureResolution": { + "time": "15:10:00" + }, + "PastResolution": { + "time": "15:10:00" + } + }, + "Start": 17, + "Length": 25 + } + ] + }, { "Input": "Das dürfte gegen viertel nach 7 Vormittags sein.", "NotSupported": "javascript", @@ -125,6 +209,132 @@ } ] }, + { + "Input": "Es ist 5 vor 3 Vormittags", + "NotSupported": "javascript", + "Results": [ + { + "Text": "5 vor 3 vormittags", + "Type": "time", + "Value": { + "Timex": "T02:55", + "FutureResolution": { + "time": "02:55:00" + }, + "PastResolution": { + "time": "02:55:00" + } + }, + "Start": 7, + "Length": 18 + } + ] + }, + { + "Input": "Es ist 5 minuten vor 4 Nachmittag", + "NotSupported": "javascript", + "Results": [ + { + "Text": "5 minuten vor 4 nachmittag", + "Type": "time", + "Value": { + "Timex": "T15:55", + "FutureResolution": { + "time": "15:55:00" + }, + "PastResolution": { + "time": "15:55:00" + } + }, + "Start": 7, + "Length": 26 + } + ] + }, + { + "Input": "Es ist 5 min vor vier vormittags", + "NotSupported": "javascript", + "Results": [ + { + "Text": "5 min vor vier vormittags", + "Type": "time", + "Value": { + "Timex": "T03:55", + "FutureResolution": { + "time": "03:55:00" + }, + "PastResolution": { + "time": "03:55:00" + } + }, + "Start": 7, + "Length": 25 + } + ] + }, + { + "Input": "Es ist fünf minuten vor 8 Nachmittag", + "NotSupported": "javascript", + "Results": [ + { + "Text": "fünf minuten vor 8 nachmittag", + "Type": "time", + "Value": { + "Timex": "T19:55", + "FutureResolution": { + "time": "19:55:00" + }, + "PastResolution": { + "time": "19:55:00" + } + }, + "Start": 7, + "Length": 29 + } + ] + }, + { + "Input": "Es ist fünf vor zehn Vormittags", + "NotSupported": "javascript", + "Results": [ + { + "Text": "fünf vor zehn vormittags", + "Type": "time", + "Value": { + "Timex": "T09:55", + "FutureResolution": { + "time": "09:55:00" + }, + "PastResolution": { + "time": "09:55:00" + } + }, + "Start": 7, + "Length": 24 + } + ] + }, + { + "Input": "Es ist fünf minuten vor vier nachmittag", + "NotSupported": "javascript", + "Results": [ + { + "Text": "fünf minuten vor vier nachmittag", + "Type": "time", + "Value": { + "Timex": "T15:55", + "FutureResolution": { + "time": "15:55:00" + }, + "PastResolution": { + "time": "15:55:00" + } + }, + "Start": 7, + "Length": 32 + } + ] + }, { "Input": "Ich habe den Alarm auf 8:40 eingestellt", "NotSupported": "javascript", @@ -543,4 +753,4 @@ } ] } -] \ No newline at end of file +] diff --git a/Specs/DateTime/Hindi/DateTimeModel.json b/Specs/DateTime/Hindi/DateTimeModel.json index 913e724cdd..88a3b82dc7 100644 --- a/Specs/DateTime/Hindi/DateTimeModel.json +++ b/Specs/DateTime/Hindi/DateTimeModel.json @@ -9675,7 +9675,7 @@ "ReferenceDateTime": "2019-01-25T12:00:00" }, "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21 सोमवार", @@ -9704,7 +9704,7 @@ "Context": { "ReferenceDateTime": "2019-01-21T12:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21 सोमवार", @@ -9729,7 +9729,7 @@ "ReferenceDateTime": "2019-01-25T12:00:00" }, "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "रविवार 31", @@ -9759,7 +9759,7 @@ "ReferenceDateTime": "2019-02-25T12:00:00" }, "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "31 शुक्रवार", @@ -9783,6 +9783,35 @@ } ] }, + { + "Input": "क्या शनिवार 30 तारीख को कोई व्यवस्था है!", + "Context": { + "ReferenceDateTime": "2023-07-05T12:00:00" + }, + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "शनिवार 30", + "Start": 5, + "End": 14, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2022-07-30" + }, + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2023-09-30" + } + ] + } + } + ] + }, { "Input": "क्या मई के मध्य के बाद आपके कोई इंतजाम है?", "Context": { diff --git a/Specs/DateTime/Italian/DatePeriodExtractor.json b/Specs/DateTime/Italian/DatePeriodExtractor.json index 5a1503d43d..d846c8d07e 100644 --- a/Specs/DateTime/Italian/DatePeriodExtractor.json +++ b/Specs/DateTime/Italian/DatePeriodExtractor.json @@ -2869,5 +2869,29 @@ "Length": 34 } ] + }, + { + "Input": "Fammi vedere i record dell'agosto 99.", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "agosto 99", + "Type": "daterange", + "Start": 27, + "Length": 9 + } + ] + }, + { + "Input": "Fammi vedere i record dell'agosto '99.", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "agosto '99", + "Type": "daterange", + "Start": 27, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Italian/DatePeriodParser.json b/Specs/DateTime/Italian/DatePeriodParser.json index b4343c8c2f..925185e1e2 100644 --- a/Specs/DateTime/Italian/DatePeriodParser.json +++ b/Specs/DateTime/Italian/DatePeriodParser.json @@ -3443,5 +3443,51 @@ "Length": 11 } ] + }, + { + "Input": "Fammi vedere i record dell'agosto 99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "agosto 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 27, + "Length": 9 + } + ] + }, + { + "Input": "Fammi vedere i record dell'agosto '99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "agosto '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 27, + "Length": 10 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Italian/DateTimeModel.json b/Specs/DateTime/Italian/DateTimeModel.json index ce398f9429..b08b77e534 100644 --- a/Specs/DateTime/Italian/DateTimeModel.json +++ b/Specs/DateTime/Italian/DateTimeModel.json @@ -1442,6 +1442,30 @@ } ] }, + { + "Input": "Tornerò alle 00:00", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "00:00", + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + }, + "Start": 13, + "End": 17 + } + ] + }, { "Input": "Tornerò alle 7:56:30 pm", "Context": { diff --git a/Specs/DateTime/Italian/TimeExtractor.json b/Specs/DateTime/Italian/TimeExtractor.json index 95d8075b88..8c4fd4fbde 100644 --- a/Specs/DateTime/Italian/TimeExtractor.json +++ b/Specs/DateTime/Italian/TimeExtractor.json @@ -263,6 +263,54 @@ } ] }, + { + "Input": "Mancano 5 minuti alle 4", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "5 minuti alle 4", + "Type": "time", + "Start": 8, + "Length": 15 + } + ] + }, + { + "Input": "Mancano 10 minuti alle quattro", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "10 minuti alle quattro", + "Type": "time", + "Start": 8, + "Length": 22 + } + ] + }, + { + "Input": "Mancano cinque minuti alle 14", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "cinque minuti alle 14", + "Type": "time", + "Start": 8, + "Length": 21 + } + ] + }, + { + "Input": "Mancano dieci minuti alle otto", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "dieci minuti alle otto", + "Type": "time", + "Start": 8, + "Length": 22 + } + ] + }, { "Input": "Sono le sette e mezza", "NotSupportedByDesign": "javascript", diff --git a/Specs/DateTime/Italian/TimeParser.json b/Specs/DateTime/Italian/TimeParser.json index ad67f51a90..ec7177dfef 100644 --- a/Specs/DateTime/Italian/TimeParser.json +++ b/Specs/DateTime/Italian/TimeParser.json @@ -566,6 +566,90 @@ } ] }, + { + "Input": "Mancano 5 minuti alle 4", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "5 minuti alle 4", + "Type": "time", + "Value": { + "Timex": "T03:55", + "FutureResolution": { + "time": "03:55:00" + }, + "PastResolution": { + "time": "03:55:00" + } + }, + "Start": 8, + "Length": 15 + } + ] + }, + { + "Input": "Mancano 10 minuti alle quattro", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "10 minuti alle quattro", + "Type": "time", + "Value": { + "Timex": "T03:50", + "FutureResolution": { + "time": "03:50:00" + }, + "PastResolution": { + "time": "03:50:00" + } + }, + "Start": 8, + "Length": 22 + } + ] + }, + { + "Input": "Mancano cinque minuti alle 14", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "cinque minuti alle 14", + "Type": "time", + "Value": { + "Timex": "T13:55", + "FutureResolution": { + "time": "13:55:00" + }, + "PastResolution": { + "time": "13:55:00" + } + }, + "Start": 8, + "Length": 21 + } + ] + }, + { + "Input": "Mancano dieci minuti alle otto", + "NotSupportedByDesign": "java,javascript", + "Results": [ + { + "Text": "dieci minuti alle otto", + "Type": "time", + "Value": { + "Timex": "T07:50", + "FutureResolution": { + "time": "07:50:00" + }, + "PastResolution": { + "time": "07:50:00" + } + }, + "Start": 8, + "Length": 22 + } + ] + }, { "Input": "Sono le sette e mezza", "NotSupportedByDesign": "javascript", diff --git a/Specs/DateTime/Japanese/DateExtractor.json b/Specs/DateTime/Japanese/DateExtractor.json index eac4232bd1..47a53cb3fe 100644 --- a/Specs/DateTime/Japanese/DateExtractor.json +++ b/Specs/DateTime/Japanese/DateExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "1月1日 に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月1日", @@ -13,7 +13,7 @@ }, { "Input": "10月2日 に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月2日", @@ -25,7 +25,7 @@ }, { "Input": "2016年1月12日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年1月12日", @@ -37,7 +37,7 @@ }, { "Input": "2016年1月12日月曜日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年1月12日月曜日", @@ -49,7 +49,7 @@ }, { "Input": "2016年2月22日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年2月22日", @@ -61,7 +61,7 @@ }, { "Input": "2016年4月21日戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年4月21日", @@ -73,7 +73,7 @@ }, { "Input": "2015年9月18日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年9月18日", @@ -85,7 +85,7 @@ }, { "Input": "4月22日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4月22日", @@ -97,7 +97,7 @@ }, { "Input": "2015年8月12日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年8月12日", @@ -109,7 +109,7 @@ }, { "Input": "2016年11月12日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月12日", @@ -121,7 +121,7 @@ }, { "Input": "1月1日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月1日", @@ -133,7 +133,7 @@ }, { "Input": "11月28日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11月28日", @@ -145,7 +145,7 @@ }, { "Input": "7月の第1金曜日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月の第1金曜日", @@ -157,7 +157,7 @@ }, { "Input": "今から2週間後に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今から2週間後", @@ -169,7 +169,7 @@ }, { "Input": "火曜日に戻ります。いい知らせです。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "火曜日", @@ -181,7 +181,7 @@ }, { "Input": "今週の金曜日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日", @@ -193,7 +193,7 @@ }, { "Input": "来週の日曜日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の日曜日", @@ -205,7 +205,7 @@ }, { "Input": "私は最後の日に戻ります", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "最後の日", @@ -217,7 +217,7 @@ }, { "Input": "私はその日に戻ります", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その日", @@ -229,7 +229,7 @@ }, { "Input": "2016年6月15日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年6月15日", @@ -241,7 +241,7 @@ }, { "Input": "5月11日に野球", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5月11日", @@ -253,7 +253,7 @@ }, { "Input": "5月4日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5月4日", @@ -265,7 +265,7 @@ }, { "Input": "3月4日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3月4日", @@ -277,7 +277,7 @@ }, { "Input": "5月21日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5月21日", @@ -289,7 +289,7 @@ }, { "Input": "8月2日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8月2日", @@ -301,7 +301,7 @@ }, { "Input": "6月22日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "6月22日", @@ -349,7 +349,7 @@ }, { "Input": "27日に戻りました", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "27日", @@ -361,7 +361,7 @@ }, { "Input": "27日に戻りました。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "27日", @@ -373,7 +373,7 @@ }, { "Input": "27日に戻りました!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "27日", @@ -385,7 +385,7 @@ }, { "Input": "21日に戻りました", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21日", @@ -397,7 +397,7 @@ }, { "Input": "22日に戻りました", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22日", @@ -409,7 +409,7 @@ }, { "Input": "2日に戻りました", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日", @@ -421,7 +421,7 @@ }, { "Input": "2日に戻りました!", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日", @@ -433,7 +433,7 @@ }, { "Input": "22日に戻りました?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22日", @@ -445,12 +445,12 @@ }, { "Input": "一等賞", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "第17回ドアホーンテッドエクスペリエンスのチケットを入手する", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { @@ -458,7 +458,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日の土曜日", @@ -473,7 +473,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "27日水曜日", @@ -488,7 +488,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21日木曜日", @@ -503,7 +503,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22日金曜日", @@ -518,7 +518,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23日土曜日", @@ -533,7 +533,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日金曜日", @@ -548,7 +548,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7日木曜日", @@ -560,7 +560,7 @@ }, { "Input": "来月の20日に戻ります", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来月の20日", @@ -572,7 +572,7 @@ }, { "Input": "今月の31日に戻ります", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月の31日", @@ -584,7 +584,7 @@ }, { "Input": "コルタナが今週の金曜日か来週の火曜日にスカイプ通話を手配してくれます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日", @@ -602,7 +602,7 @@ }, { "Input": "コルタナが今週の金曜日か今週の土曜日にスカイプ通話を手配してくれます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日", @@ -620,7 +620,7 @@ }, { "Input": "2016年11月16日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月16日", @@ -680,7 +680,7 @@ }, { "Input": "私は1391年12月5日にここを離れました", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1391年12月5日", @@ -692,7 +692,7 @@ }, { "Input": "2018年1月22日月曜日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年1月22日月曜日", @@ -704,7 +704,7 @@ }, { "Input": "2018年1月21日日曜日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年1月21日日曜日", @@ -716,7 +716,7 @@ }, { "Input": "1978年9月21日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1978年9月21日", @@ -728,7 +728,7 @@ }, { "Input": "1901年9月10日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1901年9月10日", @@ -740,7 +740,7 @@ }, { "Input": "2000年9月10日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2000年9月10日", @@ -752,7 +752,7 @@ }, { "Input": "2015年5月13日はお暇ですか?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年5月13日", @@ -764,7 +764,7 @@ }, { "Input": "2015年5月13日はご都合いかがでしょうか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年5月13日", @@ -776,7 +776,7 @@ }, { "Input": "今から2週先の日曜日のご都合はいかがでしょうか?", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今から2週先の日曜日", @@ -800,7 +800,7 @@ }, { "Input": "今日から2日後のご都合はいかがでしょうか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2日後", @@ -812,7 +812,7 @@ }, { "Input": "明日から3週間のご都合はいかがでしょうか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日から3週間", @@ -824,7 +824,7 @@ }, { "Input": "あなたは昨日の2日前どこにいましたか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昨日の2日前", @@ -839,7 +839,7 @@ "Context": { "ReferenceDateTime": "2018-06-14T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日6月15日", @@ -869,7 +869,7 @@ "Context": { "ReferenceDateTime": "2018-06-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日6月22日", @@ -884,7 +884,7 @@ "Context": { "ReferenceDateTime": "2018-06-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日6月23日", @@ -914,7 +914,7 @@ "Context": { "ReferenceDateTime": "2018-07-06T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月6日金曜日", @@ -929,7 +929,7 @@ "Context": { "ReferenceDateTime": "2018-07-06T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年7月6日金曜日", @@ -953,7 +953,7 @@ }, { "Input": "コルタナ、10月1日に何か設定してくれませんか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月1日", @@ -966,12 +966,12 @@ { "Input": "その6.25%転換...の額面金額", "Comment": "1/4 shouldn't recognized as date here", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "15 日に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "15 日", @@ -983,7 +983,7 @@ }, { "Input": "1/1 に帰ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1/1", @@ -995,7 +995,7 @@ }, { "Input": "誕生日は10/03です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "10/03", @@ -1007,7 +1007,7 @@ }, { "Input": "それは 2016 年 1 月 12 日に発売されました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016 年 1 月 12 日", @@ -1019,7 +1019,7 @@ }, { "Input": "それは2016年1月12日に発売されました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016年1月12日", @@ -1031,7 +1031,7 @@ }, { "Input": "それが発売されたのは2016年1月12日 月曜日です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016年1月12日 月曜日", @@ -1043,7 +1043,7 @@ }, { "Input": "02/22/2016", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "02/22/2016", @@ -1055,7 +1055,7 @@ }, { "Input": "21/04/2016に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21/04/2016", @@ -1067,7 +1067,7 @@ }, { "Input": "21/04/16に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21/04/16", @@ -1079,7 +1079,7 @@ }, { "Input": "9-18-15に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "9-18-15", @@ -1091,7 +1091,7 @@ }, { "Input": "4.22 に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4.22", @@ -1103,7 +1103,7 @@ }, { "Input": "4-22 に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4-22", @@ -1115,7 +1115,7 @@ }, { "Input": "4.22に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4.22", @@ -1127,7 +1127,7 @@ }, { "Input": "22/04 に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "22/04", @@ -1139,7 +1139,7 @@ }, { "Input": "2015/08/12 に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2015/08/12", @@ -1151,7 +1151,7 @@ }, { "Input": "11/12,2016に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "11/12,2016", @@ -1163,7 +1163,7 @@ }, { "Input": "一月二十二日 水曜日に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一月二十二日 水曜日", @@ -1175,7 +1175,7 @@ }, { "Input": "5月の第2日曜日は母の日です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5月の第2日曜日", @@ -1187,7 +1187,7 @@ }, { "Input": "今月の第一金曜日は定休日です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今月の第一金曜日", @@ -1199,7 +1199,7 @@ }, { "Input": "来週金曜日に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, python,java", "Results": [ { "Text": "来週金曜日", @@ -1223,7 +1223,7 @@ }, { "Input": "火曜日に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "火曜日", @@ -1235,7 +1235,7 @@ }, { "Input": "火曜に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "火曜", @@ -1247,7 +1247,7 @@ }, { "Input": "帰るのは今週の木曜日です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今週の木曜日", @@ -1259,7 +1259,7 @@ }, { "Input": "先週の月曜日に帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "先週の月曜日", @@ -1271,7 +1271,7 @@ }, { "Input": "金曜日に帰ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "金曜日", @@ -1283,7 +1283,7 @@ }, { "Input": "今日帰ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日", @@ -1295,7 +1295,7 @@ }, { "Input": "明日帰ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明日", @@ -1307,7 +1307,7 @@ }, { "Input": "昨日帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "昨日", @@ -1319,7 +1319,7 @@ }, { "Input": "きのう帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "きのう", @@ -1331,7 +1331,7 @@ }, { "Input": "明日帰る予定です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明日", @@ -1343,7 +1343,7 @@ }, { "Input": "あした帰る予定です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "あした", @@ -1355,7 +1355,7 @@ }, { "Input": "あす帰る予定です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "あす", @@ -1367,7 +1367,7 @@ }, { "Input": "明後日帰る予定です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明後日", @@ -1379,7 +1379,7 @@ }, { "Input": "あさって帰る予定です。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "あさって", @@ -1391,7 +1391,7 @@ }, { "Input": "一昨日帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一昨日", @@ -1403,7 +1403,7 @@ }, { "Input": "おととい帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "おととい", @@ -1415,7 +1415,7 @@ }, { "Input": "2か月前に帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "2か月前", @@ -1427,7 +1427,7 @@ }, { "Input": "二か月前に帰ってきました。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "二か月前", @@ -1451,12 +1451,12 @@ }, { "Input": "27階に行きます。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "シンガポールと中国の外交関係25周年記念行事", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { @@ -1464,7 +1464,7 @@ "Context": { "ReferenceDateTime": "2017-09-01T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "27日水曜日", @@ -1476,7 +1476,7 @@ }, { "Input": "来月20日に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "来月20日", @@ -1488,7 +1488,7 @@ }, { "Input": "今月31日に戻ります。", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今月31日", @@ -1500,7 +1500,7 @@ }, { "Input": "13.5.2015 は空いていますか?", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "13.5.2015", @@ -1512,7 +1512,7 @@ }, { "Input": "2015.5.13 は空いていますか?", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2015.5.13", @@ -1524,8 +1524,8 @@ }, { "Input": "今日から2日間空いてますか?", - "NotSupported": "javascript, python", - "NotSupportedByDesign": "javascript, python, java", + "NotSupported": "javascript", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日から2日間", @@ -1537,8 +1537,8 @@ }, { "Input": "明日から3週間空いてますか?", - "NotSupported": "javascript, python", - "NotSupportedByDesign": "javascript, python, java", + "NotSupported": "javascript", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明日から3週間", @@ -1554,7 +1554,7 @@ "ReferenceDateTime": "2018-06-20T00:00:00" }, "NotSupported": "python,java,javascript", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3 週間後", @@ -1569,7 +1569,7 @@ "Context": { "ReferenceDateTime": "2018-07-06T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "7.6 金曜日", @@ -1584,7 +1584,7 @@ "Context": { "ReferenceDateTime": "2018-07-06T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "7/6 金曜日", @@ -1599,7 +1599,7 @@ "Context": { "ReferenceDateTime": "2018-07-06T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "7-6 金曜日", @@ -1614,7 +1614,7 @@ "Context": { "ReferenceDateTime": "2018-07-06T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2018-7-6 金曜日", @@ -1626,7 +1626,7 @@ }, { "Input": "月曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "月曜日", @@ -1638,7 +1638,7 @@ }, { "Input": "火曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "火曜日", @@ -1650,7 +1650,7 @@ }, { "Input": "水曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "水曜日", @@ -1662,7 +1662,7 @@ }, { "Input": "木曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "木曜日", @@ -1674,7 +1674,7 @@ }, { "Input": "金曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "金曜日", @@ -1686,7 +1686,7 @@ }, { "Input": "土曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "土曜日", @@ -1698,7 +1698,7 @@ }, { "Input": "日曜日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "日曜日", @@ -1710,7 +1710,7 @@ }, { "Input": "月曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "月曜", @@ -1722,7 +1722,7 @@ }, { "Input": "火曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "火曜", @@ -1734,7 +1734,7 @@ }, { "Input": "水曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "水曜", @@ -1746,7 +1746,7 @@ }, { "Input": "木曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "木曜", @@ -1758,7 +1758,7 @@ }, { "Input": "金曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "金曜", @@ -1770,7 +1770,7 @@ }, { "Input": "土曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "土曜", @@ -1782,7 +1782,7 @@ }, { "Input": "日曜", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "日曜", @@ -1938,7 +1938,7 @@ }, { "Input": "今日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日", @@ -1950,7 +1950,7 @@ }, { "Input": "きょう", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "きょう", @@ -1962,7 +1962,7 @@ }, { "Input": "明日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明日", @@ -1974,7 +1974,7 @@ }, { "Input": "あす", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "あす", @@ -1986,7 +1986,7 @@ }, { "Input": "あした", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "あした", @@ -1998,7 +1998,7 @@ }, { "Input": "明後日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明後日", @@ -2010,7 +2010,7 @@ }, { "Input": "あさって", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "あさって", @@ -2022,7 +2022,7 @@ }, { "Input": "明々後日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明々後日", @@ -2034,7 +2034,7 @@ }, { "Input": "しあさって", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "しあさって", @@ -2046,7 +2046,7 @@ }, { "Input": "昨日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "昨日", @@ -2058,7 +2058,7 @@ }, { "Input": "きのう", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "きのう", @@ -2070,7 +2070,7 @@ }, { "Input": "さくじつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "さくじつ", @@ -2082,7 +2082,7 @@ }, { "Input": "一昨日", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一昨日", @@ -2094,7 +2094,7 @@ }, { "Input": "おととい", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "おととい", @@ -2106,7 +2106,7 @@ }, { "Input": "おとつい", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "おとつい", @@ -2118,7 +2118,7 @@ }, { "Input": "いっさくじつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "いっさくじつ", @@ -2142,7 +2142,7 @@ }, { "Input": "すみません、6月15日出発の航空便を予約しました。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "6月15日", @@ -2154,7 +2154,7 @@ }, { "Input": "旧暦の正月初一", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧暦の正月初一", @@ -2166,7 +2166,7 @@ }, { "Input": "先週の水曜日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "先週の水曜日", @@ -2202,7 +2202,7 @@ }, { "Input": "明後日、空いていますか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "明後日", @@ -2214,7 +2214,7 @@ }, { "Input": "最後の水曜日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "最後の水曜日", @@ -2226,7 +2226,7 @@ }, { "Input": "一昨昨日はどうでしたか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一昨昨日", @@ -2274,7 +2274,7 @@ }, { "Input": "2015年5月13日、空いていますか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2015年5月13日", @@ -2298,7 +2298,7 @@ }, { "Input": "先週の月曜日はテストがありました", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "先週の月曜日", @@ -2322,7 +2322,7 @@ }, { "Input": "最近はお元気ですか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "最近", @@ -2334,7 +2334,7 @@ }, { "Input": "2004年8月15日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2004年8月15日", @@ -2370,7 +2370,7 @@ }, { "Input": "もうすぐ1月19日になります。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1月19日", @@ -2382,7 +2382,7 @@ }, { "Input": "去年の今月の十日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "去年の今月の十日", @@ -2418,7 +2418,7 @@ }, { "Input": "平成二十二年一月二十九日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "平成二十二年一月二十九日", @@ -2430,7 +2430,7 @@ }, { "Input": "会議は今週の月曜日になりました。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今週の月曜日", @@ -2454,7 +2454,7 @@ }, { "Input": "7月4日に北京に到着します。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7月4日", @@ -2490,7 +2490,7 @@ }, { "Input": "明日はいいですか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "明日", @@ -2514,7 +2514,7 @@ }, { "Input": "9月8日に着きます", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "9月8日", @@ -2526,7 +2526,7 @@ }, { "Input": "旧暦の三月一日にしました", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧暦の三月一日", @@ -2538,7 +2538,7 @@ }, { "Input": "弥明後日はいいですか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "弥明後日", @@ -2550,7 +2550,7 @@ }, { "Input": "2010年1月29日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2010年1月29日", @@ -2562,7 +2562,7 @@ }, { "Input": "1月19日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1月19日", @@ -2574,7 +2574,7 @@ }, { "Input": "今月の十日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今月の十日", diff --git a/Specs/DateTime/Japanese/DateParser.json b/Specs/DateTime/Japanese/DateParser.json index 620e0aa2b1..bd1f6d7275 100644 --- a/Specs/DateTime/Japanese/DateParser.json +++ b/Specs/DateTime/Japanese/DateParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月2日", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年2月22日", @@ -52,7 +52,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年4月21日", @@ -76,7 +76,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4月22日", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年8月12日", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月1日", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "先週の日曜日", @@ -172,7 +172,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "最後の日", @@ -196,7 +196,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月の第1金曜日", @@ -220,7 +220,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "私の一日", @@ -244,7 +244,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "前日", @@ -364,7 +364,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "27日", @@ -388,7 +388,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "21日", @@ -412,7 +412,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "22日", @@ -436,7 +436,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "二日", @@ -460,7 +460,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "二十二日", @@ -484,7 +484,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "30日", @@ -605,7 +605,7 @@ "ReferenceDateTime": "2017-09-27T00:00:00" }, "Comment": "Translated from 'third thursday'.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "第三火曜日", @@ -629,7 +629,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年1月12日", @@ -654,7 +654,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "Comment": "Translated from 9-18-15(MDY)", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年9月18日", @@ -774,7 +774,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年5月13日", @@ -798,7 +798,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年5月13日", @@ -822,7 +822,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年3月7日", @@ -846,7 +846,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2007年3月7日", @@ -870,7 +870,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2027年3月7日", @@ -894,7 +894,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1989年5月5日", @@ -918,7 +918,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1971年5月5日", @@ -990,7 +990,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "15日", @@ -1014,7 +1014,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "10-2", @@ -1038,7 +1038,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "10/2", @@ -1086,7 +1086,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016年1月12日", @@ -1134,7 +1134,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "02/22/2016", @@ -1159,7 +1159,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "Comment": "Translated from 21/04/2016(DMY).", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016/04/21", @@ -1184,7 +1184,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "Comment": "Unnecessary. Japanese don't use DMY form.", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21/04/16", @@ -1208,7 +1208,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21-04-2016", @@ -1232,7 +1232,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4.22", @@ -1256,7 +1256,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4-22", @@ -1280,7 +1280,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4/22", @@ -1304,7 +1304,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "22/04", @@ -1328,7 +1328,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2015/08/12", @@ -1352,7 +1352,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "08/12,2015", @@ -1376,7 +1376,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1月の1日", @@ -1400,7 +1400,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1月22日水曜", @@ -1424,7 +1424,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5月21日", @@ -1448,7 +1448,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5月の21日", @@ -1520,7 +1520,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "金曜日", @@ -1544,7 +1544,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日", @@ -1568,7 +1568,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明日", @@ -1592,7 +1592,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "昨日", @@ -1640,7 +1640,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明後日", @@ -1664,7 +1664,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "明後日", @@ -1688,7 +1688,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "次の日", @@ -1712,7 +1712,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "この金曜日", @@ -1760,7 +1760,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "先週の日曜日", @@ -1784,7 +1784,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "今週の金曜日", @@ -1832,7 +1832,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "昨日", @@ -1856,7 +1856,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "その日", @@ -1880,7 +1880,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016年6月15日", @@ -1905,7 +1905,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "Comment": "Translated from 'the first friday of july' which is 7th month.", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "7月の第一金曜日", @@ -1929,7 +1929,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今月の第一金曜日", @@ -1977,7 +1977,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日", @@ -2001,7 +2001,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "この日", @@ -2025,7 +2025,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "前日", @@ -2073,7 +2073,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "1か月前", @@ -2097,7 +2097,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, python,java", "Results": [ { "Text": "数月前", @@ -2121,7 +2121,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "数日前", @@ -2145,7 +2145,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "27日", @@ -2170,7 +2170,7 @@ "ReferenceDateTime": "2016-11-07T00:00:00" }, "Comment": "There is no preposition or other indicator in the sentence to identify '27' as a date", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { @@ -2203,7 +2203,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "27日", @@ -2252,7 +2252,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21日", @@ -2300,7 +2300,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二日目", @@ -2324,7 +2324,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十二日", @@ -2541,7 +2541,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "第1の日曜日", @@ -2566,7 +2566,7 @@ "ReferenceDateTime": "2017-09-27T00:00:00" }, "Comment": "Translated from 'third Tuesday'.", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "第3の火曜日", @@ -2665,7 +2665,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2018年一月十二日", @@ -2689,7 +2689,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "15-9-18", @@ -2737,7 +2737,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "二年前", @@ -2761,7 +2761,7 @@ "Context": { "ReferenceDateTime": "2016-11-14T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2016年11月16日", @@ -2954,7 +2954,7 @@ "Context": { "ReferenceDateTime": "2017-12-18T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1391年12月5日", @@ -2978,7 +2978,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2018年1月22日月曜日", @@ -3026,7 +3026,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1978年9月21日", @@ -3074,7 +3074,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二千年の九月十日", @@ -3098,7 +3098,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T09:58:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "来月の最初の金曜日", @@ -3122,7 +3122,7 @@ "Context": { "ReferenceDateTime": "2018-03-20T10:45:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "来月の第2月曜日", @@ -3218,7 +3218,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日から二日", @@ -3242,7 +3242,7 @@ "Context": { "ReferenceDateTime": "2018-04-20T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今日から4日", @@ -3266,7 +3266,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "13.5.2015", @@ -3290,7 +3290,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2015.5.13", @@ -3338,7 +3338,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3-7-07", @@ -3362,7 +3362,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3-7-27", @@ -3386,7 +3386,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "05/05/89", @@ -3410,7 +3410,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "71/05/05", @@ -3554,7 +3554,7 @@ "Context": { "ReferenceDateTime": "2018-07-05T00:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "3週間で", @@ -3578,7 +3578,7 @@ "Context": { "ReferenceDateTime": "2018-08-21T08:00:00" }, - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript,python,java", "Results": [ { "Text": "4営業日で", @@ -3674,7 +3674,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1月19日", @@ -3698,7 +3698,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2010年1月29日", @@ -3722,7 +3722,7 @@ "Context": { "ReferenceDateTime": "2018-09-18T18:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "水曜日", @@ -3746,7 +3746,7 @@ "Context": { "ReferenceDateTime": "2018-09-18T18:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "明後日", @@ -3770,7 +3770,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "日曜", @@ -3890,7 +3890,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一月十九日", @@ -3914,7 +3914,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧暦の三月一日", @@ -3938,7 +3938,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript,python,java", "Results": [ { "Text": "今週の月曜日", @@ -3986,7 +3986,7 @@ "Context": { "ReferenceDateTime": "2018-07-30T12:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "昨日", @@ -4034,7 +4034,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "先週の月曜日", @@ -4058,7 +4058,7 @@ "Context": { "ReferenceDateTime": "2018-09-18T18:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "月曜日", @@ -4130,7 +4130,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "平成二十二年一月二十九日", @@ -4299,7 +4299,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "十二日", @@ -4347,7 +4347,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2004年8月15日", @@ -4371,7 +4371,7 @@ "Context": { "ReferenceDateTime": "2016-03-10T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "二十九日", @@ -4491,7 +4491,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "去年の今月の十日", @@ -4515,7 +4515,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "平成二十七年五月十三日", @@ -4539,7 +4539,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "この間", @@ -4587,7 +4587,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "月曜日", @@ -4611,7 +4611,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "明日", diff --git a/Specs/DateTime/Japanese/DatePeriodExtractor.json b/Specs/DateTime/Japanese/DatePeriodExtractor.json index f31726fb71..224574a922 100644 --- a/Specs/DateTime/Japanese/DatePeriodExtractor.json +++ b/Specs/DateTime/Japanese/DatePeriodExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "1月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月", @@ -13,7 +13,7 @@ }, { "Input": "今年の1月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の1月", @@ -25,7 +25,7 @@ }, { "Input": "2001年1月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年1月", @@ -37,7 +37,7 @@ }, { "Input": "2月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2月", @@ -49,7 +49,7 @@ }, { "Input": "今年の2月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の2月", @@ -61,7 +61,7 @@ }, { "Input": "2001年2月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年2月", @@ -73,7 +73,7 @@ }, { "Input": "3月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3月", @@ -85,7 +85,7 @@ }, { "Input": "今年の3月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の3月", @@ -97,7 +97,7 @@ }, { "Input": "2001年3月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年3月", @@ -109,7 +109,7 @@ }, { "Input": "4月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4月", @@ -121,7 +121,7 @@ }, { "Input": "今年の4月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の4月", @@ -133,7 +133,7 @@ }, { "Input": "2001年4月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年4月", @@ -145,7 +145,7 @@ }, { "Input": "5月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5月", @@ -157,7 +157,7 @@ }, { "Input": "今年の5月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の5月", @@ -169,7 +169,7 @@ }, { "Input": "2001年5月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年5月", @@ -181,7 +181,7 @@ }, { "Input": "6月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "6月", @@ -193,7 +193,7 @@ }, { "Input": "今年の6月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の6月", @@ -205,7 +205,7 @@ }, { "Input": "2001年6月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年6月", @@ -217,7 +217,7 @@ }, { "Input": "7月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月", @@ -229,7 +229,7 @@ }, { "Input": "今年の7月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の7月", @@ -241,7 +241,7 @@ }, { "Input": "2001年7月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年7月", @@ -253,7 +253,7 @@ }, { "Input": "8月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8月", @@ -265,7 +265,7 @@ }, { "Input": "今年の8月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の8月", @@ -277,7 +277,7 @@ }, { "Input": "2001年8月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年8月", @@ -289,7 +289,7 @@ }, { "Input": "9月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月", @@ -301,7 +301,7 @@ }, { "Input": "今年の9月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の9月", @@ -313,7 +313,7 @@ }, { "Input": "2001年9月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年9月", @@ -325,7 +325,7 @@ }, { "Input": "10月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月", @@ -337,7 +337,7 @@ }, { "Input": "今年の10月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の10月", @@ -349,7 +349,7 @@ }, { "Input": "2001年10月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年10月", @@ -361,7 +361,7 @@ }, { "Input": "11月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11月", @@ -373,7 +373,7 @@ }, { "Input": "今年の11月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の11月", @@ -385,7 +385,7 @@ }, { "Input": "2001年11月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年11月", @@ -397,7 +397,7 @@ }, { "Input": "12月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12月", @@ -409,7 +409,7 @@ }, { "Input": "今年の12月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の12月", @@ -421,7 +421,7 @@ }, { "Input": "2001年12月は不在でした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2001年12月", @@ -433,7 +433,7 @@ }, { "Input": "9月のカレンダー", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月", @@ -445,7 +445,7 @@ }, { "Input": "今月の4日から22日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月の4日から22日まで", @@ -457,7 +457,7 @@ }, { "Input": "来月の4日から23日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来月の4日から23日まで", @@ -469,7 +469,7 @@ }, { "Input": "9月3日から12日まで不在にします。ハハハ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月3日から12日まで", @@ -481,7 +481,7 @@ }, { "Input": "今月の4日から23日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月の4日から23日まで", @@ -493,7 +493,7 @@ }, { "Input": "今月の4日から22日の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月の4日から22日の間", @@ -505,7 +505,7 @@ }, { "Input": "9月3日から12日の間、不在にします。ハハハ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月3日から12日の間", @@ -517,7 +517,7 @@ }, { "Input": "9月4日から8日までの間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月4日から8日までの間", @@ -529,7 +529,7 @@ }, { "Input": "11月15日から19日までの間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11月15日から19日までの間", @@ -541,7 +541,7 @@ }, { "Input": "2017年1月4日から22日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年1月4日から22日まで", @@ -553,7 +553,7 @@ }, { "Input": "2017年1月4日から22日の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年1月4日から22日の間", @@ -565,7 +565,7 @@ }, { "Input": "今週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -577,7 +577,7 @@ }, { "Input": "来週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週", @@ -589,7 +589,7 @@ }, { "Input": "来年の6月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の6月", @@ -601,7 +601,7 @@ }, { "Input": "2016年6月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年6月", @@ -613,7 +613,7 @@ }, { "Input": "今週末は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週末", @@ -625,7 +625,7 @@ }, { "Input": "今月の第三週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月の第三週", @@ -637,7 +637,7 @@ }, { "Input": "7月の最後の週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月の最後の週", @@ -649,7 +649,7 @@ }, { "Input": "金曜日から日曜日までキャンプの予定を入れる。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "金曜日から日曜日まで", @@ -661,7 +661,7 @@ }, { "Input": "向こう3日間は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "向こう3日間", @@ -673,7 +673,7 @@ }, { "Input": "向こう3か月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "向こう3か月", @@ -686,7 +686,7 @@ { "Input": "3年後に不在にします。", "Comment": "This test case was intended to correspond to the English 'I'll be out in 3 years', but '後に' (after) is used instead of 'で' (in). A test case using 'で' has been appended to the specs.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3年後に", @@ -699,7 +699,7 @@ { "Input": "3週間後に不在にします。", "Comment": "This test case was intended to correspond to the English 'I'll be out in 3 weeks', but '後に' (after) is used instead of 'で' (in). A test case using 'で' has been appended to the specs.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3週間後に", @@ -712,7 +712,7 @@ { "Input": "3か月後に不在にします。", "Comment": "This test case was intended to correspond to the English 'I'll be out in 3 months', but '後に' (after) is used instead of 'で' (in). A test case using 'で' has been appended to the specs.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3か月後に", @@ -724,7 +724,7 @@ }, { "Input": "前の3週間は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "前の3週間", @@ -736,7 +736,7 @@ }, { "Input": "この数週間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "この数週間", @@ -748,7 +748,7 @@ }, { "Input": "この数日間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "この数日間", @@ -760,7 +760,7 @@ }, { "Input": "10月2日から22日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月2日から22日まで", @@ -772,7 +772,7 @@ }, { "Input": "2016年1月12日から2016年2月22日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年1月12日から2016年2月22日まで", @@ -784,7 +784,7 @@ }, { "Input": "1月1日から1月22日水曜日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月1日から1月22日水曜日まで", @@ -796,7 +796,7 @@ }, { "Input": "今日から明日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から明日まで", @@ -808,7 +808,7 @@ }, { "Input": "今日から10月22日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から10月22日まで", @@ -820,7 +820,7 @@ }, { "Input": "10月2日から明後日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月2日から明後日まで", @@ -832,7 +832,7 @@ }, { "Input": "今日から来週日曜日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から来週日曜日まで", @@ -844,7 +844,7 @@ }, { "Input": "今週の金曜日から来週の日曜日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日から来週の日曜日まで", @@ -856,7 +856,7 @@ }, { "Input": "2015年8月12日から10月22日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年8月12日から10月22日まで", @@ -883,7 +883,7 @@ }, { "Input": "10月2日から22日の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月2日から22日の間", @@ -895,7 +895,7 @@ }, { "Input": "11月19日から20日まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11月19日から20日まで", @@ -907,7 +907,7 @@ }, { "Input": "11月19日から20日の間は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11月19日から20日の間", @@ -919,7 +919,7 @@ }, { "Input": "2016年の第3四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年の第3四半期", @@ -931,7 +931,7 @@ }, { "Input": "今年の第3四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の第3四半期", @@ -943,7 +943,7 @@ }, { "Input": "第1四半期中に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "第1四半期", @@ -955,7 +955,7 @@ }, { "Input": "第3四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "第3四半期", @@ -967,7 +967,7 @@ }, { "Input": "2015年3月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年3月", @@ -979,7 +979,7 @@ }, { "Input": "2027年の第3週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2027年の第3週", @@ -991,7 +991,7 @@ }, { "Input": "来年の第3週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の第3週", @@ -1003,7 +1003,7 @@ }, { "Input": "今年の夏出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の夏", @@ -1015,7 +1015,7 @@ }, { "Input": "来年の春出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の春", @@ -1027,7 +1027,7 @@ }, { "Input": "その夏出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その夏", @@ -1039,7 +1039,7 @@ }, { "Input": "夏出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夏", @@ -1051,7 +1051,7 @@ }, { "Input": "2016年の夏出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年の夏", @@ -1063,7 +1063,7 @@ }, { "Input": "来月の休日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来月", @@ -1075,7 +1075,7 @@ }, { "Input": "11月30日の週", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11月30日の週", @@ -1087,7 +1087,7 @@ }, { "Input": "9月15日の週", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月15日の週", @@ -1099,7 +1099,7 @@ }, { "Input": "9月15日の月", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "9月15日の月", @@ -1111,7 +1111,7 @@ }, { "Input": "その週末に出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その週末", @@ -1123,7 +1123,7 @@ }, { "Input": "その週の残りの日は休暇を取ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その週の残りの日", @@ -1135,7 +1135,7 @@ }, { "Input": "私の週の残りの日は休暇を取ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "私の週の残りの日", @@ -1147,7 +1147,7 @@ }, { "Input": "週の残りの日は休暇を取ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "週の残りの日", @@ -1159,7 +1159,7 @@ }, { "Input": "今週の残りの日は休暇を取ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の残りの日", @@ -1171,7 +1171,7 @@ }, { "Input": "その月の残りの日は休暇を取ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その月の残りの日", @@ -1183,7 +1183,7 @@ }, { "Input": "その年いっぱいは休暇を取ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その年いっぱい", @@ -1195,7 +1195,7 @@ }, { "Input": "今月の終わりごろ会うための時間をつくってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月の終わりごろ", @@ -1207,7 +1207,7 @@ }, { "Input": "今週の終わりごろ会うための時間をつくってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の終わりごろ", @@ -1219,7 +1219,7 @@ }, { "Input": "来週の終わりごろ会うための時間をつくってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の終わりごろ", @@ -1231,7 +1231,7 @@ }, { "Input": "来年の終わりごろ会うための時間をつくってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の終わりごろ", @@ -1243,7 +1243,7 @@ }, { "Input": "私たちは先週の終わりごろ会いました。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "先週の終わりごろ", @@ -1255,7 +1255,7 @@ }, { "Input": "今月初めに会うための時間をとってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今月初め", @@ -1267,7 +1267,7 @@ }, { "Input": "今週初めに会うための時間をとってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週初め", @@ -1279,7 +1279,7 @@ }, { "Input": "来週初めに会うための時間をとってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週初め", @@ -1291,7 +1291,7 @@ }, { "Input": "来年初めに会うための時間をとってください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年初め", @@ -1303,7 +1303,7 @@ }, { "Input": "コルタナ、アントニオと25分の会議を来週の水曜日から金曜日の間で調整して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の水曜日から金曜日の間", @@ -1315,7 +1315,7 @@ }, { "Input": "コルタナ、アントニオと25分の会議を来週の水曜日から金曜日で調整して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,python, java", "Results": [ { "Text": "来週の水曜日から金曜日", @@ -1327,7 +1327,7 @@ }, { "Input": "コルタナ、アントニオと25分の会議を先週の水曜日から金曜日の間で調整して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "先週の水曜日から金曜日の間", @@ -1351,7 +1351,7 @@ }, { "Input": "247年は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "247年", @@ -1363,7 +1363,7 @@ }, { "Input": "1970年代に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1970年代", @@ -1375,7 +1375,7 @@ }, { "Input": "2000年代に彼は生まれた。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2000年代", @@ -1387,7 +1387,7 @@ }, { "Input": "70年代に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "70年代", @@ -1399,7 +1399,7 @@ }, { "Input": "40年代に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "40年代", @@ -1411,7 +1411,7 @@ }, { "Input": "2010年代に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2010年代", @@ -1423,7 +1423,7 @@ }, { "Input": "2000年代に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2000年代", @@ -1435,7 +1435,7 @@ }, { "Input": "2018年2月2日から7日は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年2月2日から7日", @@ -1447,7 +1447,7 @@ }, { "Input": "2018年2月2日から7日の間は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年2月2日から7日の間", @@ -1459,7 +1459,7 @@ }, { "Input": "1999年の6月にそれは起きた。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1999年の6月", @@ -1471,7 +1471,7 @@ }, { "Input": "1928年に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1928年に", @@ -1483,7 +1483,7 @@ }, { "Input": "2027年の最初の週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2027年の最初の週", @@ -1495,7 +1495,7 @@ }, { "Input": "2020年の第1四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2020年の第1四半期", @@ -1507,7 +1507,7 @@ }, { "Input": "1978年の春に", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1978年の春", @@ -1519,7 +1519,7 @@ }, { "Input": "再来週は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "再来週", @@ -1531,7 +1531,7 @@ }, { "Input": "それは過去20年間に起きた。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "過去20年間", @@ -1543,7 +1543,7 @@ }, { "Input": "それは次の10年間に起きた。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "次の10年間", @@ -1555,7 +1555,7 @@ }, { "Input": "それは今後4週間に起きるでしょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今後4週間", @@ -1567,7 +1567,7 @@ }, { "Input": "それは2日後に起きるでしょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日後に", @@ -1579,7 +1579,7 @@ }, { "Input": "コルタナが来週の初めに時間を見つけてくれる。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の初め", @@ -1591,7 +1591,7 @@ }, { "Input": "承知しました。来週の終わりにスカイプを取得しましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の終わり", @@ -1603,7 +1603,7 @@ }, { "Input": "承知しました。来週の初めにスカイプを取得しましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の初め", @@ -1615,7 +1615,7 @@ }, { "Input": "コルタナ、三月の下旬に時間を見つけて。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "三月の下旬", @@ -1627,7 +1627,7 @@ }, { "Input": "コルタナ、来週半ばに時間を見つけて。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週半ば", @@ -1639,7 +1639,7 @@ }, { "Input": "コルタナが三月半ばに会えるよう手配してくれる。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "三月半ば", @@ -1651,7 +1651,7 @@ }, { "Input": "夏の半ばまでにどうですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夏の半ば", @@ -1663,7 +1663,7 @@ }, { "Input": "来週のはじめに時間がつくれます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週のはじめ", @@ -1675,7 +1675,7 @@ }, { "Input": "2016年11月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月", @@ -1687,7 +1687,7 @@ }, { "Input": "1月1日から4月5日の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月1日から4月5日の間", @@ -1699,7 +1699,7 @@ }, { "Input": "2015年1月1日から2018年2月5日の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年1月1日から2018年2月5日の間", @@ -1735,7 +1735,7 @@ }, { "Input": "2019年2月1日から3月まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2019年2月1日から3月まで", @@ -1747,7 +1747,7 @@ }, { "Input": "2019年2月1日から3月の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2019年2月1日から3月の間", @@ -1759,7 +1759,7 @@ }, { "Input": "2015年6月から2018年5月の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年6月から2018年5月の間", @@ -1783,7 +1783,7 @@ }, { "Input": "2015年5月から2018年6月の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年5月から2018年6月の間", @@ -1855,7 +1855,7 @@ }, { "Input": "今日から2日半の間、ここに滞在します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2日半の間", @@ -1867,7 +1867,7 @@ }, { "Input": "私の2017年4月のボーナスは何ですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年4月", @@ -1879,7 +1879,7 @@ }, { "Input": "私はそれが起きたのと同じ月にそこにいませんでした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "同じ月", @@ -1891,7 +1891,7 @@ }, { "Input": "私はそれが起きたのと同じ週にそこにいませんでした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "同じ週", @@ -1903,7 +1903,7 @@ }, { "Input": "私はその年にそこにいませんでした。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その年", @@ -1915,7 +1915,7 @@ }, { "Input": "今日から2週間以上前にもうすべての仕事を終えた。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2週間以上前", @@ -1927,7 +1927,7 @@ }, { "Input": "今日から2週間以内に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2週間以内", @@ -1939,7 +1939,7 @@ }, { "Input": "この仕事は昨日の2日以上前には終わらせておくべきだった。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昨日の2日以上前", @@ -1951,7 +1951,7 @@ }, { "Input": "この仕事は明日から3日以内に終わらせます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日から3日以内", @@ -1963,7 +1963,7 @@ }, { "Input": "コルタナ、18日の週に何か予定を入れて。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "18日の週", @@ -1975,7 +1975,7 @@ }, { "Input": "日付がこの10年の売上", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "この10年", @@ -1987,7 +1987,7 @@ }, { "Input": "2016年第3四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年第3四半期", @@ -1999,7 +1999,7 @@ }, { "Input": "来年の第3四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の第3四半期", @@ -2011,7 +2011,7 @@ }, { "Input": "来年の第4四半期は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の第4四半期", @@ -2024,12 +2024,12 @@ { "Input": "2000ドルをイギリスポンドに換算してください。", "Comment": "2000 shouldn't recognized as year here", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "この銀行の株は年初来20%下がっている。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "年初来", @@ -2041,7 +2041,7 @@ }, { "Input": "10月1日から11月7日まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月1日から11月7日まで", @@ -2119,7 +2119,7 @@ }, { "Input": "今年の夏", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今年の夏", @@ -2155,7 +2155,7 @@ }, { "Input": "先週", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "先週", @@ -2191,7 +2191,7 @@ }, { "Input": "2018年12月", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2018年12月", @@ -2239,7 +2239,7 @@ }, { "Input": "会議は来週になりました。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "来週", @@ -2263,7 +2263,7 @@ }, { "Input": "平成三十年十二月", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "平成三十年十二月", @@ -2275,7 +2275,7 @@ }, { "Input": "この三年間、犯罪者数は年々減っています。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "この三年間", @@ -2299,7 +2299,7 @@ }, { "Input": "100とはただの数字です。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [] }, { @@ -2328,7 +2328,7 @@ }, { "Input": "次の週末", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "次の週末", @@ -2340,7 +2340,7 @@ }, { "Input": "来週はどうですか?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "来週", @@ -2376,7 +2376,7 @@ }, { "Input": "1499とはただの数字です。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [] }, { @@ -2405,7 +2405,7 @@ }, { "Input": "来月まで終わります。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "来月", @@ -2441,7 +2441,7 @@ }, { "Input": "一月十日から十二日まで", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一月十日から十二日まで", @@ -2453,7 +2453,7 @@ }, { "Input": "翌年", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "翌年", @@ -2465,7 +2465,7 @@ }, { "Input": "先月", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "先月", @@ -2477,7 +2477,7 @@ }, { "Input": "翌日", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "翌日", @@ -2549,7 +2549,7 @@ }, { "Input": "来年", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "来年", @@ -2561,7 +2561,7 @@ }, { "Input": "今クォーター", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今クォーター", @@ -2573,7 +2573,7 @@ }, { "Input": "過去の十年間北京は著しく変わりました。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "過去の十年間", @@ -2585,7 +2585,7 @@ }, { "Input": "2101とはただの数字です。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [] }, { @@ -2614,7 +2614,7 @@ }, { "Input": "今月", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今月", @@ -2626,7 +2626,7 @@ }, { "Input": "こんげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "こんげつ", @@ -2638,7 +2638,7 @@ }, { "Input": "来月", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "来月", @@ -2650,7 +2650,7 @@ }, { "Input": "らいげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "らいげつ", @@ -2663,7 +2663,7 @@ { "Input": "再来月", "Comment": "Pronounciation: さらいげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "再来月", @@ -2675,7 +2675,7 @@ }, { "Input": "昨月", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "昨月", @@ -2687,7 +2687,7 @@ }, { "Input": "さくげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "さくげつ", @@ -2699,7 +2699,7 @@ }, { "Input": "せんげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "せんげつ", @@ -2711,7 +2711,7 @@ }, { "Input": "先々月", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "先々月", @@ -2723,7 +2723,7 @@ }, { "Input": "せんせんげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "せんせんげつ", @@ -2735,7 +2735,7 @@ }, { "Input": "前月", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "前月", @@ -2747,7 +2747,7 @@ }, { "Input": "ぜんげつ", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "ぜんげつ", @@ -2759,7 +2759,7 @@ }, { "Input": "今年", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "今年", @@ -2771,7 +2771,7 @@ }, { "Input": "ことし", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "ことし", @@ -2783,7 +2783,7 @@ }, { "Input": "らいねん", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "らいねん", @@ -2795,7 +2795,7 @@ }, { "Input": "再来年", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "再来年", @@ -2807,7 +2807,7 @@ }, { "Input": "さらいねん", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "さらいねん", @@ -2819,7 +2819,7 @@ }, { "Input": "昨年", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "昨年", @@ -2831,7 +2831,7 @@ }, { "Input": "さくねん", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "さくねん", @@ -2843,7 +2843,7 @@ }, { "Input": "きょねん", - "NotSupportedByDesign": "javascript, python, java", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "きょねん", diff --git a/Specs/DateTime/Japanese/DatePeriodParser.json b/Specs/DateTime/Japanese/DatePeriodParser.json index 7e9454beec..f2bfe7d043 100644 --- a/Specs/DateTime/Japanese/DatePeriodParser.json +++ b/Specs/DateTime/Japanese/DatePeriodParser.json @@ -186,7 +186,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1995年1月4日から22日まで", @@ -212,7 +212,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1995年1月4日から22日の間", @@ -264,7 +264,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -290,7 +290,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週", @@ -602,7 +602,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その週", @@ -628,7 +628,7 @@ "Context": { "ReferenceDateTime": "2026-01-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -654,7 +654,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "私の週", @@ -707,7 +707,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週末", @@ -733,7 +733,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "私の週末", @@ -785,7 +785,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年1月12日から2016年1月22日まで", @@ -837,7 +837,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から明日まで", @@ -1149,7 +1149,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "週末", @@ -1175,7 +1175,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週末", @@ -1409,7 +1409,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年の第3四半期", @@ -1435,7 +1435,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の第3四半期", @@ -1513,7 +1513,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年の第1四半期", @@ -1617,7 +1617,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の夏", @@ -1637,7 +1637,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の春", @@ -1657,7 +1657,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その夏", @@ -1677,7 +1677,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夏", @@ -1697,7 +1697,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年の夏", @@ -2064,7 +2064,7 @@ "Context": { "ReferenceDateTime": "2017-11-17T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -2168,7 +2168,7 @@ "Context": { "ReferenceDateTime": "2017-11-20T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週末", @@ -2298,7 +2298,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java, python", "Results": [ { "Text": "70年代", @@ -2324,7 +2324,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java, python", "Results": [ { "Text": "40年代", @@ -2402,7 +2402,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年2月2日から7日", @@ -2428,7 +2428,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2018年2月2日から7日の間", @@ -2532,7 +2532,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2020年の第3四半期", @@ -2558,7 +2558,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1978年の春", @@ -2708,7 +2708,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2014年から2018年まで", @@ -2734,7 +2734,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2014年から2018年の間", @@ -2760,7 +2760,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2000年から2014年まで", @@ -4276,7 +4276,7 @@ "Context": { "ReferenceDateTime": "2019-01-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -4302,7 +4302,7 @@ "Context": { "ReferenceDateTime": "2017-01-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -4328,7 +4328,7 @@ "Context": { "ReferenceDateTime": "2016-01-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週", @@ -4426,7 +4426,7 @@ "Context": { "ReferenceDateTime": "2018-11-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "08日から12日まで", @@ -4452,7 +4452,7 @@ "Context": { "ReferenceDateTime": "2018-11-30T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "08日から12日まで", @@ -4478,7 +4478,7 @@ "Context": { "ReferenceDateTime": "2018-12-30T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "08日から12日まで", @@ -4504,7 +4504,7 @@ "Context": { "ReferenceDateTime": "2018-01-30T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "08日から12日まで", @@ -4530,7 +4530,7 @@ "Context": { "ReferenceDateTime": "2018-01-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "08日から12日まで", @@ -4553,7 +4553,7 @@ }, { "Input": "2008年から2012年まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2008年から2012年まで", @@ -4651,7 +4651,7 @@ "Context": { "ReferenceDateTime": "2018-11-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "08/1から09/4まで", @@ -4703,7 +4703,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript,python,java", "Results": [ { "Text": "2019年6月1日から6月30日まで", @@ -4755,7 +4755,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript,python,java", "Results": [ { "Text": "来月", @@ -5243,7 +5243,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "来週", @@ -5347,7 +5347,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript,python,java", "Results": [ { "Text": "2007年", @@ -5477,7 +5477,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "二〇一六年から二〇一八年まで", @@ -5581,7 +5581,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript,python,java", "Results": [ { "Text": "来年", @@ -5659,7 +5659,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "次の週末", @@ -5737,7 +5737,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今年の第一クォーター", @@ -5945,7 +5945,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "来週", @@ -6118,7 +6118,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "翌年", diff --git a/Specs/DateTime/Japanese/DateTimeExtractor.json b/Specs/DateTime/Japanese/DateTimeExtractor.json index 9a7e1c8fb8..96d8ba4e1b 100644 --- a/Specs/DateTime/Japanese/DateTimeExtractor.json +++ b/Specs/DateTime/Japanese/DateTimeExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "今戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今", @@ -13,7 +13,7 @@ }, { "Input": "できるだけ早く戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "できるだけ早く", @@ -25,7 +25,7 @@ }, { "Input": "今すぐ戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今すぐ", @@ -37,7 +37,7 @@ }, { "Input": "15日の8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8時", @@ -49,7 +49,7 @@ }, { "Input": "15日の8時30秒に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8時30秒", @@ -61,7 +61,7 @@ }, { "Input": "15日の午後8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の午後8時", @@ -73,7 +73,7 @@ }, { "Input": "2016年04月21日の午後8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年04月21日の午後8時", @@ -85,7 +85,7 @@ }, { "Input": "2016年04月21日の午後8時13秒に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年04月21日の午後8時13秒", @@ -97,7 +97,7 @@ }, { "Input": "10月23日の7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月23日の7時", @@ -109,7 +109,7 @@ }, { "Input": "10月14日の午前8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時", @@ -121,7 +121,7 @@ }, { "Input": "10月14日の午前8時1秒に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時1秒", @@ -133,7 +133,7 @@ }, { "Input": "明日の午前8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の午前8時", @@ -145,7 +145,7 @@ }, { "Input": "明日の午前8時ごろ戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の午前8時", @@ -157,7 +157,7 @@ }, { "Input": "明日の午前8時5秒に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の午前8時5秒", @@ -169,7 +169,7 @@ }, { "Input": "来週の金曜日の3時半に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の金曜日の3時半", @@ -181,7 +181,7 @@ }, { "Input": "2016年5月5日の夜8時20分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年5月5日の夜8時20分", @@ -193,7 +193,7 @@ }, { "Input": "15日の7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の7時", @@ -205,7 +205,7 @@ }, { "Input": "来週の日曜日の午後8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来週の日曜日の午後8時", @@ -217,7 +217,7 @@ }, { "Input": "今日の午後8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の午後8時", @@ -229,7 +229,7 @@ }, { "Input": "明日の7時15分前に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の7時15分前", @@ -241,7 +241,7 @@ }, { "Input": "2016年12月22日の19時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年12月22日の19時", @@ -253,7 +253,7 @@ }, { "Input": "明日の7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の7時", @@ -265,7 +265,7 @@ }, { "Input": "明日の朝7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の朝7時", @@ -277,7 +277,7 @@ }, { "Input": "日曜の午後7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "日曜の午後7時", @@ -289,7 +289,7 @@ }, { "Input": "明日の朝5時20分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の朝5時20分", @@ -301,7 +301,7 @@ }, { "Input": "10月14日の8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の8時", @@ -313,7 +313,7 @@ }, { "Input": "今朝の7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今朝の7時", @@ -325,7 +325,7 @@ }, { "Input": "1月1日の午後8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1月1日の午後8時", @@ -337,7 +337,7 @@ }, { "Input": "今夜10時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜10時", @@ -349,7 +349,7 @@ }, { "Input": "今朝8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今朝8時", @@ -361,7 +361,7 @@ }, { "Input": "今夜8時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜8時", @@ -373,7 +373,7 @@ }, { "Input": "今夜7時ごろ戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜7時", @@ -385,7 +385,7 @@ }, { "Input": "今朝7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今朝7時", @@ -397,7 +397,7 @@ }, { "Input": "今夜7時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜7時", @@ -409,7 +409,7 @@ }, { "Input": "今夜9時30分に2名", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜9時30分", @@ -421,7 +421,7 @@ }, { "Input": "今夜9時30分31秒に2名", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜9時30分31秒", @@ -433,7 +433,7 @@ }, { "Input": "今日中に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日中", @@ -445,7 +445,7 @@ }, { "Input": "明日中に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日中", @@ -457,12 +457,12 @@ }, { "Input": "日曜日のうちに戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "5日の午前4時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5日の午前4時", @@ -474,7 +474,7 @@ }, { "Input": "2016年12月16日の午後12時23分59秒に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年12月16日の午後12時23分59秒", @@ -486,7 +486,7 @@ }, { "Input": "あと5時間で戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "あと5時間で", @@ -498,7 +498,7 @@ }, { "Input": "日曜日の午後3時があいているか確認。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "日曜日の午後3時", @@ -510,7 +510,7 @@ }, { "Input": "明日の朝9時にアポを入れる。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の朝9時", @@ -522,7 +522,7 @@ }, { "Input": "明日の朝9時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の朝9時", @@ -534,7 +534,7 @@ }, { "Input": "明日の9時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の9時", @@ -546,7 +546,7 @@ }, { "Input": "今週の金曜日の午後1時", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今週の金曜日の午後1時", @@ -558,7 +558,7 @@ }, { "Input": "金曜日の午後12時30分にランチの予定を追加。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "金曜日の午後12時30分", @@ -570,7 +570,7 @@ }, { "Input": "今夜12時に649を追加。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜12時", @@ -582,7 +582,7 @@ }, { "Input": "8月1日の午前11時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8月1日の午前11時", @@ -594,7 +594,7 @@ }, { "Input": "8月1日の午後11時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8月1日の午後11時", @@ -606,7 +606,7 @@ }, { "Input": "2月25日の午前11時に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2月25日の午前11時", @@ -618,7 +618,7 @@ }, { "Input": "2017年1月6日の午前6時37分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年1月6日の午前6時37分", @@ -630,7 +630,7 @@ }, { "Input": "2016年11月16日の10時38分", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月16日の10時38分", @@ -642,7 +642,7 @@ }, { "Input": "あと1日と2時間で出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "あと1日と2時間で", @@ -654,7 +654,7 @@ }, { "Input": "あと1時間で忙しくなるので、後で電話してください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "あと1時間で", @@ -678,7 +678,7 @@ }, { "Input": "あと1日と30分で出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "あと1日と30分で", @@ -690,7 +690,7 @@ }, { "Input": "あと2分で出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "あと2分で", @@ -702,7 +702,7 @@ }, { "Input": "今日午前9時にスカイプ通話を予約してください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日午前9時", @@ -714,7 +714,7 @@ }, { "Input": "今日午後9時にスカイプ通話を予約してください。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日午後9時", @@ -726,7 +726,7 @@ }, { "Input": "あと2時間で出発します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "あと2時間で", @@ -750,7 +750,7 @@ }, { "Input": "平成二十二年一月二十九日五時", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "平成二十二年一月二十九日五時", @@ -762,7 +762,7 @@ }, { "Input": "明日の午後五時", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "明日の午後五時", @@ -786,7 +786,7 @@ }, { "Input": "昨夜六時", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "昨夜六時", @@ -798,7 +798,7 @@ }, { "Input": "今朝五時", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今朝五時", @@ -822,7 +822,7 @@ }, { "Input": "一月十九日午後五時", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一月十九日午後五時", @@ -858,7 +858,7 @@ }, { "Input": "今日の朝8時15分", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今日の朝8時15分", @@ -882,7 +882,7 @@ }, { "Input": "今は都合が悪い", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今", @@ -906,7 +906,7 @@ }, { "Input": "今夜六時", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今夜六時", @@ -918,7 +918,7 @@ }, { "Input": "日曜日の終わりに帰ります", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "日曜日の終わり", diff --git a/Specs/DateTime/Japanese/DateTimeParser.json b/Specs/DateTime/Japanese/DateTimeParser.json index 24a848ecd9..f2c21e2c9c 100644 --- a/Specs/DateTime/Japanese/DateTimeParser.json +++ b/Specs/DateTime/Japanese/DateTimeParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8時20秒", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年4月21日の午後8時", @@ -52,7 +52,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年4月21日の午後8時20秒", @@ -76,7 +76,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時31秒", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時頃", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時25秒", @@ -172,7 +172,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年12月22日19時", @@ -220,7 +220,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8時24秒", @@ -268,7 +268,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8時13秒", @@ -292,7 +292,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の朝午前7時", @@ -316,7 +316,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の朝7時", @@ -340,7 +340,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年12月16日の12時23分59秒", @@ -364,7 +364,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年1月6日の午前6時37分", @@ -388,7 +388,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月16日 10時38分", @@ -460,7 +460,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今", @@ -508,7 +508,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8時", @@ -532,7 +532,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8時0分20秒", @@ -556,7 +556,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の午後8時", @@ -580,7 +580,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5日の午前4時", @@ -604,7 +604,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年04月21日の午後8:00", @@ -628,7 +628,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年04月21日の午後8:00:20", @@ -652,7 +652,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月23日の7時", @@ -676,7 +676,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8:00", @@ -700,7 +700,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8:00:31", @@ -724,7 +724,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8:00頃", @@ -748,7 +748,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8:00:25", @@ -772,7 +772,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年5月5日の夜8時20分過ぎに", @@ -796,7 +796,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日午後8時", @@ -820,7 +820,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の7時", @@ -844,7 +844,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の午後8時", @@ -868,7 +868,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の7時15分前", @@ -892,7 +892,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016-12-22 19:00", @@ -916,7 +916,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の午前8:00", @@ -940,7 +940,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の朝7時", @@ -964,7 +964,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜7時ぐらい", @@ -988,7 +988,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "次の日曜日の午後7:00", @@ -1012,7 +1012,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日の朝5時20分過ぎに", @@ -1036,7 +1036,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今朝の7時", @@ -1060,7 +1060,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜10時", @@ -1156,7 +1156,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜午後10時", @@ -1180,7 +1180,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今朝の午前8時", @@ -1204,7 +1204,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜午後8時", @@ -1324,7 +1324,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "15日の8:00:24", @@ -1372,7 +1372,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10月14日の午前8:00:13", @@ -1396,7 +1396,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今朝7時", @@ -1420,7 +1420,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の夜午前7時", @@ -1444,7 +1444,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の朝7:00", @@ -1468,7 +1468,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日の夜7時", @@ -1492,7 +1492,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今夜7時", @@ -1516,7 +1516,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016-12-16T12:23:59", @@ -1540,7 +1540,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2017年1月6日 - 6:37am", @@ -1564,7 +1564,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月16日 10:38", @@ -1685,7 +1685,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1987年1月11日の8時", @@ -1709,7 +1709,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今日朝8時15分", @@ -1733,7 +1733,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧暦2015年10月1日の午前9時20分", @@ -1757,7 +1757,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2010-1-29の夜6時", @@ -1781,7 +1781,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2010/01/29の正午12時", @@ -1805,7 +1805,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2010年1月29日の朝7時", @@ -1829,7 +1829,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今日朝5時", @@ -1853,7 +1853,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1月19日の午後5時", @@ -1877,7 +1877,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2010.1.29の5時", @@ -1901,7 +1901,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "明日午後5時", @@ -1925,7 +1925,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T14:07:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "今夜6時", diff --git a/Specs/DateTime/Japanese/DurationExtractor.json b/Specs/DateTime/Japanese/DurationExtractor.json index a17be1da6a..631ff16124 100644 --- a/Specs/DateTime/Japanese/DurationExtractor.json +++ b/Specs/DateTime/Japanese/DurationExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "3時間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3時間", @@ -13,7 +13,7 @@ }, { "Input": "3日間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3日間", @@ -37,7 +37,7 @@ }, { "Input": "3か月不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3か月", @@ -49,7 +49,7 @@ }, { "Input": "3分不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3分", @@ -73,7 +73,7 @@ }, { "Input": "123.45秒不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "123.45秒", @@ -85,7 +85,7 @@ }, { "Input": "2週間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2週間", @@ -97,7 +97,7 @@ }, { "Input": "20分不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20分", @@ -109,7 +109,7 @@ }, { "Input": "24時間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "24時間", @@ -193,7 +193,7 @@ }, { "Input": "1時間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1時間", @@ -205,7 +205,7 @@ }, { "Input": "1年間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1年間", @@ -229,7 +229,7 @@ }, { "Input": "30分不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "30分", @@ -253,7 +253,7 @@ }, { "Input": "2時間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2時間", @@ -277,7 +277,7 @@ }, { "Input": "1週間で", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1週間", @@ -289,7 +289,7 @@ }, { "Input": "1日で", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1日", @@ -301,7 +301,7 @@ }, { "Input": "1時間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1時間", @@ -313,7 +313,7 @@ }, { "Input": "1か月間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1か月間", @@ -325,7 +325,7 @@ }, { "Input": "数時間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "数時間", @@ -337,7 +337,7 @@ }, { "Input": "数分不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "数分", @@ -349,7 +349,7 @@ }, { "Input": "数日間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "数日間", @@ -433,7 +433,7 @@ }, { "Input": "20年間不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "20年間", @@ -445,7 +445,7 @@ }, { "Input": "二年間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "二年間", @@ -457,7 +457,7 @@ }, { "Input": "五時間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "五時間", @@ -481,7 +481,7 @@ }, { "Input": "七週間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "七週間", @@ -517,7 +517,7 @@ }, { "Input": "六日間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "六日間", diff --git a/Specs/DateTime/Japanese/HolidayExtractor.json b/Specs/DateTime/Japanese/HolidayExtractor.json index 8ad7c0364f..f98074562c 100644 --- a/Specs/DateTime/Japanese/HolidayExtractor.json +++ b/Specs/DateTime/Japanese/HolidayExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "クリスマスに戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "クリスマス", @@ -13,7 +13,7 @@ }, { "Input": "クリスマスの日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "クリスマスの日", @@ -25,7 +25,7 @@ }, { "Input": "元旦に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "元旦", @@ -37,7 +37,7 @@ }, { "Input": "感謝祭の日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "感謝祭の日", @@ -49,7 +49,7 @@ }, { "Input": "父の日に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "父の日", @@ -61,7 +61,7 @@ }, { "Input": "今年の元旦に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今年の元旦", @@ -73,7 +73,7 @@ }, { "Input": "2016年の元旦に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年の元旦", @@ -85,7 +85,7 @@ }, { "Input": "2016年元旦に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年元旦", @@ -97,7 +97,7 @@ }, { "Input": "クリーンマンデイに戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "クリーンマンデイ", @@ -109,7 +109,7 @@ }, { "Input": "キング牧師記念日は、アメリカの連邦祝日です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "キング牧師記念日", @@ -121,12 +121,12 @@ }, { "Input": "マーティン・ルーサー・キングは、自分の名がつけられた祝日がある。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "明日建軍節だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "建軍節", @@ -138,7 +138,7 @@ }, { "Input": "明日バレンタインデーだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "バレンタインデー", @@ -150,7 +150,7 @@ }, { "Input": "明日国慶節だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "国慶節", @@ -162,7 +162,7 @@ }, { "Input": "明日清明だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "清明", @@ -174,7 +174,7 @@ }, { "Input": "明日大晦日だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "大晦日", @@ -186,7 +186,7 @@ }, { "Input": "明日ハロウィンだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ハロウィン", @@ -198,7 +198,7 @@ }, { "Input": "明日中秋節だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "中秋節", @@ -210,7 +210,7 @@ }, { "Input": "明日旧正月だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧正月", @@ -222,7 +222,7 @@ }, { "Input": "明日ガールズデーだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ガールズデー", @@ -234,7 +234,7 @@ }, { "Input": "明日感謝祭だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "感謝祭", @@ -246,7 +246,7 @@ }, { "Input": "明日子供の日だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "子供の日", @@ -258,7 +258,7 @@ }, { "Input": "明日クリスマスだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "クリスマス", @@ -270,7 +270,7 @@ }, { "Input": "明日お正月だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "お正月", @@ -282,7 +282,7 @@ }, { "Input": "明日植樹祭だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "植樹祭", @@ -294,7 +294,7 @@ }, { "Input": "明日重陽節だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "重陽節", @@ -306,7 +306,7 @@ }, { "Input": "明日父の日だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "父の日", @@ -318,7 +318,7 @@ }, { "Input": "明日シングルデーだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "シングルデー", @@ -330,7 +330,7 @@ }, { "Input": "明日国際婦人デーだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "国際婦人デー", @@ -342,7 +342,7 @@ }, { "Input": "明日ダブル十一だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ダブル十一", @@ -354,7 +354,7 @@ }, { "Input": "明日元宵節だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "元宵節", @@ -366,7 +366,7 @@ }, { "Input": "明日教師の日だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "教師の日", @@ -378,7 +378,7 @@ }, { "Input": "明日新年だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "新年", @@ -390,7 +390,7 @@ }, { "Input": "明日中秋だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "中秋", @@ -402,7 +402,7 @@ }, { "Input": "明日端午の節句だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "端午の節句", @@ -414,7 +414,7 @@ }, { "Input": "明日母の日だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "母の日", @@ -426,7 +426,7 @@ }, { "Input": "明日エイプリルフールだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "エイプリルフール", @@ -438,7 +438,7 @@ }, { "Input": "明日青年の日だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "青年の日", @@ -450,7 +450,7 @@ }, { "Input": "明日メーデーだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "メーデー", @@ -462,7 +462,7 @@ }, { "Input": "明日クリスマスイブだけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "クリスマスイブ", @@ -474,7 +474,7 @@ }, { "Input": "明日清明節だけどどこ行く?", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "清明節", diff --git a/Specs/DateTime/Japanese/HolidayParser.json b/Specs/DateTime/Japanese/HolidayParser.json index 0050606e9b..fdf8e2fbf7 100644 --- a/Specs/DateTime/Japanese/HolidayParser.json +++ b/Specs/DateTime/Japanese/HolidayParser.json @@ -29,7 +29,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "クリスマスの日", @@ -53,7 +53,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "大晦日", @@ -77,7 +77,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "クリスマス", @@ -101,7 +101,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "元旦", @@ -125,7 +125,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "感謝祭の日", @@ -149,7 +149,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "感謝祭", @@ -173,7 +173,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "父の日", @@ -197,7 +197,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "来年の元旦", @@ -221,7 +221,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2010年の感謝祭の日", @@ -245,7 +245,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2015年の父の日", @@ -269,7 +269,7 @@ "Context": { "ReferenceDateTime": "2018-06-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "メーデー", @@ -308,7 +308,7 @@ "Context": { "ReferenceDateTime": "2018-06-01T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "キング牧師記念日", @@ -332,7 +332,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "教師の日", @@ -356,7 +356,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "母の日", @@ -380,7 +380,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "中秋", @@ -404,7 +404,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "端午の節句", @@ -428,7 +428,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "子供の日", @@ -452,7 +452,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "元宵節", @@ -476,7 +476,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "国慶節", @@ -500,7 +500,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "クリスマス", @@ -524,7 +524,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "メーデー", @@ -548,7 +548,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧正月", @@ -572,7 +572,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "感謝祭", @@ -596,7 +596,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "シングルデー", @@ -620,7 +620,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ハロウィン", @@ -644,7 +644,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "中秋節", @@ -668,7 +668,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "クリスマスイブ", @@ -692,7 +692,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "青年の日", @@ -716,7 +716,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ダブル十一", @@ -740,7 +740,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "父の日", @@ -764,7 +764,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "エイプリルフール", @@ -788,7 +788,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "バレンタインデー", @@ -812,7 +812,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "お正月", @@ -836,7 +836,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ガールズデー", @@ -860,7 +860,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "新年", @@ -884,7 +884,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "清明節", @@ -908,7 +908,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "植樹祭", @@ -932,7 +932,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "国際婦人デー", @@ -956,7 +956,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "建軍節", @@ -980,7 +980,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "重陽節", @@ -1004,7 +1004,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "大晦日", @@ -1028,7 +1028,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "旧暦の正月初一", diff --git a/Specs/DateTime/Japanese/MergedExtractor.json b/Specs/DateTime/Japanese/MergedExtractor.json index c2f631032f..6585e5151a 100644 --- a/Specs/DateTime/Japanese/MergedExtractor.json +++ b/Specs/DateTime/Japanese/MergedExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "これは2日です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日", @@ -49,7 +49,7 @@ }, { "Input": "これは明日午後4時以降です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日午後4時以降", @@ -73,7 +73,7 @@ }, { "Input": "この1週間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "この1週間", @@ -97,7 +97,7 @@ }, { "Input": "この日はどうですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "この日", @@ -109,7 +109,7 @@ }, { "Input": "この週はどうですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "この週", @@ -121,7 +121,7 @@ }, { "Input": "私の一週間はどんなかんじですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "私の一週間", @@ -133,7 +133,7 @@ }, { "Input": "その週はどんなかんじですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その週", @@ -145,7 +145,7 @@ }, { "Input": "私の一日はどんなかんじですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "私の一日", @@ -157,7 +157,7 @@ }, { "Input": "その日はどんなかんじですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "その日", @@ -169,7 +169,7 @@ }, { "Input": "午前9時から11時まで会議の予定を入れて。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前9時から11時まで", @@ -193,7 +193,7 @@ }, { "Input": "7月22日のベルビューでの会議を8月22日に変更。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月22日", @@ -211,7 +211,7 @@ }, { "Input": "7月2日以降", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月2日以降", @@ -235,7 +235,7 @@ }, { "Input": "7月2日以前", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7月2日以前", @@ -247,7 +247,7 @@ }, { "Input": "6月6日 12時15分", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "6月6日 12時15分", @@ -259,7 +259,7 @@ }, { "Input": "2012年6月6日 15時15分", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2012年6月6日 15時15分", @@ -271,7 +271,7 @@ }, { "Input": "5月29日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5月29日", @@ -283,7 +283,7 @@ }, { "Input": "3月29日", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3月29日", @@ -319,12 +319,12 @@ }, { "Input": "notapplicable", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "午後3時の予定を4時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時", @@ -342,7 +342,7 @@ }, { "Input": "午前10時の予定を11時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -360,7 +360,7 @@ }, { "Input": "午前10時の予定を20時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -378,7 +378,7 @@ }, { "Input": "午前10時の予定を13時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -396,7 +396,7 @@ }, { "Input": "午前10時の予定を0時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -414,7 +414,7 @@ }, { "Input": "午前10時の予定を24時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -432,7 +432,7 @@ }, { "Input": "午前10時の予定を4時に変更しますが、どうでしょうか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -462,7 +462,7 @@ }, { "Input": "午前10時の予定を26時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -498,7 +498,7 @@ }, { "Input": "午前10時の予定を25時に変更します。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時", @@ -588,7 +588,7 @@ }, { "Input": "2016年11月は不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月", @@ -600,7 +600,7 @@ }, { "Input": "2016年11月", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2016年11月", @@ -708,7 +708,7 @@ }, { "Input": "今日から2日後のご都合はいかがでしょうか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2日後", @@ -720,7 +720,7 @@ }, { "Input": "明日から3週間のご都合はいかがでしょうか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日から3週間", @@ -732,7 +732,7 @@ }, { "Input": "昨日の2日前、あなたはどこにいましたか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昨日の2日前", @@ -744,7 +744,7 @@ }, { "Input": "今日から2週間以上前にもうすべての仕事を終えた。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2週間以上前", @@ -756,7 +756,7 @@ }, { "Input": "今日から2週間以内に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日から2週間以内", @@ -768,7 +768,7 @@ }, { "Input": "この仕事は昨日の2日以上前には終わらせておくべきだった。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昨日の2日以上前", @@ -780,7 +780,7 @@ }, { "Input": "この仕事は明日から3日以内に終わらせます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "明日から3日以内", @@ -792,7 +792,7 @@ }, { "Input": "今から3分後に始めましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今から3分後", @@ -804,7 +804,7 @@ }, { "Input": "今日から3分始めましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "今日", @@ -846,7 +846,7 @@ }, { "Input": "これは2日間です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日間", diff --git a/Specs/DateTime/Japanese/MergedParser.json b/Specs/DateTime/Japanese/MergedParser.json index 65ee094ae2..5d84ad5222 100644 --- a/Specs/DateTime/Japanese/MergedParser.json +++ b/Specs/DateTime/Japanese/MergedParser.json @@ -89,7 +89,7 @@ "Context": { "ReferenceDateTime": "2020-01-05T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "午前10時", @@ -128,7 +128,7 @@ "Context": { "ReferenceDateTime": "2020-01-05T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "午前10時", @@ -167,7 +167,7 @@ "Context": { "ReferenceDateTime": "2020-01-05T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "午前10時", diff --git a/Specs/DateTime/Japanese/SetExtractor.json b/Specs/DateTime/Japanese/SetExtractor.json index ecc835785b..912754866e 100644 --- a/Specs/DateTime/Japanese/SetExtractor.json +++ b/Specs/DateTime/Japanese/SetExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "毎週出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週", @@ -13,7 +13,7 @@ }, { "Input": "毎日出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎日", @@ -25,7 +25,7 @@ }, { "Input": "毎月出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎月", @@ -37,7 +37,7 @@ }, { "Input": "毎年出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎年", @@ -49,7 +49,7 @@ }, { "Input": "2日ごとに出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "2日ごとに", @@ -61,7 +61,7 @@ }, { "Input": "3週間ごとに出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3週間ごとに", @@ -73,7 +73,7 @@ }, { "Input": "毎日午後3時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎日午後3時", @@ -85,7 +85,7 @@ }, { "Input": "毎年4月15日に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎年4月15日", @@ -97,7 +97,7 @@ }, { "Input": "毎週月曜日に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週月曜日", @@ -109,7 +109,7 @@ }, { "Input": "毎週月曜日午後4時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週月曜日午後4時", @@ -121,7 +121,7 @@ }, { "Input": "毎朝出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎朝", @@ -133,7 +133,7 @@ }, { "Input": "毎朝9時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎朝9時", @@ -145,7 +145,7 @@ }, { "Input": "毎日午後4時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎日午後4時", @@ -157,7 +157,7 @@ }, { "Input": "毎晩9時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎晩9時", @@ -169,7 +169,7 @@ }, { "Input": "各午前9時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "各午前9時", @@ -181,7 +181,7 @@ }, { "Input": "毎週日曜日午前9時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週日曜日午前9時", @@ -193,7 +193,7 @@ }, { "Input": "毎週月曜日午前9時に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週月曜日午前9時", @@ -205,7 +205,7 @@ }, { "Input": "毎週日曜日に出発する。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週日曜日", @@ -217,7 +217,7 @@ }, { "Input": "毎週日曜日午後八時に事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎週日曜日午後八時", @@ -229,7 +229,7 @@ }, { "Input": "毎週日曜日事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎週日曜日", @@ -241,7 +241,7 @@ }, { "Input": "毎日事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎日", @@ -253,7 +253,7 @@ }, { "Input": "毎週事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎週", @@ -265,7 +265,7 @@ }, { "Input": "毎月事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎月", @@ -277,7 +277,7 @@ }, { "Input": "毎年事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎年", diff --git a/Specs/DateTime/Japanese/SetParser.json b/Specs/DateTime/Japanese/SetParser.json index 7dca9c662e..00fe26fece 100644 --- a/Specs/DateTime/Japanese/SetParser.json +++ b/Specs/DateTime/Japanese/SetParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2744475+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎週", @@ -28,7 +28,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2754476+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "隔週", @@ -52,7 +52,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2779449+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎日", @@ -76,7 +76,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2794445+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎日", @@ -100,7 +100,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2829445+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎月", @@ -124,7 +124,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2844439+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎年", @@ -148,7 +148,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.2854444+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎年", @@ -340,7 +340,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.3429518+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎朝", @@ -364,7 +364,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.3609535+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎朝9時", @@ -412,7 +412,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.3840706+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "各晩9時", @@ -436,7 +436,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.3930718+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎晩9時", @@ -460,7 +460,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.4065719+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "各午前9時", @@ -484,7 +484,7 @@ "Context": { "ReferenceDateTime": "2017-09-27T12:25:54.4170727+03:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "毎午前9時", @@ -691,7 +691,7 @@ }, { "Input": "毎日事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎日", @@ -712,7 +712,7 @@ }, { "Input": "毎週事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎週", @@ -733,7 +733,7 @@ }, { "Input": "毎月事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎月", @@ -754,7 +754,7 @@ }, { "Input": "毎年事件が起こる", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "毎年", diff --git a/Specs/DateTime/Japanese/TimeExtractor.json b/Specs/DateTime/Japanese/TimeExtractor.json index e2fb7021b2..17546c47f7 100644 --- a/Specs/DateTime/Japanese/TimeExtractor.json +++ b/Specs/DateTime/Japanese/TimeExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "7時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時", @@ -13,7 +13,7 @@ }, { "Input": "午後7時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時", @@ -25,7 +25,7 @@ }, { "Input": "午後7時56分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時56分", @@ -37,7 +37,7 @@ }, { "Input": "午後7時56分35秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時56分35秒", @@ -49,7 +49,7 @@ }, { "Input": "12時34分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12時34分", @@ -61,7 +61,7 @@ }, { "Input": "12時34分20秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12時34分20秒", @@ -73,7 +73,7 @@ }, { "Input": "00時00分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "00時00分", @@ -85,7 +85,7 @@ }, { "Input": "00時00分30秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "00時00分30秒", @@ -97,7 +97,7 @@ }, { "Input": "7時です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時", @@ -109,7 +109,7 @@ }, { "Input": "朝の8時です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝の8時", @@ -121,7 +121,7 @@ }, { "Input": "夜の8時です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の8時", @@ -133,7 +133,7 @@ }, { "Input": "8時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時半", @@ -145,7 +145,7 @@ }, { "Input": "午後8時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後8時半", @@ -157,7 +157,7 @@ }, { "Input": "8時30分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時30分", @@ -169,7 +169,7 @@ }, { "Input": "8時15分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時15分", @@ -181,7 +181,7 @@ }, { "Input": "午後9時45分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後9時45分", @@ -193,7 +193,7 @@ }, { "Input": "8時3分前です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時3分前", @@ -205,7 +205,7 @@ }, { "Input": "7時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時半", @@ -217,7 +217,7 @@ }, { "Input": "午後7時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時半", @@ -229,7 +229,7 @@ }, { "Input": "朝の7時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝の7時半", @@ -241,7 +241,7 @@ }, { "Input": "朝の8時15分前です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝の8時15分前", @@ -253,7 +253,7 @@ }, { "Input": "夜の8時20分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の8時20分", @@ -265,7 +265,7 @@ }, { "Input": "午後の7時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後の7時", @@ -277,7 +277,7 @@ }, { "Input": "午後7時00分14秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時00分14秒", @@ -289,7 +289,7 @@ }, { "Input": "午後7時30分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時30分", @@ -301,7 +301,7 @@ }, { "Input": "午後7時35分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時35分", @@ -313,7 +313,7 @@ }, { "Input": "11時5分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時5分", @@ -325,7 +325,7 @@ }, { "Input": "5時27分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5時27分", @@ -337,7 +337,7 @@ }, { "Input": "夜の5時30分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の5時30分", @@ -349,7 +349,7 @@ }, { "Input": "正午ごろ戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午", @@ -361,7 +361,7 @@ }, { "Input": "正午に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午", @@ -373,7 +373,7 @@ }, { "Input": "昼の12時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼の12時", @@ -385,7 +385,7 @@ }, { "Input": "11時ごろ戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時", @@ -397,7 +397,7 @@ }, { "Input": "午後3時40分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時40分", @@ -409,7 +409,7 @@ }, { "Input": "午前11時40分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前11時40分", @@ -421,7 +421,7 @@ }, { "Input": "真夜中", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "真夜中", @@ -433,7 +433,7 @@ }, { "Input": "午前半ば", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前半ば", @@ -445,7 +445,7 @@ }, { "Input": "午後3時ごろ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時", @@ -457,7 +457,7 @@ }, { "Input": "正午", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午", @@ -469,7 +469,7 @@ }, { "Input": "午前7時56分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前7時56分", @@ -481,7 +481,7 @@ }, { "Input": "午前7時56分35秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前7時56分35秒", @@ -493,17 +493,17 @@ }, { "Input": "表題がpなのは、どのメールですか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "どのメールに返信がきましたか。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "正午の昼食時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午の昼食時", @@ -515,7 +515,7 @@ }, { "Input": "昼食時の正午に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼食時の正午", @@ -527,7 +527,7 @@ }, { "Input": "私は午後9時がいいです。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後9時", @@ -539,7 +539,7 @@ }, { "Input": "私は午前9時がいいです。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前9時", @@ -551,7 +551,7 @@ }, { "Input": "午後9時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後9時", @@ -563,7 +563,7 @@ }, { "Input": "午前9時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前9時", @@ -576,7 +576,7 @@ { "Input": "この品の値段は1.6714です。", "Comment": "1 shouldn't recognized as time here", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { @@ -593,7 +593,7 @@ }, { "Input": "今日十時ぐらい以降、マイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "十時ぐらい", @@ -617,7 +617,7 @@ }, { "Input": "今日夜二時半にマイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜二時半", @@ -629,7 +629,7 @@ }, { "Input": "今日午後十一時半にマイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後十一時半", @@ -641,7 +641,7 @@ }, { "Input": "今日十一時四十五分にマイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "十一時四十五分", @@ -653,7 +653,7 @@ }, { "Input": "今日夜十時頃以降、マイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜十時頃", @@ -677,7 +677,7 @@ }, { "Input": "今日朝十時ぐらい、マイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝十時ぐらい", @@ -689,7 +689,7 @@ }, { "Input": "今日夜19:30にマイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜19:30", @@ -701,7 +701,7 @@ }, { "Input": "今日夜9:30にマイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜9:30", @@ -725,7 +725,7 @@ }, { "Input": "今日朝十一時にマイクロソフトビルの入り口で会いましょう", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝十一時", diff --git a/Specs/DateTime/Japanese/TimeParser.json b/Specs/DateTime/Japanese/TimeParser.json index df595ef75b..3097cb1f43 100644 --- a/Specs/DateTime/Japanese/TimeParser.json +++ b/Specs/DateTime/Japanese/TimeParser.json @@ -1,7 +1,7 @@ [ { "Input": "アラームを8時40分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時40分", @@ -22,7 +22,7 @@ }, { "Input": "アラームを午前8時40分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前8時40分", @@ -43,7 +43,7 @@ }, { "Input": "アラームを午後8時40分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後8時40分", @@ -64,7 +64,7 @@ }, { "Input": "アラームを10時45分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10時45分", @@ -85,7 +85,7 @@ }, { "Input": "アラームを午後15時15分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後15時15分", @@ -106,7 +106,7 @@ }, { "Input": "アラームを午後15時30分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後15時30分", @@ -127,7 +127,7 @@ }, { "Input": "アラームを10時10分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10時10分", @@ -148,7 +148,7 @@ }, { "Input": "アラームを午後10時55分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時55分", @@ -169,7 +169,7 @@ }, { "Input": "7時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時", @@ -190,7 +190,7 @@ }, { "Input": "午後7時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時", @@ -211,7 +211,7 @@ }, { "Input": "午後7時56分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時56分", @@ -232,7 +232,7 @@ }, { "Input": "午後7時56分30秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時56分30秒", @@ -253,7 +253,7 @@ }, { "Input": "12時34分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12時34分", @@ -274,7 +274,7 @@ }, { "Input": "12時34分25秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12時34分25秒", @@ -295,7 +295,7 @@ }, { "Input": "7時です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時", @@ -316,7 +316,7 @@ }, { "Input": "朝の8時です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝の8時", @@ -337,7 +337,7 @@ }, { "Input": "夜の8時です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の8時", @@ -358,7 +358,7 @@ }, { "Input": "8時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時半", @@ -379,7 +379,7 @@ }, { "Input": "午後8時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後8時半", @@ -400,7 +400,7 @@ }, { "Input": "8時30分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時30分", @@ -421,7 +421,7 @@ }, { "Input": "8時15分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時15分", @@ -442,7 +442,7 @@ }, { "Input": "午後9時45分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後9時45分", @@ -463,7 +463,7 @@ }, { "Input": "8時3分前です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時3分前", @@ -484,7 +484,7 @@ }, { "Input": "7時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時半", @@ -505,7 +505,7 @@ }, { "Input": "午後7時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時半", @@ -526,7 +526,7 @@ }, { "Input": "朝の7時半です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝の7時半", @@ -547,7 +547,7 @@ }, { "Input": "朝の8時15分前です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝の8時15分前", @@ -568,7 +568,7 @@ }, { "Input": "夜の8時20分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の8時20分", @@ -589,7 +589,7 @@ }, { "Input": "午後の7時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後の7時", @@ -610,7 +610,7 @@ }, { "Input": "午後7時00分05秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時00分05秒", @@ -631,7 +631,7 @@ }, { "Input": "午後7時30分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時30分", @@ -652,7 +652,7 @@ }, { "Input": "午後7時35分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時35分", @@ -673,7 +673,7 @@ }, { "Input": "午後11時20分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後11時20分", @@ -694,7 +694,7 @@ }, { "Input": "正午ごろ戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午", @@ -715,7 +715,7 @@ }, { "Input": "正午12時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午12時", @@ -736,7 +736,7 @@ }, { "Input": "11時ごろ戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時", @@ -757,7 +757,7 @@ }, { "Input": "午後3時40分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時40分", @@ -778,7 +778,7 @@ }, { "Input": "午前11時40分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前11時40分", @@ -799,7 +799,7 @@ }, { "Input": "真夜中", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "真夜中", @@ -820,7 +820,7 @@ }, { "Input": "午前半ば", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前半ば", @@ -841,7 +841,7 @@ }, { "Input": "午後3時ごろ", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時", @@ -862,7 +862,7 @@ }, { "Input": "正午", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午", @@ -883,7 +883,7 @@ }, { "Input": "昼食時の12時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼食時の12時", @@ -904,7 +904,7 @@ }, { "Input": "夜中の12時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜中の12時", @@ -925,7 +925,7 @@ }, { "Input": "夜の12時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の12時", @@ -946,7 +946,7 @@ }, { "Input": "夜中の1時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜中の1時", @@ -967,7 +967,7 @@ }, { "Input": "昼食時の11時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼食時の11時", @@ -988,7 +988,7 @@ }, { "Input": "昼食時の1時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼食時の1時", @@ -1009,7 +1009,7 @@ }, { "Input": "11時の昼食時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時の昼食時", @@ -1030,7 +1030,7 @@ }, { "Input": "午後7時56分13秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時56分13秒", @@ -1051,7 +1051,7 @@ }, { "Input": "12時34分45秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "12時34分45秒", @@ -1072,7 +1072,7 @@ }, { "Input": "午後7時25秒に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後7時25秒", @@ -1093,7 +1093,7 @@ }, { "Input": "午前7時30分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前7時30分", @@ -1114,7 +1114,7 @@ }, { "Input": "11時5分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時5分", @@ -1135,7 +1135,7 @@ }, { "Input": "5時27分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5時27分", @@ -1156,7 +1156,7 @@ }, { "Input": "夜の5時30分に戻ります。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜の5時30分", @@ -1177,7 +1177,7 @@ }, { "Input": "正午に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午", @@ -1198,7 +1198,7 @@ }, { "Input": "正午の昼食時に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "正午の昼食時", @@ -1219,7 +1219,7 @@ }, { "Input": "7時1分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "7時1分", @@ -1240,7 +1240,7 @@ }, { "Input": "午後10時10分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時10分", @@ -1261,7 +1261,7 @@ }, { "Input": "午後10時13分に戻ってきます。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時13分", @@ -1285,7 +1285,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "朝十時ぐらい", @@ -1309,7 +1309,7 @@ "Context": { "ReferenceDateTime": "2019-08-19T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "夜八時", @@ -1333,7 +1333,7 @@ "Context": { "ReferenceDateTime": "2019-08-09T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "朝8時", @@ -1357,7 +1357,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "午後五時", @@ -1381,7 +1381,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "朝11時", @@ -1405,7 +1405,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "夜十時ぐらい", @@ -1429,7 +1429,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "未明二時半", @@ -1453,7 +1453,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "夜19:30", @@ -1477,7 +1477,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "午後十一時半", @@ -1501,7 +1501,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "十時頃", @@ -1525,7 +1525,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "零時かっきり", @@ -1549,7 +1549,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "夜9:30", @@ -1573,7 +1573,7 @@ "Context": { "ReferenceDateTime": "2019-08-19T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "朝八時", @@ -1597,7 +1597,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "零時", @@ -1618,7 +1618,7 @@ }, { "Input": "8時3分です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8時3分", @@ -1639,7 +1639,7 @@ }, { "Input": "アラームを25時40分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "25時40分", @@ -1660,7 +1660,7 @@ }, { "Input": "アラームを26時45分にセットして。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "26時45分", @@ -1681,7 +1681,7 @@ }, { "Input": "私は8:00:24pmに戻ります", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "8:00:24pm", diff --git a/Specs/DateTime/Japanese/TimePeriodExtractor.json b/Specs/DateTime/Japanese/TimePeriodExtractor.json index 7578b1dbb0..a6d079735a 100644 --- a/Specs/DateTime/Japanese/TimePeriodExtractor.json +++ b/Specs/DateTime/Japanese/TimePeriodExtractor.json @@ -1,7 +1,7 @@ [ { "Input": "午後5時から6時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から6時まで", @@ -13,7 +13,7 @@ }, { "Input": "午前5時から7時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前5時から7時まで", @@ -25,7 +25,7 @@ }, { "Input": "午後5時から6時の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から6時の間", @@ -37,7 +37,7 @@ }, { "Input": "午後5時から午後6時の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から午後6時の間", @@ -49,7 +49,7 @@ }, { "Input": "午後4時から午後5時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から午後5時まで", @@ -61,7 +61,7 @@ }, { "Input": "午後4時から5時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から5時まで", @@ -73,7 +73,7 @@ }, { "Input": "4時から7時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4時から7時まで", @@ -85,7 +85,7 @@ }, { "Input": "午後3時から7時半まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時から7時半まで", @@ -97,7 +97,7 @@ }, { "Input": "午後3時20分から8時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時20分から8時まで", @@ -109,7 +109,7 @@ }, { "Input": "午後4時から5時半まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から5時半まで", @@ -121,7 +121,7 @@ }, { "Input": "午前3時から午後5時まで不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前3時から午後5時まで", @@ -133,7 +133,7 @@ }, { "Input": "午後4時から5時半の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から5時半の間", @@ -145,7 +145,7 @@ }, { "Input": "午前3時から午後5時の間、不在にします。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前3時から午後5時の間", @@ -157,7 +157,7 @@ }, { "Input": "午前中に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前中", @@ -169,7 +169,7 @@ }, { "Input": "午後に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後に", @@ -181,7 +181,7 @@ }, { "Input": "夜に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜に", @@ -193,7 +193,7 @@ }, { "Input": "早朝に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "早朝に", @@ -205,7 +205,7 @@ }, { "Input": "昼前に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼前に", @@ -217,7 +217,7 @@ }, { "Input": "昼すぎに会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼すぎに", @@ -229,7 +229,7 @@ }, { "Input": "夕方前に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夕方前に", @@ -241,7 +241,7 @@ }, { "Input": "夕方に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夕方に", @@ -253,7 +253,7 @@ }, { "Input": "深夜に会いましょう。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "深夜に", @@ -265,7 +265,7 @@ }, { "Input": "午後2時から5時まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後2時から5時まで", @@ -277,7 +277,7 @@ }, { "Input": "午後6時から11時までジャンのパーティー", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後6時から11時まで", @@ -289,7 +289,7 @@ }, { "Input": "14時から16時30分まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "14時から16時30分まで", @@ -301,7 +301,7 @@ }, { "Input": "午後1時から4時まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時から4時まで", @@ -313,7 +313,7 @@ }, { "Input": "午後1時30分から4時まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から4時まで", @@ -325,12 +325,12 @@ }, { "Input": "午後1時30分から4人の会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [] }, { "Input": "こんにちはコルタナ。ジェニファーとスカイプ会議の予定を入れてください。私が出発する今週の金曜日午後に30分の会議が必要です。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後に", @@ -342,7 +342,7 @@ }, { "Input": "1時30分から3時30分まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1時30分から3時30分まで", @@ -354,7 +354,7 @@ }, { "Input": "午後1時30分から3時30分まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から3時30分まで", @@ -366,7 +366,7 @@ }, { "Input": "午後1時30分から午後3時30分まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から午後3時30分まで", @@ -378,7 +378,7 @@ }, { "Input": "1時から3時30分まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1時から3時30分まで", @@ -390,7 +390,7 @@ }, { "Input": "1時30分から3時まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1時30分から3時まで", @@ -402,7 +402,7 @@ }, { "Input": "10時から11時30分の間で会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10時から11時30分の間", @@ -414,7 +414,7 @@ }, { "Input": "午前10時10分から12時50分の間で会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時10分から12時50分の間", @@ -426,7 +426,7 @@ }, { "Input": "午後10時10分から3時の間で会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時10分から3時の間", @@ -438,7 +438,7 @@ }, { "Input": "午後10時10分から10時まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時10分から10時まで", @@ -450,7 +450,7 @@ }, { "Input": "午前10時半から23時まで会議を設定して。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時半から23時まで", @@ -462,7 +462,7 @@ }, { "Input": "営業時間内に電話をかけてこないで。", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "営業時間内に", @@ -474,7 +474,7 @@ }, { "Input": "深夜20時~早朝4時", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "深夜20時~早朝4時", @@ -486,7 +486,7 @@ }, { "Input": "午後2時~4時", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後2時~4時", @@ -498,7 +498,7 @@ }, { "Input": "午後五時から六時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後五時から六時まで", @@ -510,7 +510,7 @@ }, { "Input": "午後5時から6時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から6時まで", @@ -522,7 +522,7 @@ }, { "Input": "夜9時30分から午前3時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜9時30分から午前3時まで", @@ -534,7 +534,7 @@ }, { "Input": "午後", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後", @@ -546,7 +546,7 @@ }, { "Input": "深夜12時から未明2時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "深夜12時から未明2時まで", @@ -558,7 +558,7 @@ }, { "Input": "午後四時から夜八時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後四時から夜八時まで", @@ -570,7 +570,7 @@ }, { "Input": "昼", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼", @@ -582,7 +582,7 @@ }, { "Input": "午後五時半から六時半まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後五時半から六時半まで", @@ -594,7 +594,7 @@ }, { "Input": "午前", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前", @@ -606,7 +606,7 @@ }, { "Input": "夜", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜", @@ -618,7 +618,7 @@ }, { "Input": "午前8時45分から9時30分", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前8時45分から9時30分", @@ -630,7 +630,7 @@ }, { "Input": "早朝四時から六時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "早朝四時から六時まで", @@ -642,7 +642,7 @@ }, { "Input": "4時から6時まで", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4時から6時まで", @@ -654,7 +654,7 @@ }, { "Input": "早朝四時から六時までの間", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "早朝四時から六時までの間", diff --git a/Specs/DateTime/Japanese/TimePeriodParser.json b/Specs/DateTime/Japanese/TimePeriodParser.json index b45cc93ec6..65ba6b26a5 100644 --- a/Specs/DateTime/Japanese/TimePeriodParser.json +++ b/Specs/DateTime/Japanese/TimePeriodParser.json @@ -4,7 +4,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から6時まで", @@ -30,7 +30,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前5時から7時まで", @@ -56,7 +56,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から6時の間", @@ -82,7 +82,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後5時から午後6時の間", @@ -108,7 +108,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前1時から午後5時まで", @@ -134,7 +134,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から午後5時まで", @@ -160,7 +160,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から5時まで", @@ -186,7 +186,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4時から7時まで", @@ -212,7 +212,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前3時から午後5時まで", @@ -238,7 +238,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前3時から午後5時の間", @@ -265,7 +265,7 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "'今日の' shouldn't be annotated by TimePeriodParser", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後4時から午後5時の間", @@ -291,7 +291,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前中", @@ -317,7 +317,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後に", @@ -343,7 +343,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜に", @@ -369,7 +369,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "早朝に", @@ -396,7 +396,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼前に", @@ -423,7 +423,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "早朝に", @@ -450,7 +450,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼すぎに", @@ -477,7 +477,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夕方前に", @@ -504,7 +504,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夕方に", @@ -531,7 +531,7 @@ "ReferenceDateTime": "2016-11-07T16:12:00" }, "Comment": "TBD: Need to find 'early evening' in Japanese. 深夜 is night.", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "深夜に", @@ -557,7 +557,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時から4時まで", @@ -583,7 +583,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から4時まで", @@ -609,7 +609,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前中", @@ -635,7 +635,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前1時30分から3時まで", @@ -661,7 +661,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前11時から3時まで", @@ -687,7 +687,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後11時から3時まで", @@ -713,7 +713,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後11時1分から11時まで", @@ -739,7 +739,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前11時1分から11時まで", @@ -765,7 +765,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前11時から11時50分まで", @@ -791,7 +791,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から3時30分まで", @@ -817,7 +817,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から午後3時30分まで", @@ -843,7 +843,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後3時から午後3時30分まで", @@ -869,7 +869,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前0時1分から午後1時まで", @@ -895,7 +895,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前0時1分から1時まで", @@ -921,7 +921,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "3時から3時30分まで", @@ -947,7 +947,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "1時30分から3時まで", @@ -973,7 +973,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後1時30分から3時まで", @@ -999,7 +999,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時から午後3時まで", @@ -1025,7 +1025,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "11時から午前3時まで", @@ -1051,7 +1051,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時から11時まで", @@ -1077,7 +1077,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23時から午前3時まで", @@ -1103,7 +1103,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "23時から午後3時まで", @@ -1129,7 +1129,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "10時から11時30分の間", @@ -1155,7 +1155,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時10分から12時50分の間", @@ -1181,7 +1181,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時10分から3時の間", @@ -1207,7 +1207,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後10時10分から10時まで", @@ -1233,7 +1233,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前10時半から23時まで", @@ -1259,7 +1259,7 @@ "Context": { "ReferenceDateTime": "2017-12-01T13:37:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "営業時間内に", @@ -1285,7 +1285,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "17時55分23秒から18時33分02秒まで", @@ -1311,7 +1311,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後五時から午前三時まで", @@ -1337,7 +1337,7 @@ "Context": { "ReferenceDateTime": "2018-10-11T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "夜", @@ -1363,7 +1363,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後五時から夜七時半まで", @@ -1389,7 +1389,7 @@ "Context": { "ReferenceDateTime": "2018-10-11T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "昼", @@ -1415,7 +1415,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後五時から6時まで", @@ -1441,7 +1441,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5時から6時まで", @@ -1467,7 +1467,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "朝五時から六時まで", @@ -1493,7 +1493,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "五時半から六時まで", @@ -1519,7 +1519,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "17:55:23から18:33:02まで", @@ -1545,7 +1545,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後五時十五分から六時まで", @@ -1571,7 +1571,7 @@ "Context": { "ReferenceDateTime": "2018-10-11T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午前", @@ -1597,7 +1597,7 @@ "Context": { "ReferenceDateTime": "2018-10-11T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "午後", @@ -1623,7 +1623,7 @@ "Context": { "ReferenceDateTime": "2018-10-11T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "日中", @@ -1649,7 +1649,7 @@ "Context": { "ReferenceDateTime": "2017-03-22T00:00:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "5時から午後6時まで", @@ -1675,7 +1675,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4時から25時まで", @@ -1701,7 +1701,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "4時から26時まで", @@ -1727,7 +1727,7 @@ "Context": { "ReferenceDateTime": "2016-11-07T16:12:00" }, - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "Results": [ { "Text": "26時から30時まで", diff --git a/Specs/DateTime/Portuguese/DatePeriodExtractor.json b/Specs/DateTime/Portuguese/DatePeriodExtractor.json index 4859aaad1c..ca285f5629 100644 --- a/Specs/DateTime/Portuguese/DatePeriodExtractor.json +++ b/Specs/DateTime/Portuguese/DatePeriodExtractor.json @@ -704,5 +704,29 @@ "Length": 36 } ] + }, + { + "Input": "Mostre-me os registros de agosto de 99", + "NotSupportedByDesign": "javascript", + "Results": [ + { + "Text": "agosto de 99", + "Type": "daterange", + "Start": 26, + "Length": 12 + } + ] + }, + { + "Input": "Mostre-me os registros de agosto de '99", + "NotSupportedByDesign": "javascript", + "Results": [ + { + "Text": "agosto de '99", + "Type": "daterange", + "Start": 26, + "Length": 13 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Portuguese/DatePeriodParser.json b/Specs/DateTime/Portuguese/DatePeriodParser.json index 6a47cd7f78..37e35cb0e3 100644 --- a/Specs/DateTime/Portuguese/DatePeriodParser.json +++ b/Specs/DateTime/Portuguese/DatePeriodParser.json @@ -1342,5 +1342,51 @@ "Length": 36 } ] + }, + { + "Input": "Mostre-me os registros de agosto de 99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "agosto de 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 26, + "Length": 12 + } + ] + }, + { + "Input": "Mostre-me os registros de agosto de '99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "agosto de '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 26, + "Length": 13 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Portuguese/DateTimeModel.json b/Specs/DateTime/Portuguese/DateTimeModel.json index 52eb4a9e82..1517d98ff1 100644 --- a/Specs/DateTime/Portuguese/DateTimeModel.json +++ b/Specs/DateTime/Portuguese/DateTimeModel.json @@ -3001,6 +3001,30 @@ } ] }, + { + "Input": "reunião para 00:00", + "Context": { + "ReferenceDateTime": "2023-05-14T12:00:00" + }, + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "00:00", + "Start": 13, + "End": 17, + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + } + } + ] + }, { "Input": "reunião para as 5 e 45", "Context": { diff --git a/Specs/DateTime/Spanish/DateExtractor.json b/Specs/DateTime/Spanish/DateExtractor.json index 2eea7681d3..75e62ca181 100644 --- a/Specs/DateTime/Spanish/DateExtractor.json +++ b/Specs/DateTime/Spanish/DateExtractor.json @@ -671,5 +671,31 @@ "Length": 19 } ] + }, + { + "Input": "quién fue el presidente el 23 del 5 del 91", + "NotSupported": "java", + "NotSupportedByDesign": "javascript", + "Results": [ + { + "Text": "23 del 5 del 91", + "Type": "date", + "Start": 27, + "Length": 15 + } + ] + }, + { + "Input": "quién fue el presidente el 23 de 5 de 91", + "NotSupported": "java", + "NotSupportedByDesign": "javascript", + "Results": [ + { + "Text": "23 de 5 de 91", + "Type": "date", + "Start": 27, + "Length": 13 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Spanish/DateParser.json b/Specs/DateTime/Spanish/DateParser.json index f51200712f..60171eab7c 100644 --- a/Specs/DateTime/Spanish/DateParser.json +++ b/Specs/DateTime/Spanish/DateParser.json @@ -1677,5 +1677,91 @@ "Length": 8 } ] + }, + { + "Input": "envíame un recibo por la compra hecha el 17 del 11", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "17 del 11", + "Type": "date", + "Value": { + "Timex": "XXXX-11-17", + "FutureResolution": { + "date": "2016-11-17" + }, + "PastResolution": { + "date": "2015-11-17" + } + }, + "Start": 41, + "Length": 9 + } + ] + }, + { + "Input": "reserva un hotel para el 21 del 3 en el marriott", + "Context": { + "ReferenceDateTime": "2016-11-07T00:00:00" + }, + "Results": [ + { + "Text": "21 del 3", + "Type": "date", + "Value": { + "Timex": "XXXX-03-21", + "FutureResolution": { + "date": "2017-03-21" + }, + "PastResolution": { + "date": "2016-03-21" + } + }, + "Start": 25, + "Length": 8 + } + ] + }, + { + "Input": "quién fue el presidente el 23 del 5 del 91", + "Results": [ + { + "Text": "23 del 5 del 91", + "Type": "date", + "Value": { + "Timex": "1991-05-23", + "FutureResolution": { + "date": "1991-05-23" + }, + "PastResolution": { + "date": "1991-05-23" + } + }, + "Start": 27, + "Length": 15 + } + ] + }, + { + "Input": "quién fue el presidente el 23 de 5 de 91", + "Results": [ + { + "Text": "23 de 5 de 91", + "Type": "date", + "Value": { + "Timex": "1991-05-23", + "FutureResolution": { + "date": "1991-05-23" + }, + "PastResolution": { + "date": "1991-05-23" + } + }, + "Start": 27, + "Length": 13 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Spanish/DatePeriodExtractor.json b/Specs/DateTime/Spanish/DatePeriodExtractor.json index 09a8a6e5e3..7f7f0e4d99 100644 --- a/Specs/DateTime/Spanish/DatePeriodExtractor.json +++ b/Specs/DateTime/Spanish/DatePeriodExtractor.json @@ -4691,5 +4691,29 @@ "Length": 19 } ] + }, + { + "Input": "Muéstrame los registros de agosto de 99", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "agosto de 99", + "Type": "daterange", + "Start": 27, + "Length": 12 + } + ] + }, + { + "Input": "Muéstrame los registros de agosto de '99", + "NotSupportedByDesign": "javascript,java", + "Results": [ + { + "Text": "agosto de '99", + "Type": "daterange", + "Start": 27, + "Length": 13 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Spanish/DatePeriodParser.json b/Specs/DateTime/Spanish/DatePeriodParser.json index 37ecbbfb92..0791e63e2d 100644 --- a/Specs/DateTime/Spanish/DatePeriodParser.json +++ b/Specs/DateTime/Spanish/DatePeriodParser.json @@ -7037,5 +7037,51 @@ "Length": 15 } ] + }, + { + "Input": "Muéstrame los registros de agosto de 99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "agosto de 99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 27, + "Length": 12 + } + ] + }, + { + "Input": "Muéstrame los registros de agosto de '99", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "agosto de '99", + "Type": "daterange", + "Value": { + "Timex": "1999-08", + "FutureResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + }, + "PastResolution": { + "startDate": "1999-08-01", + "endDate": "1999-09-01" + } + }, + "Start": 27, + "Length": 13 + } + ] } ] \ No newline at end of file diff --git a/Specs/DateTime/Spanish/DateTimeModel.json b/Specs/DateTime/Spanish/DateTimeModel.json index 952961732d..c84bad546b 100644 --- a/Specs/DateTime/Spanish/DateTimeModel.json +++ b/Specs/DateTime/Spanish/DateTimeModel.json @@ -3083,6 +3083,30 @@ } ] }, + { + "Input": "Regresaré a las 00:00", + "Context": { + "ReferenceDateTime": "2023-11-07T00:00:00" + }, + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "00:00", + "Start": 16, + "End": 20, + "TypeName": "datetimeV2.time", + "Resolution": { + "values": [ + { + "timex": "T00:00", + "type": "time", + "value": "00:00:00" + } + ] + } + } + ] + }, { "Input": "Regresaré a las 7:56:30 de la tarde", "Context": { @@ -11586,7 +11610,7 @@ "Context": { "ReferenceDateTime": "2019-01-25T12:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "lunes 21", @@ -11615,7 +11639,7 @@ "Context": { "ReferenceDateTime": "2019-01-21T12:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "lunes 21", @@ -11639,7 +11663,7 @@ "Context": { "ReferenceDateTime": "2019-01-25T12:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "domingo 31", @@ -11668,7 +11692,7 @@ "Context": { "ReferenceDateTime": "2019-02-25T12:00:00" }, - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "viernes 31", @@ -11692,6 +11716,35 @@ } ] }, + { + "Input": "¿Tienes algún arreglo para el sábado 30?", + "Context": { + "ReferenceDateTime": "2023-07-05T12:00:00" + }, + "NotSupportedByDesign": "javascript, java", + "Results": [ + { + "Text": "sábado 30", + "Start": 30, + "End": 38, + "TypeName": "datetimeV2.date", + "Resolution": { + "values": [ + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2022-07-30" + }, + { + "timex": "XXXX-WXX-6", + "type": "date", + "value": "2023-09-30" + } + ] + } + } + ] + }, { "Input": "¿Tienes algún plan después de medianos de mayo?", "Context": { diff --git a/Specs/Number/Arabic/NumberModel.json b/Specs/Number/Arabic/NumberModel.json index 91cf3910ce..df704a5f3e 100644 --- a/Specs/Number/Arabic/NumberModel.json +++ b/Specs/Number/Arabic/NumberModel.json @@ -2,7 +2,7 @@ { "Input": "تجده في الصفحة ال١٩٢", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١٩٢", @@ -91,7 +91,7 @@ { "Input": "وزنه ٠,٠٨", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٠,٠٨", @@ -108,7 +108,7 @@ { "Input": "وزنه ٠,٢٣٤٥٦", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٠,٢٣٤٥٦", @@ -125,7 +125,7 @@ { "Input": "مقاسه ٤,٨ .", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٤,٨", @@ -141,7 +141,7 @@ }, { "Input": "يوجد ستة عشر تفاحاً.", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "ستة عشر", @@ -175,7 +175,7 @@ { "Input": "مائة وستة عشر صفحة", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [ { "Text": "مائة وستة عشر", @@ -192,7 +192,7 @@ { "Input": "مائة وستة صفحات.", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [ { "Text": "مائة وستة", @@ -378,7 +378,7 @@ { "Input": "النتيجة الصحيحة ٩,٢٣٢١٣١٢ ", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٩,٢٣٢١٣١٢", @@ -412,7 +412,7 @@ { "Input": "-١", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-١", @@ -429,7 +429,7 @@ { "Input": "-١ ٤/٥", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-١ ٤/٥", @@ -445,7 +445,7 @@ }, { "Input": "لديها ثلاثة اقلام", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "ثلاثة", @@ -462,7 +462,7 @@ { "Input": "رقم الهاتف ١٢٣٤٥٦٧٨٩١٠١٢٣١", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١٢٣٤٥٦٧٨٩١٠١٢٣١", @@ -479,7 +479,7 @@ { "Input": "-١٢٣٤٥٦٧٨٩١٠١٢٣١", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-١٢٣٤٥٦٧٨٩١٠١٢٣١", @@ -496,7 +496,7 @@ { "Input": " -١٢٣٤٥٦٧٨٩١٠١٢٣١", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-١٢٣٤٥٦٧٨٩١٠١٢٣١", @@ -513,7 +513,7 @@ { "Input": "١", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١", @@ -530,7 +530,7 @@ { "Input": "عدد سكان ١ ترليون", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١ ترليون", @@ -546,7 +546,7 @@ }, { "Input": "في الحديقة ثلاثة اشجار", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "ثلاثة", @@ -580,7 +580,7 @@ { "Input": "عدد سكان المنطقة واحد وعشرون تريليون", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [ { "Text": "واحد وعشرون تريليون", @@ -597,7 +597,7 @@ { "Input": "عدد سكان المنطقة واحد وعشرون تريليون وثلاث مائة", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [ { "Text": "واحد وعشرون تريليون وثلاث مائة", @@ -631,7 +631,7 @@ { "Input": "تحتوي السلة على اثنين وخمسون فاكهة", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "اثنين وخمسون", @@ -648,7 +648,7 @@ { "Input": "يوجد في الغابة ثلاث مائة وواحد وثلاثون أشجار", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [ { "Text": "ثلاث مائة وواحد وثلاثون", @@ -750,7 +750,7 @@ { "Input": "٣/٤ الكأس", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [ { "Text": "٣/٤", @@ -1425,12 +1425,12 @@ }, { "Input": "حجزت رحلتي في درجة الأولى", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [] }, { "Input": "درجة الحرارة سالب واحد", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "سالب واحد", @@ -1560,7 +1560,7 @@ }, { "Input": "صفر هو٠", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "صفر", @@ -1587,7 +1587,7 @@ { "Input": "هل يوجد وقت في يوم ٥/١٧/٢٠١٨؟", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٥", @@ -1645,22 +1645,22 @@ }, { "Input": "الذي ذكرتها كان باطلا.", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [] }, { "Input": "الدي ذكرتها كانت غير صحيحة.", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [] }, { "Input": "أي واحد تفضل؟", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [] }, { "Input": "هذاك جيد حقا.", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java, xython", "Results": [] }, { @@ -1693,7 +1693,7 @@ { "Input": "ستة وعشرون شخص توفي في حادث في تيكمان.", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "ستة وعشرون", @@ -1726,7 +1726,7 @@ { "Input": "أريد أن اربح ١٠٠٠٠ دولار في ٣ سنوات.", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١٠٠٠٠", @@ -1753,7 +1753,7 @@ { "Input": "أريد أن ٢٠٠٠ دولار خلال ٣ سنوات.", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٢٠٠٠", @@ -1797,7 +1797,7 @@ { "Input": "$٢٠", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٢٠", @@ -1813,7 +1813,7 @@ }, { "Input": "الإجابة سالب واحد.", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "سالب واحد", @@ -1830,7 +1830,7 @@ { "Input": "-٤/٥", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-٤/٥", @@ -1931,7 +1931,7 @@ { "Input": "درجة الحرارة سالب ٥", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "سالب ٥", @@ -1948,7 +1948,7 @@ { "Input": "١ ٢٣٤ ٥٦٧", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١ ٢٣٤ ٥٦٧", @@ -1982,7 +1982,7 @@ { "Input": "الأرقام هي ١ ، ٢٣٤ ، ٥٦٧", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "١", @@ -2154,7 +2154,7 @@ { "Input": "يمكنني أن أعطيك ٣ مئة و ٢١ يوان", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "٣ مئة و ٢١", @@ -2340,7 +2340,7 @@ { "Input": "192.", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -2418,7 +2418,7 @@ { "Input": "السائل 180 مل", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -2435,7 +2435,7 @@ { "Input": " طريق 29 كم ", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -2452,7 +2452,7 @@ { "Input": " 4 مايو ", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -2492,7 +2492,7 @@ { "Input": "واحد", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -2509,7 +2509,7 @@ { "Input": "مفرد", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "Results": [] }, { @@ -2530,13 +2530,13 @@ ] }, { - "Input": "4.800", + "Input": "4,800", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { - "Text": "4.800", + "Text": "4,800", "TypeName": "number", "Resolution": { "value": "4.8" @@ -2617,7 +2617,7 @@ { "Input": "ستة عشر", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2651,7 +2651,7 @@ { "Input": "مائة و ستون", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2668,7 +2668,7 @@ { "Input": "مائة و واحد و ستون", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -2736,7 +2736,7 @@ { "Input": " 3 دستات", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2770,7 +2770,7 @@ { "Input": "ثلاثة دستات", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2785,13 +2785,13 @@ ] }, { - "Input": "1,234,567", + "Input": "1.234.567", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { - "Text": "1,234,567", + "Text": "1.234.567", "TypeName": "number", "Resolution": { "value": "1234567" @@ -2804,7 +2804,7 @@ { "Input": "1, 234, 567", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2837,13 +2837,13 @@ ] }, { - "Input": "9.2321312", + "Input": "9,2321312", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { - "Text": "9.2321312", + "Text": "9,2321312", "TypeName": "number", "Resolution": { "value": "9.2321312" @@ -2854,13 +2854,13 @@ ] }, { - "Input": " -9.2321312", + "Input": " -9,2321312", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { - "Text": "-9.2321312", + "Text": "-9,2321312", "TypeName": "number", "Resolution": { "value": "-9.2321312" @@ -2873,7 +2873,7 @@ { "Input": " -1", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2890,7 +2890,7 @@ { "Input": "-4/5", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2907,7 +2907,7 @@ { "Input": "- 1 4/5", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2924,7 +2924,7 @@ { "Input": "ثلاثة", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2941,7 +2941,7 @@ { "Input": " 123456789101231", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2958,7 +2958,7 @@ { "Input": "-123456789101231", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2975,7 +2975,7 @@ { "Input": "1", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -2992,7 +2992,7 @@ { "Input": " ثلاثة ", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3009,7 +3009,7 @@ { "Input": "تريليون", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3060,7 +3060,7 @@ { "Input": "اثنان و خمسون", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3077,7 +3077,7 @@ { "Input": "52", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3162,7 +3162,7 @@ { "Input": " 200 نقطة", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3213,7 +3213,7 @@ { "Input": " 322 مائة ", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3230,7 +3230,7 @@ { "Input": "سبعون", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3247,7 +3247,7 @@ { "Input": "2 1/4", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -3264,7 +3264,7 @@ { "Input": "3/4", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "NotSupported": "dotnet", "Results": [ { @@ -4165,7 +4165,7 @@ { "Input": "الجواب هو ناقص واحد", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4233,7 +4233,7 @@ { "Input": "الجواب هو سالب 5", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4318,7 +4318,7 @@ { "Input": "1 234 567", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4335,7 +4335,7 @@ { "Input": "40 000 هو نفس 40 000", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4361,7 +4361,7 @@ { "Input": "وفي الوقت الراهن، يبلغ عدد سكان الصين 1 414 021 100 نسمة.", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4378,7 +4378,7 @@ { "Input": "سيتم التعرف على 423 0000 كرقمين.", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4421,7 +4421,7 @@ { "Input": "صفر هو 0", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4447,7 +4447,7 @@ { "Input": "هل من وقت للاجتماع في 5/17/2018؟", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4482,7 +4482,7 @@ { "Input": "رقم هاتفي هو +1-222-2222/2222", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4526,7 +4526,7 @@ { "Input": "يمكنني أن أعطيك 10 مليون", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4543,13 +4543,13 @@ { "Input": "1M ليس رقما.", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "Results": [] }, { "Input": "يمكنني أن أعطيك 310 يوان", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4635,7 +4635,7 @@ { "Input": "300 و 212 رقمان صالحان", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4661,7 +4661,7 @@ { "Input": "300 و سالب واحد رقمان صالحان.", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4704,25 +4704,25 @@ { "Input": "الشخص الذي ذكرته غير صالح", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "Results": [] }, { "Input": "هذا غير صحيح", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "Results": [] }, { "Input": "أي شخص تفضل؟", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "Results": [] }, { "Input": "هذا جيد حقاً", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,xython,java", "Results": [] }, { @@ -4845,7 +4845,7 @@ { "Input": "مائة ألف", "Comment": "PendingValidation", - "NotSupportedByDesign": "javascript,python,java", + "NotSupportedByDesign": "javascript,java", "NotSupported": "dotnet", "Results": [ { @@ -4862,7 +4862,7 @@ { "Input": "25799‪,‪52", "Comment": "The input contains special character \u202A (Left To Right Embedding) around the decimal separator", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25799‪,‪52", @@ -4879,7 +4879,7 @@ { "Input": "26،013‪,94", "Comment": "The input contains special character \u202A (Left To Right Embedding) next to the decimal separator", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "26،013‪,94", @@ -4895,7 +4895,7 @@ }, { "Input": "12،220,13", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "12،220,13", diff --git a/Specs/Number/Arabic/PercentModel.json b/Specs/Number/Arabic/PercentModel.json index c2f37fed4e..31d2c4e01c 100644 --- a/Specs/Number/Arabic/PercentModel.json +++ b/Specs/Number/Arabic/PercentModel.json @@ -329,7 +329,7 @@ { "Input": "اثنين و عشرون بالمائة", "Comment": "PendingValidation", - "NotSupported": "dotnet", + "NotSupported": "dotnet,python", "Results": [ { "Text": "اثنين و عشرون بالمائة", diff --git a/Specs/Number/Catalan/NumberModel.json b/Specs/Number/Catalan/NumberModel.json new file mode 100644 index 0000000000..8c943d87fc --- /dev/null +++ b/Specs/Number/Catalan/NumberModel.json @@ -0,0 +1,192 @@ +[ + { + "Input": "192.", + "Results": [ + { + "Text": "192", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "192" + }, + "Start": 0, + "End": 2 + } + ] + }, + { + "Input": "setze", + "Results": [ + { + "Text": "setze", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "16" + }, + "Start": 0, + "End": 4 + } + ] + }, + { + "Input": "cent setze", + "Results": [ + { + "Text": "cent setze", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "116" + }, + "Start": 0, + "End": 9 + } + ] + }, + { + "Input": "cent sis", + "Results": [ + { + "Text": "cent sis", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "106" + }, + "Start": 0, + "End": 7 + } + ] + }, + { + "Input": "tres", + "Results": [ + { + "Text": "tres", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "3" + }, + "Start": 0, + "End": 3 + } + ] + }, + { + "Input": " 123456789101231", + "Results": [ + { + "Text": "123456789101231", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "123456789101231" + }, + "Start": 1, + "End": 15 + } + ] + }, + { + "Input": "1", + "Results": [ + { + "Text": "1", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "1" + }, + "Start": 0, + "End": 0 + } + ] + }, + { + "Input": "2 milions", + "Results": [ + { + "Text": "2 milions", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "2000000" + }, + "Start": 0, + "End": 8 + } + ] + }, + { + "Input": " tres ", + "Results": [ + { + "Text": "tres", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "3" + }, + "Start": 1, + "End": 4 + } + ] + }, + { + "Input": "cinquanta-dos", + "Results": [ + { + "Text": "cinquanta-dos", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "52" + }, + "Start": 0, + "End": 12 + } + ] + }, + { + "Input": "1 234 567", + "Results": [ + { + "Text": "1 234 567", + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "1234567" + }, + "Start": 0, + "End": 8 + } + ] + }, + { + "Input": "Vull guanyar 2000 dòlars durant 3 anys", + "Results": [ + { + "Text": "2000", + "Start": 13, + "End": 16, + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "2000" + } + }, + { + "Text": "3", + "Start": 32, + "End": 32, + "TypeName": "number", + "Resolution": { + "subtype": "integer", + "value": "3" + } + } + ] + } +] \ No newline at end of file diff --git a/Specs/Number/English/NumberModel.json b/Specs/Number/English/NumberModel.json index c616c3cc2d..e1ec272c92 100644 --- a/Specs/Number/English/NumberModel.json +++ b/Specs/Number/English/NumberModel.json @@ -1609,6 +1609,7 @@ ] }, { + "Input": "one over three", "Results": [ { diff --git a/Specs/Number/Japanese/NumberModel.json b/Specs/Number/Japanese/NumberModel.json index ffa9513c90..dec3a09ed4 100644 --- a/Specs/Number/Japanese/NumberModel.json +++ b/Specs/Number/Japanese/NumberModel.json @@ -975,7 +975,7 @@ }, { "Input": "2222.2222.22222.222", - "NotSupported": "javascript, python", + "NotSupported": "javascript", "Results": [ { "Text": "2222", @@ -1457,7 +1457,7 @@ { "Input": "答えは192です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "192", @@ -1493,7 +1493,7 @@ { "Input": "上昇率は0.23456000です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "0.23456000", @@ -1510,7 +1510,7 @@ { "Input": "この答えは4.800です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4.800", @@ -1527,7 +1527,7 @@ { "Input": "この算数の問題の答えは、103と3分の2です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "103と3分の2", @@ -1544,7 +1544,7 @@ { "Input": "倍率は16です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "16", @@ -1561,7 +1561,7 @@ { "Input": "宿題の3分の2が終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3分の2", @@ -1578,7 +1578,7 @@ { "Input": "答えは116です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "116", @@ -1595,7 +1595,7 @@ { "Input": "答えは106です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "106", @@ -1612,7 +1612,7 @@ { "Input": "今のWTOの加盟国は161です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "161", @@ -1663,7 +1663,7 @@ { "Input": "鉛筆を3ダース買いました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3ダース", @@ -1680,7 +1680,7 @@ { "Input": "ペンが1ダース千円で売られています。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1ダース", @@ -1716,7 +1716,7 @@ { "Input": "1,234,567は素数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1,234,567", @@ -1733,7 +1733,7 @@ { "Input": "1と234と567は有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1", @@ -1770,7 +1770,7 @@ { "Input": "答えは9.2321312です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "9.2321312", @@ -1855,7 +1855,7 @@ { "Input": "3は奇数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -1923,7 +1923,7 @@ { "Input": "1は最小の正の整数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1", @@ -1940,7 +1940,7 @@ { "Input": "答えは1万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1万", @@ -1957,7 +1957,7 @@ { "Input": "答えは10万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "10万", @@ -1974,7 +1974,7 @@ { "Input": "答えは100億です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100億", @@ -2008,7 +2008,7 @@ { "Input": "答えは200万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200万", @@ -2025,7 +2025,7 @@ { "Input": "答えは1兆です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1兆", @@ -2042,7 +2042,7 @@ { "Input": "3は素数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -2059,7 +2059,7 @@ { "Input": "答えは21兆です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21兆", @@ -2076,7 +2076,7 @@ { "Input": "答えは21兆300です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21兆300", @@ -2093,7 +2093,7 @@ { "Input": "331は奇数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "331", @@ -2110,7 +2110,7 @@ { "Input": "20万2000は実数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20万2000", @@ -2127,7 +2127,7 @@ { "Input": "2200は奇数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2200", @@ -2144,7 +2144,7 @@ { "Input": "200.03は小数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200.03", @@ -2161,7 +2161,7 @@ { "Input": "答えは200.71です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200.71", @@ -2216,7 +2216,7 @@ { "Input": "答えは3万2200です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3万2200", @@ -2233,7 +2233,7 @@ { "Input": "70は整数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "70", @@ -2250,7 +2250,7 @@ { "Input": "52は偶数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "52", @@ -2267,7 +2267,7 @@ { "Input": "答えは2と4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2と4分の1", @@ -2284,7 +2284,7 @@ { "Input": "答えは4分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4分の3", @@ -2301,7 +2301,7 @@ { "Input": "ピザを8分の1だけ食べました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の1", @@ -2318,7 +2318,7 @@ { "Input": "ケーキがまだ8分の5くらい残っています。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の5", @@ -2335,7 +2335,7 @@ { "Input": "水をバケツの4分の3入れます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4分の3", @@ -2352,7 +2352,7 @@ { "Input": "答えは20と5分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20と5分の3", @@ -2369,7 +2369,7 @@ { "Input": "5分の23は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の23", @@ -2386,7 +2386,7 @@ { "Input": "答えは23と5分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "23と5分の3", @@ -2420,7 +2420,7 @@ { "Input": "答えは1と2分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1と2分の1", @@ -2437,7 +2437,7 @@ { "Input": "答えは1と4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1と4分の1", @@ -2454,7 +2454,7 @@ { "Input": "答えは5と4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5と4分の1", @@ -2471,7 +2471,7 @@ { "Input": "答えは100と4分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100と4分の3", @@ -2488,7 +2488,7 @@ { "Input": "100分の1が答えです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100分の1", @@ -2657,7 +2657,7 @@ { "Input": "夏休みの宿題が5分の1終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の1", @@ -2691,7 +2691,7 @@ { "Input": "夏休みの宿題が5分の3終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の3", @@ -2708,7 +2708,7 @@ { "Input": "5分の20は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の20", @@ -2725,7 +2725,7 @@ { "Input": "3と5分の1は帯分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3と5分の1", @@ -2742,7 +2742,7 @@ { "Input": "5分の21は帯分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の21", @@ -2759,7 +2759,7 @@ { "Input": "答えは25分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25分の1", @@ -2776,7 +2776,7 @@ { "Input": "答えは21分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21分の3", @@ -2793,7 +2793,7 @@ { "Input": "25分の20はまだ約分できます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25分の20", @@ -2810,7 +2810,7 @@ { "Input": "答えは5分の130です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の130", @@ -2827,7 +2827,7 @@ { "Input": "答えは35分の100です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "35分の100", @@ -2844,7 +2844,7 @@ { "Input": "答えは5分の132です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の132", @@ -2861,7 +2861,7 @@ { "Input": "答えは130と5分の2です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "130と5分の2", @@ -2878,7 +2878,7 @@ { "Input": "答えは105分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "105分の1", @@ -2895,7 +2895,7 @@ { "Input": "答えは1005分の100です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1005分の100", @@ -2912,7 +2912,7 @@ { "Input": "答えは21分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21分の1", @@ -2946,7 +2946,7 @@ { "Input": "答えは3分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3分の1", @@ -2963,7 +2963,7 @@ { "Input": "答えは20分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20分の1", @@ -2980,7 +2980,7 @@ { "Input": "答えは100分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100分の1", @@ -2997,7 +2997,7 @@ { "Input": "答えは125分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "125分の1", @@ -3014,7 +3014,7 @@ { "Input": "5分の9500はいくつですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の9500", @@ -3133,7 +3133,7 @@ { "Input": "答えは4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4分の1", @@ -3150,7 +3150,7 @@ { "Input": "答えは8分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の1", @@ -3167,7 +3167,7 @@ { "Input": "答えは8分の5です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の5", @@ -3184,7 +3184,7 @@ { "Input": "4万と4万は同じです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4万", @@ -3211,7 +3211,7 @@ { "Input": "現在、中国の人口は14億1402万1100人です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "14億1402万1100", @@ -3228,7 +3228,7 @@ { "Input": "423 0000は2つの数値として認識されます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "423", @@ -3283,7 +3283,7 @@ { "Input": "0は0です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "0", @@ -3347,7 +3347,7 @@ { "Input": "私の電話番号は、プラス1の222の2222の2222です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1", @@ -3394,7 +3394,7 @@ { "Input": "私はあなたに1000万あげることができます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1000万", @@ -3411,7 +3411,7 @@ { "Input": "私はあなたに321元をあげることができます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "321", @@ -3428,7 +3428,7 @@ { "Input": "4321は有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4321", @@ -3445,7 +3445,7 @@ { "Input": "4300と0は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4300", @@ -3482,7 +3482,7 @@ { "Input": "4000と321は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4000", @@ -3519,7 +3519,7 @@ { "Input": "300と200は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "300", @@ -3593,7 +3593,7 @@ { "Input": "301は有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "301", @@ -3637,7 +3637,7 @@ { "Input": "テチマンで26人が事故死した。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "26", @@ -3654,7 +3654,7 @@ { "Input": "私は3年内に1万ドル稼ぎたいです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -3681,7 +3681,7 @@ { "Input": "私は3年で2000ドル稼ぎたいです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -3708,7 +3708,7 @@ { "Input": "3分の2000は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3分の2000", @@ -3725,7 +3725,7 @@ { "Input": "20ドルが必要です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20", @@ -3741,17 +3741,17 @@ }, { "Input": "このボトルには水が180.25ミリリットル入れられます。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "このボトルには水が180ミリリットル入れられます。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "会社から自宅までの距離は29キロメートルです。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { @@ -3774,7 +3774,7 @@ { "Input": "答えは192です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "192", @@ -3791,7 +3791,7 @@ { "Input": "私のパソコンのIPアドレスは192.168.1.2です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "192", @@ -3857,7 +3857,7 @@ { "Input": "上昇率は0.23456000です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "0.23456000", @@ -3874,7 +3874,7 @@ { "Input": "この答えは4.800です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4.800", @@ -3891,7 +3891,7 @@ { "Input": "この算数の問題の答えは、103と3分の2です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "103と3分の2", @@ -3908,7 +3908,7 @@ { "Input": "倍率は16です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "16", @@ -3925,7 +3925,7 @@ { "Input": "宿題の3分の2が終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3分の2", @@ -3942,7 +3942,7 @@ { "Input": "答えは116です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "116", @@ -3959,7 +3959,7 @@ { "Input": "答えは106です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "106", @@ -3976,7 +3976,7 @@ { "Input": "今のWTOの加盟国は161です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "161", @@ -4027,7 +4027,7 @@ { "Input": "鉛筆を3ダース買いました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3ダース", @@ -4044,7 +4044,7 @@ { "Input": "ペンが1ダース単位で売られています。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1ダース", @@ -4080,7 +4080,7 @@ { "Input": "1,234,567は素数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1,234,567", @@ -4097,7 +4097,7 @@ { "Input": "1, 234, 567は素数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1", @@ -4134,7 +4134,7 @@ { "Input": "答えは9.2321312です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "9.2321312", @@ -4151,7 +4151,7 @@ { "Input": "答えは-9.2321312です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-9.2321312", @@ -4168,7 +4168,7 @@ { "Input": "最大の負の整数は-1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-1", @@ -4185,7 +4185,7 @@ { "Input": "出生率は-5分の4です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-5分の4", @@ -4202,7 +4202,7 @@ { "Input": "答えは-1と5分の4です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-1と5分の4", @@ -4219,7 +4219,7 @@ { "Input": "3は奇数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -4236,7 +4236,7 @@ { "Input": "答えは123456789101231です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "123456789101231", @@ -4253,7 +4253,7 @@ { "Input": "答えは-123456789101231です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-123456789101231", @@ -4270,7 +4270,7 @@ { "Input": "答えは -123456789101231です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-123456789101231", @@ -4287,7 +4287,7 @@ { "Input": "1は最小の正の整数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1", @@ -4304,7 +4304,7 @@ { "Input": "答えは1万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1万", @@ -4321,7 +4321,7 @@ { "Input": "答えは10万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "10万", @@ -4338,7 +4338,7 @@ { "Input": "答えは100億です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100億", @@ -4355,7 +4355,7 @@ { "Input": "答え-1万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-1万", @@ -4372,7 +4372,7 @@ { "Input": "答えは200万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200万", @@ -4389,7 +4389,7 @@ { "Input": "答えは1兆です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1兆", @@ -4406,7 +4406,7 @@ { "Input": "3は素数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -4423,7 +4423,7 @@ { "Input": "答えは21兆です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21兆", @@ -4440,7 +4440,7 @@ { "Input": "答えは21兆300です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21兆300", @@ -4457,7 +4457,7 @@ { "Input": "331は奇数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "331", @@ -4474,7 +4474,7 @@ { "Input": "20万2000は実数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20万2000", @@ -4491,7 +4491,7 @@ { "Input": "2200は奇数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2200", @@ -4508,7 +4508,7 @@ { "Input": "200.03は小数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200.03", @@ -4525,7 +4525,7 @@ { "Input": "答えは200.71です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200.71", @@ -4580,7 +4580,7 @@ { "Input": "答えは3万2200です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3万2200", @@ -4597,7 +4597,7 @@ { "Input": "70は整数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "70", @@ -4614,7 +4614,7 @@ { "Input": "52は偶数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "52", @@ -4631,7 +4631,7 @@ { "Input": "答えは2と4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2と4分の1", @@ -4648,7 +4648,7 @@ { "Input": "答えは4分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4分の3", @@ -4665,7 +4665,7 @@ { "Input": "ピザを8分の1だけ食べました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の1", @@ -4682,7 +4682,7 @@ { "Input": "ケーキがまだ8分の5くらい残っています。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の5", @@ -4699,7 +4699,7 @@ { "Input": "水をバケツの4分の3入れます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4分の3", @@ -4716,7 +4716,7 @@ { "Input": "答えは20と5分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20と5分の3", @@ -4733,7 +4733,7 @@ { "Input": "5分の23は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の23", @@ -4750,7 +4750,7 @@ { "Input": "答えは23と5分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "23と5分の3", @@ -4784,7 +4784,7 @@ { "Input": "答えは1と2分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1と2分の1", @@ -4801,7 +4801,7 @@ { "Input": "答えは1と4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1と4分の1", @@ -4818,7 +4818,7 @@ { "Input": "答えは5と4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5と4分の1", @@ -4835,7 +4835,7 @@ { "Input": "答えは100と4分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100と4分の3", @@ -4852,7 +4852,7 @@ { "Input": "100分の1が答えです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100分の1", @@ -5021,7 +5021,7 @@ { "Input": "夏休みの宿題が5分の1終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の1", @@ -5055,7 +5055,7 @@ { "Input": "夏休みの宿題が5分の3終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の3", @@ -5072,7 +5072,7 @@ { "Input": "5分の20は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の20", @@ -5089,7 +5089,7 @@ { "Input": "3と5分の1は帯分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3と5分の1", @@ -5106,7 +5106,7 @@ { "Input": "5分の21は帯分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の21", @@ -5123,7 +5123,7 @@ { "Input": "答えは25分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25分の1", @@ -5140,7 +5140,7 @@ { "Input": "答えは21分の3です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21分の3", @@ -5157,7 +5157,7 @@ { "Input": "25分の20はまだ約分できます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25分の20", @@ -5174,7 +5174,7 @@ { "Input": "答えは5分の130です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の130", @@ -5191,7 +5191,7 @@ { "Input": "答えは35分の100です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "35分の100", @@ -5208,7 +5208,7 @@ { "Input": "答えは5分の132です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の132", @@ -5225,7 +5225,7 @@ { "Input": "答えは130と5分の2です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "130と5分の2", @@ -5242,7 +5242,7 @@ { "Input": "答えは105分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "105分の1", @@ -5259,7 +5259,7 @@ { "Input": "答えは1005分の100です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1005分の100", @@ -5293,7 +5293,7 @@ { "Input": "答えは3分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3分の1", @@ -5310,7 +5310,7 @@ { "Input": "答えは20分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20分の1", @@ -5327,7 +5327,7 @@ { "Input": "答えは100分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "100分の1", @@ -5344,7 +5344,7 @@ { "Input": "答えは125分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "125分の1", @@ -5361,7 +5361,7 @@ { "Input": "5分の9500はいくつですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "5分の9500", @@ -5378,7 +5378,7 @@ { "Input": "答えは-5分の9500です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-5分の9500", @@ -5395,7 +5395,7 @@ { "Input": "答えは-1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-1", @@ -5412,7 +5412,7 @@ { "Input": "答えは-35分の100です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-35分の100", @@ -5446,7 +5446,7 @@ { "Input": "答えは-5.5です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-5.5", @@ -5463,7 +5463,7 @@ { "Input": "答えは-5です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "-5", @@ -5480,7 +5480,7 @@ { "Input": "答えは4分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4分の1", @@ -5497,7 +5497,7 @@ { "Input": "答えは8分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の1", @@ -5514,7 +5514,7 @@ { "Input": "答えは21分の1です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21分の1", @@ -5531,7 +5531,7 @@ { "Input": "答えは8分の5です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "8分の5", @@ -5548,7 +5548,7 @@ { "Input": "答えは1234567です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1234567", @@ -5565,7 +5565,7 @@ { "Input": "4万と4万は同じです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4万", @@ -5592,7 +5592,7 @@ { "Input": "現在、中国の人口は14億1402万1100人です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "14億1402万1100", @@ -5609,7 +5609,7 @@ { "Input": "423 0000は二つの数値として認識されます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "423", @@ -5663,7 +5663,7 @@ { "Input": "0は0です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "0", @@ -5690,7 +5690,7 @@ { "Input": "2018年5月17日にいつでも会えますか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2018", @@ -5727,7 +5727,7 @@ { "Input": "私の電話番号は、プラス1の222の2222の2222です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1", @@ -5774,7 +5774,7 @@ { "Input": "私はあなたに1000万あげることができます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1000万", @@ -5791,7 +5791,7 @@ { "Input": "私はあなたに321元をあげることができます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "321", @@ -5808,7 +5808,7 @@ { "Input": "4321は有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4321", @@ -5825,7 +5825,7 @@ { "Input": "4300と0は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4300", @@ -5862,7 +5862,7 @@ { "Input": "4000と321は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "4000", @@ -5899,7 +5899,7 @@ { "Input": "300と200は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "300", @@ -5936,7 +5936,7 @@ { "Input": "300と-1は2つの有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "300", @@ -5973,7 +5973,7 @@ { "Input": "301は有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "301", @@ -6017,7 +6017,7 @@ { "Input": "テチマンで26人が事故死した。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "26", @@ -6034,7 +6034,7 @@ { "Input": "私は3年以内に1万ドル稼ぎたいです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -6061,7 +6061,7 @@ { "Input": "私は3年で2000ドル稼ぎたいです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3", @@ -6088,7 +6088,7 @@ { "Input": "3分の2000は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "3分の2000", @@ -6105,7 +6105,7 @@ { "Input": "20ドルが必要です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20", @@ -6121,17 +6121,17 @@ }, { "Input": "このボトルには水が180.25ミリリットル入れられます。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "このボトルには水が180ミリリットル入れられます。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "会社から自宅までの距離は29キロメートルです。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { @@ -6143,18 +6143,18 @@ }, { "Input": "毎日この薬を0.25 ミリリットル飲んでください。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "1メートルは数字ではありません。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "答えは百九十二です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百九十二", @@ -6222,7 +6222,7 @@ { "Input": "この算数の問題の答えは、百三と三分の二です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百三と三分の二", @@ -6239,7 +6239,7 @@ { "Input": "倍率は十六です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "十六", @@ -6256,7 +6256,7 @@ { "Input": "宿題の三分の二が終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三分の二", @@ -6273,7 +6273,7 @@ { "Input": "答えは百十六です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百十六", @@ -6290,7 +6290,7 @@ { "Input": "答えは百六です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百六", @@ -6307,7 +6307,7 @@ { "Input": "今のWTOの加盟国は百六十一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百六十一", @@ -6324,7 +6324,7 @@ { "Input": "一兆分の一の大きさは目に見えません", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一兆分の一", @@ -6341,7 +6341,7 @@ { "Input": "百億分の一の大きさは目にみえないです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百億分の一", @@ -6358,7 +6358,7 @@ { "Input": "桃を半ダース買いました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "半ダース", @@ -6375,7 +6375,7 @@ { "Input": "鉛筆を三ダース買いました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三ダース", @@ -6392,7 +6392,7 @@ { "Input": "ペンが一ダース千円で売られています。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一ダース", @@ -6426,7 +6426,7 @@ { "Input": "百二十三万四千五百六十七は素数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百二十三万四千五百六十七", @@ -6443,7 +6443,7 @@ { "Input": "一と二百三十四と五百六十七は有効な数字です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一", @@ -6514,7 +6514,7 @@ { "Input": "最大の負の整数はマイナス一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス一", @@ -6531,7 +6531,7 @@ { "Input": "出生率はマイナス五分の四です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス五分の四", @@ -6548,7 +6548,7 @@ { "Input": "答えはマイナス一と五分の四です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス一と五分の四", @@ -6565,7 +6565,7 @@ { "Input": "三は奇数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三", @@ -6582,7 +6582,7 @@ { "Input": "一は最小の正の整数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一", @@ -6599,7 +6599,7 @@ { "Input": "答えは一万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一万", @@ -6616,7 +6616,7 @@ { "Input": "答えは十万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "十万", @@ -6633,7 +6633,7 @@ { "Input": "答えは百億です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百億", @@ -6650,7 +6650,7 @@ { "Input": "答えはマイナス一万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス一万", @@ -6667,7 +6667,7 @@ { "Input": "答えは二百万です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二百万", @@ -6684,7 +6684,7 @@ { "Input": "答えは一兆です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一兆", @@ -6701,7 +6701,7 @@ { "Input": "三は素数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三", @@ -6718,7 +6718,7 @@ { "Input": "答えは二十一兆です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十一兆", @@ -6735,7 +6735,7 @@ { "Input": "答えは二十一兆三百です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十一兆三百", @@ -6752,7 +6752,7 @@ { "Input": "三百三十一は奇数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三百三十一", @@ -6769,7 +6769,7 @@ { "Input": "二十万二千は実数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十万二千", @@ -6786,7 +6786,7 @@ { "Input": "二千二百は奇数ではありません。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二千二百", @@ -6875,7 +6875,7 @@ { "Input": "答えは三万二千二百です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三万二千二百", @@ -6892,7 +6892,7 @@ { "Input": "七十は整数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "七十", @@ -6909,7 +6909,7 @@ { "Input": "五十二は偶数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五十二", @@ -6926,7 +6926,7 @@ { "Input": "答えは二と四分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二と四分の一", @@ -6943,7 +6943,7 @@ { "Input": "答えは四分の三です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "四分の三", @@ -6960,7 +6960,7 @@ { "Input": "ピザを八分の一だけ食べました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "八分の一", @@ -6977,7 +6977,7 @@ { "Input": "ケーキがまだ八分の五くらい残っています。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "八分の五", @@ -7013,7 +7013,7 @@ { "Input": "水をバケツの四分の三入れます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "四分の三", @@ -7030,7 +7030,7 @@ { "Input": "答えは二十と五分の三です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十と五分の三", @@ -7047,7 +7047,7 @@ { "Input": "五分の二十三は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の二十三", @@ -7064,7 +7064,7 @@ { "Input": "答えは二十三と五分の三です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十三と五分の三", @@ -7098,7 +7098,7 @@ { "Input": "答えは一と二分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一と二分の一", @@ -7115,7 +7115,7 @@ { "Input": "答えは一と四分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一と四分の一", @@ -7132,7 +7132,7 @@ { "Input": "答えは五と四分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五と四分の一", @@ -7149,7 +7149,7 @@ { "Input": "答えは百と四分の三です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百と四分の三", @@ -7166,7 +7166,7 @@ { "Input": "百分の一が答えです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百分の一", @@ -7335,7 +7335,7 @@ { "Input": "夏休みの宿題が五分の一終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の一", @@ -7369,7 +7369,7 @@ { "Input": "夏休みの宿題が五分の三終わりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の三", @@ -7386,7 +7386,7 @@ { "Input": "五分の二十は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の二十", @@ -7403,7 +7403,7 @@ { "Input": "三と五分の一は帯分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三と五分の一", @@ -7420,7 +7420,7 @@ { "Input": "五分の二十一は帯分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の二十一", @@ -7437,7 +7437,7 @@ { "Input": "答えは二十五分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十五分の一", @@ -7454,7 +7454,7 @@ { "Input": "答えは二十一分の三です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十一分の三", @@ -7471,7 +7471,7 @@ { "Input": "二十五分の二十はまだ約分できます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十五分の二十", @@ -7488,7 +7488,7 @@ { "Input": "答えは五分の百三十です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の百三十", @@ -7522,7 +7522,7 @@ { "Input": "答えは五分の百三十二です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の百三十二", @@ -7539,7 +7539,7 @@ { "Input": "答えは百三十と五分の二です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百三十と五分の二", @@ -7556,7 +7556,7 @@ { "Input": "答えは百五分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百五分の一", @@ -7573,7 +7573,7 @@ { "Input": "答えは千五分の百です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "千五分の百", @@ -7590,7 +7590,7 @@ { "Input": "答えは百二十一分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百二十一分の一", @@ -7607,7 +7607,7 @@ { "Input": "答えは三分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三分の一", @@ -7624,7 +7624,7 @@ { "Input": "答えは二十分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十分の一", @@ -7641,7 +7641,7 @@ { "Input": "答えは百分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百分の一", @@ -7658,7 +7658,7 @@ { "Input": "答えは百二十五分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百二十五分の一", @@ -7675,7 +7675,7 @@ { "Input": "五分の九千五百はいくつですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "五分の九千五百", @@ -7692,7 +7692,7 @@ { "Input": "答えはマイナス五分の九千五百です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス五分の九千五百", @@ -7709,7 +7709,7 @@ { "Input": "答えはマイナス一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス一", @@ -7726,7 +7726,7 @@ { "Input": "答えはマイナス三十五分の百です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス三十五分の百", @@ -7777,7 +7777,7 @@ { "Input": "答えはマイナス五です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "マイナス五", @@ -7794,7 +7794,7 @@ { "Input": "答えは四分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "四分の一", @@ -7811,7 +7811,7 @@ { "Input": "答えは八分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "八分の一", @@ -7828,7 +7828,7 @@ { "Input": "答えは二十一分の一です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十一分の一", @@ -7845,7 +7845,7 @@ { "Input": "答えは八分の五です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "八分の五", @@ -7862,7 +7862,7 @@ { "Input": "答えは百二十三万四千五百六十七です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百二十三万四千五百六十七", @@ -7879,7 +7879,7 @@ { "Input": "四万と四万は同じです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "四万", @@ -7978,7 +7978,7 @@ { "Input": "〇は〇です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "〇", @@ -8089,7 +8089,7 @@ { "Input": "私はあなたに一千万あげることができます。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一千万", @@ -8332,7 +8332,7 @@ { "Input": "テチマンで二十六人が事故死した。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十六", @@ -8368,7 +8368,7 @@ { "Input": "私は三年以内に一万ドル稼ぎたいです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三", @@ -8395,7 +8395,7 @@ { "Input": "私は三年で二千ドル稼ぎたいです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三", @@ -8422,7 +8422,7 @@ { "Input": "三分の二千は仮分数です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三分の二千", @@ -8439,7 +8439,7 @@ { "Input": "二十ドルが必要です。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "二十", @@ -8490,32 +8490,32 @@ }, { "Input": "シアトルへのファーストクラスの席を予約してください。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "一メートルは数字ではありません。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "あなたが言及したものは無効です。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "これはあなたが間違っています。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "どちらをあなたが準備しますか。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { "Input": "あれは本当にいいです。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [] }, { @@ -8550,7 +8550,7 @@ }, { "Input": "2.5", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "2.5", @@ -8565,7 +8565,7 @@ }, { "Input": "400.5", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "400.5", @@ -8580,7 +8580,7 @@ }, { "Input": "答えは四ではなくて、五です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "四", @@ -8604,7 +8604,7 @@ }, { "Input": "このコンピューターは二ドルです。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [] }, { @@ -8654,7 +8654,7 @@ }, { "Input": "五十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "五十", @@ -8684,7 +8684,7 @@ }, { "Input": "四百五十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "四百五十", @@ -8699,7 +8699,7 @@ }, { "Input": "9年8トン", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "9", @@ -8738,7 +8738,7 @@ }, { "Input": "これは5で、あれは4です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5", @@ -8804,7 +8804,7 @@ }, { "Input": "百九十九個", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "百九十九", @@ -8824,7 +8824,7 @@ }, { "Input": "マイナス3分のマイナス百五十七", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス3分のマイナス百五十七", @@ -8839,7 +8839,7 @@ }, { "Input": "1001", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1001", @@ -8854,7 +8854,7 @@ }, { "Input": "45642万15", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "45642万15", @@ -8869,7 +8869,7 @@ }, { "Input": "45億4004万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "45億4004万", @@ -8884,7 +8884,7 @@ }, { "Input": "4千万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4千万", @@ -8929,7 +8929,7 @@ }, { "Input": "千五十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "千五十", @@ -8944,7 +8944,7 @@ }, { "Input": "十万七千八百五十四", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "十万七千八百五十四", @@ -9027,7 +9027,7 @@ }, { "Input": "1万250", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1万250", @@ -9042,7 +9042,7 @@ }, { "Input": "二千三百五十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "二千三百五十", @@ -9057,7 +9057,7 @@ }, { "Input": "9百万4百", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "9百万4百", @@ -9072,7 +9072,7 @@ }, { "Input": "3896万4965", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "3896万4965", @@ -9112,7 +9112,7 @@ }, { "Input": "20万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "20万", @@ -9142,7 +9142,7 @@ }, { "Input": "54600", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "54600", @@ -9157,7 +9157,7 @@ }, { "Input": "4005万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4005万", @@ -9172,7 +9172,7 @@ }, { "Input": "五分の一", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "五分の一", @@ -9187,7 +9187,7 @@ }, { "Input": "四百六十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "四百六十", @@ -9217,7 +9217,7 @@ }, { "Input": "これは5ではなく、201です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5", @@ -9241,7 +9241,7 @@ }, { "Input": "25分の1014", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "25分の1014", @@ -9276,7 +9276,7 @@ }, { "Input": "1234万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1234万", @@ -9291,7 +9291,7 @@ }, { "Input": "105千万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "105千万", @@ -9306,7 +9306,7 @@ }, { "Input": "15.7", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "15.7", @@ -9321,7 +9321,7 @@ }, { "Input": "40万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "40万", @@ -9336,7 +9336,7 @@ }, { "Input": "4000万6000", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4000万6000", @@ -9408,7 +9408,7 @@ }, { "Input": "6足", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "6", @@ -9471,7 +9471,7 @@ }, { "Input": "150", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "150", @@ -9501,7 +9501,7 @@ }, { "Input": "十億六万五百六", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "十億六万五百六", @@ -9516,7 +9516,7 @@ }, { "Input": "9万4百", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "9万4百", @@ -9546,7 +9546,7 @@ }, { "Input": "10012.15", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10012.15", @@ -9566,7 +9566,7 @@ }, { "Input": "十六万五百六", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "十六万五百六", @@ -9581,7 +9581,7 @@ }, { "Input": "マイナス405億404万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス405億404万", @@ -9596,7 +9596,7 @@ }, { "Input": "4004万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4004万", @@ -9635,7 +9635,7 @@ }, { "Input": "100056", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "100056", @@ -9650,7 +9650,7 @@ }, { "Input": "十足", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "十", @@ -9665,7 +9665,7 @@ }, { "Input": "千六百", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "千六百", @@ -9695,7 +9695,7 @@ }, { "Input": "四十四", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "四十四", @@ -9710,7 +9710,7 @@ }, { "Input": "2.2億", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "2.2億", @@ -9725,7 +9725,7 @@ }, { "Input": "15", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "15", @@ -9769,7 +9769,7 @@ }, { "Input": "101万1000", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "101万1000", @@ -9814,7 +9814,7 @@ }, { "Input": "3/5", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "3/5", @@ -9829,7 +9829,7 @@ }, { "Input": "6,544", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "6,544", @@ -9886,7 +9886,7 @@ }, { "Input": "10012", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10012", @@ -9901,7 +9901,7 @@ }, { "Input": "10足", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10", @@ -10012,7 +10012,7 @@ }, { "Input": "50ダース", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "50ダース", @@ -10057,7 +10057,7 @@ }, { "Input": "明ちゃんは指が10本あります。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10", @@ -10072,7 +10072,7 @@ }, { "Input": "九万四千", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "九万四千", @@ -10087,7 +10087,7 @@ }, { "Input": "1050", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1050", @@ -10102,7 +10102,7 @@ }, { "Input": "3足", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "3", @@ -10117,7 +10117,7 @@ }, { "Input": "10", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10", @@ -10132,7 +10132,7 @@ }, { "Input": "10250", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10250", @@ -10147,7 +10147,7 @@ }, { "Input": "マイナス45億404万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス45億404万", @@ -10162,7 +10162,7 @@ }, { "Input": "152", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "152", @@ -10177,7 +10177,7 @@ }, { "Input": "1,234,567", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1,234,567", @@ -10192,7 +10192,7 @@ }, { "Input": "7万5千4百", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "7万5千4百", @@ -10207,7 +10207,7 @@ }, { "Input": "75400", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "75400", @@ -10222,7 +10222,7 @@ }, { "Input": "4,565", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4,565", @@ -10237,7 +10237,7 @@ }, { "Input": "0.5", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "0.5", @@ -10287,7 +10287,7 @@ }, { "Input": "100分の2", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "100分の2", @@ -10302,7 +10302,7 @@ }, { "Input": "二千四百五十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "二千四百五十", @@ -10317,7 +10317,7 @@ }, { "Input": "0.23456", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "0.23456", @@ -10332,7 +10332,7 @@ }, { "Input": "数量は一ではないですが、五です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "一", @@ -10356,7 +10356,7 @@ }, { "Input": "マイナス10012", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス10012", @@ -10371,7 +10371,7 @@ }, { "Input": "16分の5", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "16分の5", @@ -10386,7 +10386,7 @@ }, { "Input": "10018.15", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10018.15", @@ -10451,7 +10451,7 @@ }, { "Input": "これは四川ではなく、五です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "五", @@ -10466,7 +10466,7 @@ }, { "Input": "900万400", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "900万400", @@ -10511,7 +10511,7 @@ }, { "Input": "16万506", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "16万506", @@ -10526,7 +10526,7 @@ }, { "Input": "1000万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1000万", @@ -10541,7 +10541,7 @@ }, { "Input": "マイナス3分のマイナス157", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス3分のマイナス157", @@ -10672,7 +10672,7 @@ }, { "Input": "130", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "130", @@ -10687,7 +10687,7 @@ }, { "Input": "450", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "450", @@ -10798,7 +10798,7 @@ }, { "Input": "1005", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1005", @@ -10813,7 +10813,7 @@ }, { "Input": "百万四", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "百万四", @@ -10852,7 +10852,7 @@ }, { "Input": "答えは四で、五ではないです。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "四", @@ -10876,7 +10876,7 @@ }, { "Input": "十億", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "十億", @@ -10911,7 +10911,7 @@ }, { "Input": "4.78兆", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4.78兆", @@ -10956,7 +10956,7 @@ }, { "Input": "五億六", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "五億六", @@ -11019,7 +11019,7 @@ }, { "Input": "4万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4万", @@ -11049,7 +11049,7 @@ }, { "Input": "10万56", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10万56", @@ -11079,7 +11079,7 @@ }, { "Input": "百五十二", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "百五十二", @@ -11147,7 +11147,7 @@ }, { "Input": "400余り", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "400", @@ -11162,7 +11162,7 @@ }, { "Input": "12", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "12", @@ -11177,7 +11177,7 @@ }, { "Input": "78万506", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "78万506", @@ -11222,7 +11222,7 @@ }, { "Input": "100対", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "100", @@ -11237,7 +11237,7 @@ }, { "Input": "九百九十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "九百九十", @@ -11252,7 +11252,7 @@ }, { "Input": "4000万6千", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4000万6千", @@ -11267,7 +11267,7 @@ }, { "Input": "1万12", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1万12", @@ -11297,7 +11297,7 @@ }, { "Input": "16分の2225", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "16分の2225", @@ -11317,7 +11317,7 @@ }, { "Input": "250", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "250", @@ -11332,7 +11332,7 @@ }, { "Input": "百五十", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "百五十", @@ -11347,7 +11347,7 @@ }, { "Input": "1000004", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1000004", @@ -11362,7 +11362,7 @@ }, { "Input": "4兆", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4兆", @@ -11377,7 +11377,7 @@ }, { "Input": "2.7890e-1", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "2.7890e-1", @@ -11422,7 +11422,7 @@ }, { "Input": "5億6", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5億6", @@ -11437,7 +11437,7 @@ }, { "Input": "マイナス10", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス10", @@ -11452,7 +11452,7 @@ }, { "Input": "三分の百五十七", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "三分の百五十七", @@ -11467,7 +11467,7 @@ }, { "Input": "50対のイヤリング", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "50", @@ -11482,7 +11482,7 @@ }, { "Input": "これは一ではなくて、9台です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "一", @@ -11506,7 +11506,7 @@ }, { "Input": "2300.1", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "2300.1", @@ -11551,7 +11551,7 @@ }, { "Input": "10ダースのリンゴ", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10ダース", @@ -11566,7 +11566,7 @@ }, { "Input": "45622", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "45622", @@ -11581,7 +11581,7 @@ }, { "Input": "3分の157", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "3分の157", @@ -11596,7 +11596,7 @@ }, { "Input": "マイナス32", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス32", @@ -11668,7 +11668,7 @@ }, { "Input": "六", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "六", @@ -11703,7 +11703,7 @@ }, { "Input": "500分の2333", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "500分の2333", @@ -11718,7 +11718,7 @@ }, { "Input": "千二百三十四万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "千二百三十四万", @@ -11733,7 +11733,7 @@ }, { "Input": "3千9百65", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "3千9百65", @@ -11781,7 +11781,7 @@ }, { "Input": "150対", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "150", @@ -11796,7 +11796,7 @@ }, { "Input": "マイナス三十二", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス三十二", @@ -11811,7 +11811,7 @@ }, { "Input": "1万3千", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1万3千", @@ -11846,7 +11846,7 @@ }, { "Input": "マイナス一万", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス一万", @@ -11876,7 +11876,7 @@ }, { "Input": "1ダース", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1ダース", @@ -11891,7 +11891,7 @@ }, { "Input": "10斤", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10", @@ -11999,7 +11999,7 @@ }, { "Input": "11.92億", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "11.92億", @@ -12029,7 +12029,7 @@ }, { "Input": "5分の1", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5分の1", @@ -12044,7 +12044,7 @@ }, { "Input": "九十二万四千", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "九十二万四千", @@ -12074,7 +12074,7 @@ }, { "Input": "5,450", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5,450", @@ -12137,7 +12137,7 @@ }, { "Input": "靴下5足で9.9です。", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5", @@ -12161,7 +12161,7 @@ }, { "Input": "シングルランキングトップ3のブランド", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "3", @@ -12191,7 +12191,7 @@ }, { "Input": "七万五千四百", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "七万五千四百", @@ -12206,7 +12206,7 @@ }, { "Input": "二分の一", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "二分の一", @@ -12221,7 +12221,7 @@ }, { "Input": "4億", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "4億", @@ -12236,7 +12236,7 @@ }, { "Input": "9万400", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "9万400", @@ -12251,7 +12251,7 @@ }, { "Input": "100", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "100", @@ -12281,7 +12281,7 @@ }, { "Input": "マイナス三分のマイナス百五十七", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス三分のマイナス百五十七", @@ -12326,7 +12326,7 @@ }, { "Input": "2450", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "2450", @@ -12356,7 +12356,7 @@ }, { "Input": "五兆六十二億四万五千二百", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "五兆六十二億四万五千二百", @@ -12436,7 +12436,7 @@ }, { "Input": "九", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "九", @@ -12511,7 +12511,7 @@ }, { "Input": "5千2百36", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5千2百36", @@ -12526,7 +12526,7 @@ }, { "Input": "10億6万506", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "10億6万506", @@ -12699,7 +12699,7 @@ }, { "Input": "2,204.62", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "2,204.62", @@ -12729,7 +12729,7 @@ }, { "Input": "零", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "零", @@ -12744,7 +12744,7 @@ }, { "Input": "の総和は零となるため二次電流は流れず", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "零", @@ -12759,7 +12759,7 @@ }, { "Input": "0123", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "0123", @@ -12819,7 +12819,7 @@ }, { "Input": "零 一 二 三", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "零", @@ -12861,7 +12861,7 @@ }, { "Input": "零十", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "零十", @@ -12876,7 +12876,7 @@ }, { "Input": "零十三", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "零十三", @@ -12936,7 +12936,7 @@ }, { "Input": "にじゅうさん", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "にじゅうさん", @@ -12951,7 +12951,7 @@ }, { "Input": "きゅうじゅうなな", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "きゅうじゅうなな", @@ -13071,7 +13071,7 @@ }, { "Input": "いっせんまん さんぜんまん はっせんまん", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "いっせんまん", @@ -13137,7 +13137,7 @@ }, { "Input": "さんぜん はっせん", - "NotSupported": "javascript, java, python", + "NotSupported": "javascript, java", "Results": [ { "Text": "さんぜん", diff --git a/Specs/Number/Japanese/OrdinalModel.json b/Specs/Number/Japanese/OrdinalModel.json index 6322b88375..0b1cff29d3 100644 --- a/Specs/Number/Japanese/OrdinalModel.json +++ b/Specs/Number/Japanese/OrdinalModel.json @@ -1,7 +1,6 @@ [ { "Input": "だい12", - "NotSupported": "python", "Results": [ { "Text": "だい12", @@ -18,7 +17,6 @@ }, { "Input": "第二百五十", - "NotSupported": "python", "Results": [ { "Text": "第二百五十", @@ -35,7 +33,6 @@ }, { "Input": "だい二百五十", - "NotSupported": "python", "Results": [ { "Text": "だい二百五十", @@ -52,7 +49,6 @@ }, { "Input": "第250", - "NotSupported": "python", "Results": [ { "Text": "第250", @@ -69,7 +65,6 @@ }, { "Input": "だい250", - "NotSupported": "python", "Results": [ { "Text": "だい250", @@ -86,7 +81,6 @@ }, { "Input": "だい一億", - "NotSupported": "python", "Results": [ { "Text": "だい一億", @@ -103,7 +97,6 @@ }, { "Input": "第一億", - "NotSupported": "python", "Results": [ { "Text": "第一億", @@ -120,7 +113,6 @@ }, { "Input": "だい一万回だい十万回", - "NotSupported": "python", "Results": [ { "Text": "だい一万", @@ -198,7 +190,6 @@ }, { "Input": "第1位第2位第3位第4位", - "NotSupported": "python", "Results": [ { "Text": "第1", @@ -265,7 +256,6 @@ }, { "Input": "第三万回", - "NotSupported": "python", "Results": [ { "Text": "第三万", @@ -516,7 +506,7 @@ { "Input": "三兆番目の数字はなんですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "三兆番目", @@ -534,7 +524,7 @@ { "Input": "百兆番目の数字はなんですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "百兆番目", @@ -905,7 +895,7 @@ }, { "Input": "一兆番目の数字はなんですか。", - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "一兆番目", @@ -1014,7 +1004,7 @@ { "Input": "前から30番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "30番目", @@ -1032,7 +1022,7 @@ { "Input": "前から2番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2番目", @@ -1050,7 +1040,7 @@ { "Input": "前から20番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20番目", @@ -1068,7 +1058,7 @@ { "Input": "前から25番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25番目", @@ -1104,7 +1094,7 @@ { "Input": "200番目の数字はなんですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200番目", @@ -1140,7 +1130,7 @@ { "Input": "私は1番目のが好きです。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1番目", @@ -1158,7 +1148,7 @@ { "Input": "1番目の単語を話しなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1番目", @@ -1176,7 +1166,7 @@ { "Input": "彼女は2位になりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2位", @@ -1262,7 +1252,7 @@ { "Input": "前から11番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "11番目", @@ -1280,7 +1270,7 @@ { "Input": "前から21番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21番目", @@ -1298,7 +1288,7 @@ { "Input": "125番目の数字はなんですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "125番目", @@ -1407,7 +1397,7 @@ { "Input": "前から30番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "30番目", @@ -1425,7 +1415,7 @@ { "Input": "前から2番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2番目", @@ -1443,7 +1433,7 @@ { "Input": "前から20番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "20番目", @@ -1461,7 +1451,7 @@ { "Input": "前から25番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "25番目", @@ -1497,7 +1487,7 @@ { "Input": "200番目の数字はなんですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "200番目", @@ -1551,7 +1541,7 @@ { "Input": "1番目の単語を話しなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "1番目", @@ -1569,7 +1559,7 @@ { "Input": "彼女は2位になりました。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "2位", @@ -1655,7 +1645,7 @@ { "Input": "前から11番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "11番目", @@ -1673,7 +1663,7 @@ { "Input": "前から21番目の席に座りなさい。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "21番目", @@ -1691,7 +1681,7 @@ { "Input": "125番目の数字はなんですか。", "IgnoreResolution": true, - "NotSupportedByDesign": "javascript, java, python", + "NotSupportedByDesign": "javascript, java", "Results": [ { "Text": "125番目", diff --git a/Specs/Number/Japanese/PercentModel.json b/Specs/Number/Japanese/PercentModel.json index e512e93a89..9b29798b9d 100644 --- a/Specs/Number/Japanese/PercentModel.json +++ b/Specs/Number/Japanese/PercentModel.json @@ -16,7 +16,6 @@ }, { "Input": "この車は19パーセントの確率が遅れた", - "NotSupported": "python", "Results": [ { "Text": "19パーセント", @@ -31,7 +30,6 @@ }, { "Input": "彼女は50パーセントこのことはできません", - "NotSupported": "python", "Results": [ { "Text": "50パーセント", @@ -46,7 +44,6 @@ }, { "Input": "共有29.5パーセント", - "NotSupported": "python", "Results": [ { "Text": "29.5パーセント", @@ -61,7 +58,6 @@ }, { "Input": "彼は13,000.2パーセント告白失败", - "NotSupported": "python", "Results": [ { "Text": "13,000.2パーセント", @@ -76,7 +72,6 @@ }, { "Input": "彼は3500パーセント告白失败", - "NotSupported": "python", "Results": [ { "Text": "3500パーセント", @@ -91,7 +86,6 @@ }, { "Input": "僕2,100パーセント告白失败", - "NotSupported": "python", "Results": [ { "Text": "2,100パーセント", @@ -107,7 +101,6 @@ { "Input": "僕1,123パーセント告白失败", "Comment": "PendingValidation", - "NotSupported": "python", "Results": [ { "Text": "1,123パーセント", @@ -182,7 +175,6 @@ }, { "Input": "今日は9,999パ ーセ ントの確率で雪が降る", - "NotSupported": "python", "Results": [ { "Text": "9,999パ ーセ ント", @@ -197,7 +189,6 @@ }, { "Input": "2.4パーセント", - "NotSupported": "python", "Results": [ { "Text": "2.4パーセント", @@ -227,7 +218,6 @@ }, { "Input": "22%", - "NotSupported": "python", "Results": [ { "Text": "22%", @@ -257,7 +247,6 @@ }, { "Input": "22パーセント", - "NotSupported": "python", "Results": [ { "Text": "22パーセント", @@ -272,7 +261,6 @@ }, { "Input": "120パーセント", - "NotSupported": "python", "Results": [ { "Text": "120パーセント", @@ -302,7 +290,6 @@ }, { "Input": "1,111パーセント", - "NotSupported": "python", "Results": [ { "Text": "1,111パーセント", @@ -317,7 +304,6 @@ }, { "Input": "9,999パーセント", - "NotSupported": "python", "Results": [ { "Text": "9,999パーセント", @@ -332,7 +318,6 @@ }, { "Input": "56.2パーセント", - "NotSupported": "python", "Results": [ { "Text": "56.2パーセント", @@ -347,7 +332,6 @@ }, { "Input": "3.2パーセント", - "NotSupported": "python", "Results": [ { "Text": "3.2パーセント", @@ -362,7 +346,6 @@ }, { "Input": "12.56パーセント", - "NotSupported": "python", "Results": [ { "Text": "12.56パーセント", @@ -377,7 +360,6 @@ }, { "Input": "0.4パーセント", - "NotSupported": "python", "Results": [ { "Text": "0.4パーセント", @@ -392,7 +374,6 @@ }, { "Input": "15,123パーセント", - "NotSupported": "python", "Results": [ { "Text": "15,123パーセント", @@ -407,7 +388,6 @@ }, { "Input": "111,111パーセント", - "NotSupported": "python", "Results": [ { "Text": "111,111パーセント", @@ -437,7 +417,6 @@ }, { "Input": "5.5%", - "NotSupported": "python", "Results": [ { "Text": "5.5%", @@ -452,7 +431,6 @@ }, { "Input": "2.4パ ー セ ン ト", - "NotSupported": "python", "Results": [ { "Text": "2.4パ ー セ ン ト", @@ -467,7 +445,6 @@ }, { "Input": "52.5 k パ ー セ ン ト", - "NotSupported": "python", "Results": [ { "Text": "52.5 k パ ー セ ン ト", @@ -824,7 +801,7 @@ }, { "Input": "回答率は100%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "100%", @@ -839,7 +816,7 @@ }, { "Input": "ムンバイの電車の乗車率は240%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "240%", @@ -854,7 +831,7 @@ }, { "Input": "20%の人がパソコンを持っていません。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20%", @@ -869,7 +846,7 @@ }, { "Input": "30%の人が犬を飼っています。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "30%", @@ -884,7 +861,7 @@ }, { "Input": "10%の人がパスポートを持っていません。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "10%", @@ -899,7 +876,7 @@ }, { "Input": "私の体脂肪率は22%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22%", @@ -914,7 +891,7 @@ }, { "Input": "ムンバイのバスの乗車率は210%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "210%", @@ -944,7 +921,7 @@ }, { "Input": "回答率は100パーセントです。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "100パーセント", @@ -959,7 +936,7 @@ }, { "Input": "ムンバイの電車の乗車率は240パーセントです。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "240パーセント", @@ -974,7 +951,7 @@ }, { "Input": "20パーセントの人がパソコンを持っていません。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20パーセント", @@ -989,7 +966,7 @@ }, { "Input": "10パーセントの人がパスポートを持っていません。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "10パーセント", @@ -1004,7 +981,7 @@ }, { "Input": "私の体脂肪率は22パーセントです。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "22パーセント", @@ -1019,7 +996,7 @@ }, { "Input": "ムンバイのバスの乗車率は210パーセントです。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "210パーセント", @@ -1094,7 +1071,7 @@ }, { "Input": "この問題の回答率は100%だ。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "100%", @@ -1109,7 +1086,7 @@ }, { "Input": "今日の会議の出席率は20%だ。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20%", @@ -1124,7 +1101,7 @@ }, { "Input": "江戸川区のインド人の割合は10%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "10%", @@ -1139,17 +1116,17 @@ }, { "Input": "詳細については次のURLをご確認ください。 http://proquest.umi.com/pqdweb?RQT=305&SQ=issn%280024%2D9114%29%20and%20%28ti%28Using%203D%20CAD%20to%20design%20a%20dog%29%20or%20startpage%28158%29%29%20and%20volume%2872%29%20and%20issue%289%29%20and%20pdn%28%3E01%2F01%2F2000%20AND%20%3C12%2F31%2F2000%29&clientId=17859.", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "次のURLを参考にしてくだい。 https://www.test.com/search?q=30%25%2020%", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [] }, { "Input": "回答率は100%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "100%", @@ -1164,7 +1141,7 @@ }, { "Input": "ムンバイの電車の乗車率は240%です。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "240%", @@ -1179,7 +1156,7 @@ }, { "Input": "20%の人がパソコンを持っています。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "20%", @@ -1194,7 +1171,7 @@ }, { "Input": "10%の人がパソコンを持っています。", - "NotSupportedByDesign": "java, javascript, python", + "NotSupportedByDesign": "java, javascript", "Results": [ { "Text": "10%", @@ -1509,7 +1486,7 @@ }, { "Input": "25パーセント", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "25パーセント", @@ -1539,7 +1516,7 @@ }, { "Input": "二十~三十パーセント", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [] }, { @@ -1624,7 +1601,7 @@ }, { "Input": "僕1,123パーセント告白失败", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "1,123パーセント", @@ -2007,7 +1984,7 @@ }, { "Input": "100056.33パーセント", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "100056.33パーセント", @@ -2232,7 +2209,7 @@ }, { "Input": "5.50パーセント", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5.50パーセント", @@ -2492,7 +2469,7 @@ }, { "Input": "50%", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "50%", @@ -2929,7 +2906,7 @@ }, { "Input": "マイナス122%", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "マイナス122%", @@ -2959,7 +2936,7 @@ }, { "Input": "5パーセント", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "5パーセント", @@ -3096,7 +3073,7 @@ }, { "Input": "アルコール量が5から20パーセントの商品を探す", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "20パーセント", diff --git a/Specs/NumberWithUnit/Arabic/CurrencyModel.json b/Specs/NumberWithUnit/Arabic/CurrencyModel.json new file mode 100644 index 0000000000..79a7736461 --- /dev/null +++ b/Specs/NumberWithUnit/Arabic/CurrencyModel.json @@ -0,0 +1,130 @@ +[ + { + "Input": "أصبح زميله في فريق فولهام جوني هاينز أول لاعب بقيمة 100 جنيه إسترليني", + "Results": [ + { + "Text": "100 جنيه إسترليني", + "TypeName": "currency", + "Resolution": { + "value": "100", + "unit": "Egyptian pound" + }, + "Start": 52, + "End": 68 + } + ] + }, + { + "Input": "10 دولارات ليست كثيرة، 10 يورو", + "Results": [ + { + "Text": "10 يورو", + "Start": 23, + "End": 29, + "TypeName": "currency", + "Resolution": { + "unit": "Euro", + "value": "10" + } + } + ] + }, + { + "Input": "أرغب في شراء هذا المنتج مقابل 125 يورو.", + "Results": [ + { + "Text": "125 يورو", + "TypeName": "currency", + "Resolution": { + "value": "125", + "unit": "Euro", + "isoCurrency": "EUR" + }, + "Start": 30, + "End": 37 + } + ] + }, + { + "Input": "التذاكر: 5 يورو، 10 يورو، 20 يورو، 50 يورو، 100 يورو، 200 يورو، 500 يورو.", + "Results": [ + { + "Text": "5 يورو", + "Start": 9, + "End": 14, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "5" + } + }, + { + "Text": "10 يورو", + "Start": 17, + "End": 23, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "10" + } + }, + { + "Text": "20 يورو", + "Start": 26, + "End": 32, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "20" + } + }, + { + "Text": "50 يورو", + "Start": 35, + "End": 41, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "50" + } + }, + { + "Text": "100 يورو", + "Start": 44, + "End": 51, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "100" + } + }, + { + "Text": "200 يورو", + "Start": 54, + "End": 61, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "200" + } + }, + { + "Text": "500 يورو", + "Start": 64, + "End": 71, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "500" + } + } + ] + } +] \ No newline at end of file diff --git a/Specs/NumberWithUnit/Catalan/CurrencyModel.json b/Specs/NumberWithUnit/Catalan/CurrencyModel.json new file mode 100644 index 0000000000..fa23bce79a --- /dev/null +++ b/Specs/NumberWithUnit/Catalan/CurrencyModel.json @@ -0,0 +1,141 @@ +[ + { + "Input": "el seu company d'equip de Fulham Johnny Haynes es va convertir en el primer jugador de £ 100", + "Results": [ + { + "Text": "£ 100", + "TypeName": "currency", + "Resolution": { + "value": "100", + "unit": "Lliura" + }, + "Start": 87, + "End": 91 + } + ] + }, + { + "Input": "$10 no són gaires, €10 ", + "Results": [ + { + "Text": "$10", + "Start": 0, + "End": 2, + "TypeName": "currency", + "Resolution": { + "unit": "Dòlar", + "value": "10" + } + }, + { + "Text": "€10", + "Start": 19, + "End": 21, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "10" + } + } + ] + }, + { + "Input": "M'agradaria comprar aquest article per 125 EUR.", + "Results": [ + { + "Text": "125 eur", + "TypeName": "currency", + "Resolution": { + "value": "125", + "unit": "Euro", + "isoCurrency": "EUR" + }, + "Start": 39, + "End": 45 + } + ] + }, + { + "Input": "Bitllets: 5 €, 10 €, 20 €, 50 €, 100 €, 200 €, 500 €.", + "Results": [ + { + "Text": "5 €", + "Start": 10, + "End": 12, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "5" + } + }, + { + "Text": "10 €", + "Start": 15, + "End": 18, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "10" + } + }, + { + "Text": "20 €", + "Start": 21, + "End": 24, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "20" + } + }, + { + "Text": "50 €", + "Start": 27, + "End": 30, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "50" + } + }, + { + "Text": "100 €", + "Start": 33, + "End": 37, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "100" + } + }, + { + "Text": "200 €", + "Start": 40, + "End": 44, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "200" + } + }, + { + "Text": "500 €", + "Start": 47, + "End": 51, + "TypeName": "currency", + "Resolution": { + "isoCurrency": "EUR", + "unit": "Euro", + "value": "500" + } + } + ] + } +] \ No newline at end of file diff --git a/Specs/NumberWithUnit/Dutch/CurrencyModel.json b/Specs/NumberWithUnit/Dutch/CurrencyModel.json index a2a6e4840e..3507b0782b 100644 --- a/Specs/NumberWithUnit/Dutch/CurrencyModel.json +++ b/Specs/NumberWithUnit/Dutch/CurrencyModel.json @@ -188,8 +188,8 @@ } } ], - "NotSupported": "dotnet", - "NotSupportedByDesign": "javascript,python,java" + "NotSupported": "dotnet,python", + "NotSupportedByDesign": "javascript,java" }, { "Input": "Een kwartje is 25 cent.", diff --git a/Specs/NumberWithUnit/Italian/CurrencyModel.json b/Specs/NumberWithUnit/Italian/CurrencyModel.json index 6f3317bfac..051bfacc89 100644 --- a/Specs/NumberWithUnit/Italian/CurrencyModel.json +++ b/Specs/NumberWithUnit/Italian/CurrencyModel.json @@ -1689,5 +1689,37 @@ "End": 5 } ] + }, + { + "Input": "Ho bisogno di dollari 996", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "dollari 996", + "TypeName": "currency", + "Resolution": { + "value": "996", + "unit": "Dollar" + }, + "Start": 14, + "End": 24 + } + ] + }, + { + "Input": "dollari 4", + "NotSupported": "javascript, java", + "Results": [ + { + "Text": "dollari 4", + "TypeName": "currency", + "Resolution": { + "value": "4", + "unit": "Dollar" + }, + "Start": 0, + "End": 8 + } + ] } ] \ No newline at end of file diff --git a/Specs/NumberWithUnit/Japanese/CurrencyModel.json b/Specs/NumberWithUnit/Japanese/CurrencyModel.json index 0956089ccc..22903d1ad6 100644 --- a/Specs/NumberWithUnit/Japanese/CurrencyModel.json +++ b/Specs/NumberWithUnit/Japanese/CurrencyModel.json @@ -1,7 +1,7 @@ [ { "Input": "今日の日経平均は2222円13銭です。", - "NotSupported": "python", + "Results": [ { "Text": "2222円13銭", @@ -18,12 +18,12 @@ }, { "Input": "次の停車駅は銭函", - "NotSupported": "python", + "Results": [] }, { "Input": "35億円", - "NotSupported": "python", + "Results": [ { "Text": "35億円", @@ -40,7 +40,7 @@ }, { "Input": "そのシュークリームは1個\\100です", - "NotSupported": "python", + "Results": [ { "Text": "\\100", @@ -62,7 +62,7 @@ }, { "Input": "1,280円", - "NotSupported": "python", + "Results": [ { "Text": "1,280円", @@ -79,7 +79,7 @@ }, { "Input": "その中で、四川の彩友の中で1注1000万人民元の基本的なトップ賞を得ました。", - "NotSupported": "python", + "Results": [ { "Text": "1000万人民元", @@ -96,7 +96,7 @@ }, { "Input": "今回の受賞終了後、賞池の金額が36.57億人民元に上った。", - "NotSupported": "python", + "Results": [ { "Text": "36.57億人民元", @@ -113,7 +113,7 @@ }, { "Input": "1ユーロでいいです。", - "NotSupported": "python", + "Results": [ { "Text": "1ユーロ", @@ -130,7 +130,7 @@ }, { "Input": "両替1.0753ドル", - "NotSupported": "python", + "Results": [ { "Text": "1.0753ドル", @@ -147,7 +147,7 @@ }, { "Input": "両替1.0092スイス・フラン", - "NotSupported": "python", + "Results": [ { "Text": "1.0092スイス・フラン", @@ -164,7 +164,7 @@ }, { "Input": "2016年は合併などで直接投資し、中国の資金は1200億ドルが流出した", - "NotSupported": "python", + "Results": [ { "Text": "1200億ドル", @@ -181,7 +181,7 @@ }, { "Input": "宝安科学技術会社は、国際精密な15人の株主と買収協議を締結し、1株当たり1.95香港ドルで", - "NotSupported": "python", + "Results": [ { "Text": "1.95香港ドル", @@ -198,7 +198,7 @@ }, { "Input": "中央銀行は期限切れの5306億ニュー台湾ドルを確定する", - "NotSupported": "python", + "Results": [ { "Text": "5306億ニュー台湾ドル", @@ -215,7 +215,7 @@ }, { "Input": "東芝はもう1万億円で取引銀行に融資を申請した", - "NotSupported": "python", + "Results": [ { "Text": "1万億円", @@ -232,7 +232,7 @@ }, { "Input": "445ナイラで両替する", - "NotSupported": "python", + "Results": [ { "Text": "445ナイラ", @@ -249,7 +249,7 @@ }, { "Input": "15ドル", - "NotSupported": "python", + "Results": [ { "Text": "15ドル", @@ -266,7 +266,7 @@ }, { "Input": "10ドル", - "NotSupported": "python", + "Results": [ { "Text": "10ドル", @@ -283,7 +283,7 @@ }, { "Input": "りんごが1ドル割引する", - "NotSupported": "python", + "Results": [ { "Text": "1ドル", @@ -300,7 +300,7 @@ }, { "Input": "このパソコンは2ドルです", - "NotSupported": "python", + "Results": [ { "Text": "2ドル", @@ -317,7 +317,7 @@ }, { "Input": "このパソコンは2ドル3セントです。", - "NotSupported": "python", + "Results": [ { "Text": "2ドル3セント", @@ -334,7 +334,7 @@ }, { "Input": "中国移動の年間収入は$ 48.2 万で、とてもすごいです", - "NotSupported": "python", + "Results": [ { "Text": "$ 48.2 万", @@ -350,7 +350,7 @@ }, { "Input": "中国移動の年間収入はus$ 48.2 万で、とてもすごいです", - "NotSupported": "python", + "Results": [ { "Text": "us$ 48.2 万", @@ -367,7 +367,7 @@ }, { "Input": "高田は毎日€ 1.5 かかります", - "NotSupported": "python", + "Results": [ { "Text": "€ 1.5", @@ -384,7 +384,7 @@ }, { "Input": "彼女がいた後、小山は毎月£ 512.5を多く支出しています。", - "NotSupported": "python", + "Results": [ { "Text": "£ 512.5", @@ -400,7 +400,7 @@ }, { "Input": "彼女がいた後、小山は毎月545パナマ・バルボアを多く支出しています。", - "NotSupported": "python", + "Results": [ { "Text": "545パナマ・バルボア", @@ -417,7 +417,7 @@ }, { "Input": "小山は毎月545ドルと5セントを多く支出しています。", - "NotSupported": "python", + "Results": [ { "Text": "545ドルと5セント", @@ -434,7 +434,7 @@ }, { "Input": "この本は5人民元と3角です", - "NotSupported": "python", + "Results": [ { "Text": "5人民元と3角", @@ -451,7 +451,7 @@ }, { "Input": "ドルはアメリカの通貨です。", - "NotSupported": "python", + "Results": [ { "Text": "ドル", @@ -468,7 +468,7 @@ }, { "Input": "ユーロはEU圏の通貨です。", - "NotSupported": "python", + "Results": [ { "Text": "ユーロ", @@ -485,7 +485,7 @@ }, { "Input": "この自転車は100ユーロと30です。", - "NotSupported": "python", + "Results": [ { "Text": "100ユーロと30", @@ -502,7 +502,7 @@ }, { "Input": "十ドル", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "十ドル", @@ -519,7 +519,7 @@ }, { "Input": "8億人民元", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "8億人民元", @@ -536,7 +536,7 @@ }, { "Input": "東芝の再編はもう一万億円が必要、取引銀行に借り入れを申請した。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一万億円", @@ -553,7 +553,7 @@ }, { "Input": "その中で、四川省の彩民一口で一千万人民元の基本大賞あたりました。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一千万人民元", @@ -570,7 +570,7 @@ }, { "Input": "1.0753ドルを交換します", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1.0753ドル", @@ -587,7 +587,7 @@ }, { "Input": "ある人が江蘇省に15人民元でロト引いてたら1600萬の大あたりました 賞金プールは36.57億人民元となってます", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "15人民元", @@ -615,7 +615,7 @@ }, { "Input": "このスマホケースはお前の5ドルと俺の三人民元かかります", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "5ドル", @@ -643,7 +643,7 @@ }, { "Input": "10円5銭", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "10円5銭", @@ -660,7 +660,7 @@ }, { "Input": "このパソコンは2ドル3セントとなってます", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2ドル3セント", @@ -678,7 +678,7 @@ { "Input": "人民元八千元", "Comment": "Currency does not support split units (e.g. '人民元30元')", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "人民元八千元", @@ -723,7 +723,7 @@ }, { "Input": "1.0092スイスフランを交換します", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1.0092スイスフラン", @@ -740,7 +740,7 @@ }, { "Input": "今回抽選後、賞金プールは36.57億人民元まで到達", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "36.57億人民元", @@ -757,7 +757,7 @@ }, { "Input": "中国人民銀行の5306億台湾ドルの預金証書が期限切れになりました", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "5306億台湾ドル", @@ -774,7 +774,7 @@ }, { "Input": "宝安テクノロジーはIPE GROUP LIMITEDの株主15人と買収契約をサインしました。一株あたり1.95香港ドル", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1.95香港ドル", @@ -791,7 +791,7 @@ }, { "Input": "千円あります", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "千円", @@ -808,7 +808,7 @@ }, { "Input": "このスマホケースは五元三角で大丈夫です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "五元三角", @@ -825,7 +825,7 @@ }, { "Input": "appleの割引一ドル", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "一ドル", @@ -842,7 +842,7 @@ }, { "Input": "人民元 米ドル", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "人民元", @@ -870,7 +870,7 @@ }, { "Input": "50元6角3分", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "50元6角3分", @@ -887,7 +887,7 @@ }, { "Input": "二千十六年、買収などの直接投資において、中国のキャッシュアウトフロー纯额は千二百億ドルも到達", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "千二百億ドル", @@ -904,7 +904,7 @@ }, { "Input": "このパソコンは2ドルとなってます", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "2ドル", @@ -921,7 +921,7 @@ }, { "Input": "445ナイラ到達で交換できます", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "445ナイラ", @@ -938,7 +938,7 @@ }, { "Input": "1ユーロで大丈夫です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "1ユーロ", @@ -956,7 +956,7 @@ { "Input": "人民元五十元", "Comment": "Currency does not support split units (e.g. '人民元30元')", - "NotSupported": "dotnet, javascript, python, java", + "NotSupported": "dotnet, javascript, java", "Results": [ { "Text": "人民元五十元", @@ -973,7 +973,7 @@ }, { "Input": "金融市場で運用する資金運用事業を合わせた財投総額も過去最大の同二%減の四十九兆九千五百九十二億円となっている。", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "四十九兆九千五百九十二億円", @@ -990,7 +990,7 @@ }, { "Input": "これは 零円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "零円", @@ -1024,7 +1024,7 @@ }, { "Input": "私 は その 買い物 で あなた に ろく どる 仮 ています", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "ろく どる", @@ -1040,7 +1040,7 @@ }, { "Input": "これは 7万円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7万円", @@ -1057,7 +1057,7 @@ }, { "Input": "これは7万円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7万円", @@ -1074,7 +1074,7 @@ }, { "Input": "これは 7万円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7万円", @@ -1091,7 +1091,7 @@ }, { "Input": "これは 7 万 円 です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7 万 円", @@ -1108,7 +1108,7 @@ }, { "Input": "これは 700円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "700円", @@ -1125,7 +1125,7 @@ }, { "Input": "これは 七万円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "七万円", @@ -1142,7 +1142,7 @@ }, { "Input": "これは 7百円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7百円", @@ -1159,7 +1159,7 @@ }, { "Input": "これは 7千円です", - "NotSupported": "javascript, python, java", + "NotSupported": "javascript, java", "Results": [ { "Text": "7千円",