diff --git a/.NET/Build.CI.cmd b/.NET/Build.CI.cmd
index 637fc43fbb..74fcdb4936 100644
--- a/.NET/Build.CI.cmd
+++ b/.NET/Build.CI.cmd
@@ -3,6 +3,10 @@ ECHO ==============================.NET BUILD START=============================
@ECHO off
SETLOCAL EnableDelayedExpansion
+ECHO.
+ECHO # Setting encoding to UTF-8
+chcp 65001
+
ECHO.
ECHO # Building .NET platform
REM vswhere is an optional component for Visual Studio and also installed with Build Tools.
@@ -15,17 +19,30 @@ for /f "usebackq tokens=*" %%i in (`!vswhere! -latest -products * -requires Micr
)
ECHO.
-SET MsBuildVersion=15.0
-ECHO # Finding MSBuild !MsBuildVersion!
+ECHO # Finding MSBuild
+
+SET MsBuildVersion=Current
+ECHO # Trying !MsBuildVersion! for VS2019
if EXIST "%VSInstallDir%\MSBuild\!MsBuildVersion!\Bin\MSBuild.exe" (
- SET MSBuild="%VSInstallDir%\MSBuild\15.0\Bin\MSBuild.exe" %*
- ECHO Found MSBuild !MSBuild!
+ SET MSBuild="%VSInstallDir%\MSBuild\!MsBuildVersion!\Bin\MSBuild.exe" %*
) else (
- ECHO "msbuild.exe" could not be found at "!VSInstallDir!"
- EXIT /B
+ ECHO MSBuild !MsBuildVersion! not found!
+ ECHO.
+
+ SET MsBuildVersion=15.0
+ ECHO # Trying !MsBuildVersion! for VS2017
+
+ if EXIST "%VSInstallDir%\MSBuild\!MsBuildVersion!\Bin\MSBuild.exe" (
+ SET MSBuild="%VSInstallDir%\MSBuild\!MsBuildVersion!\Bin\MSBuild.exe" %*
+ ) else (
+ ECHO "msbuild.exe" could not be found at "!VSInstallDir!"
+ EXIT /B
+ )
)
+ECHO Found MSBuild !MSBuild!
+
ECHO.
ECHO # Check for empty and duplicate inputs in Specs
Powershell -ExecutionPolicy Bypass "& {buildtools\checkSpec.ps1; exit $LastExitCode }"
@@ -36,7 +53,7 @@ IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO # Restoring NuGet dependencies
-CALL "buildtools\nuget" restore
+CALL !MSBuild! Microsoft.Recognizers.Text.sln /t:Restore
set configuration=Release
ECHO.
@@ -50,4 +67,4 @@ IF %ERRORLEVEL% NEQ 0 (
EXIT /b %ERRORLEVEL%
)
-ECHO ============================== .NET BUILD END ==============================
\ No newline at end of file
+ECHO ============================== .NET BUILD END ==============================
diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/ChoiceDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/ChoiceDefinitions.cs
index 65da4ce470..1820d3c380 100644
--- a/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/ChoiceDefinitions.cs
+++ b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/ChoiceDefinitions.cs
@@ -23,7 +23,8 @@ public static class ChoiceDefinitions
{
public const string LangMarker = @"Ara";
public const string TokenizerRegex = @"[^\u0621-\u064A0-9]";
- public const string TrueRegex = @"\b(صحيح|نعم|حسنا|موافق|متأكد|بالتأكيد|أتفق|اتفق|بالطبع|هيا)\b|(\uD83D\uDC4D|\uD83D\uDC4C|\u0001f44c)";
- public const string FalseRegex = @"\b(لست متاحا|لا أستطيع|ليس تماما|أختلف|نختلف|اوافق|لست أوافق|لا|ليس صحيح|ليس|ليست|غير موافق)\b|(\uD83D\uDC4E|\u270B|\uD83D\uDD90|\u0001F44E|\u0001F590)";
+ public const string SkinToneRegex = @"(\uD83C\uDFFB|\uD83C\uDFFC|\uD83C\uDFFD|\uD83C\uDFFE|\uD83C\uDFFF)";
+ public static readonly string TrueRegex = $@"\b(صحيح|نعم|حسنا|موافق|متأكد|بالتأكيد|أتفق|اتفق|بالطبع|هيا)\b|(\uD83D\uDC4D|\uD83D\uDC4C|\u0001f44c){SkinToneRegex}?";
+ public static readonly string FalseRegex = $@"\b(لست متاحا|لا أستطيع|ليس تماما|أختلف|نختلف|اوافق|لست أوافق|لا|ليس صحيح|ليس|ليست|غير موافق)\b|(\uD83D\uDC4E|\u270B|\uD83D\uDD90|\u0001F44E|\u0001F590){SkinToneRegex}?";
}
}
\ No newline at end of file
diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/DateTimeDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/DateTimeDefinitions.cs
new file mode 100644
index 0000000000..205f662641
--- /dev/null
+++ b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/DateTimeDefinitions.cs
@@ -0,0 +1,946 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// Generation parameters:
+// - DataFilename: Patterns\Arabic\Arabic-DateTime.yaml
+// - Language: Arabic
+// - ClassName: DateTimeDefinitions
+//
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// ------------------------------------------------------------------------------
+
+namespace Microsoft.Recognizers.Definitions.Arabic
+{
+ using System;
+ using System.Collections.Generic;
+
+ public static class DateTimeDefinitions
+ {
+ public const string LangMarker = @"Ara";
+ public const bool CheckBothBeforeAfter = false;
+ public static readonly string TillRegex = $@"(?\b(إلى|حتى يوم|حتى|خلال|عبر)\b|{BaseDateTime.RangeConnectorSymbolRegex})";
+ public static readonly string RangeConnectorRegex = $@"(?و|خلال|عبر|{BaseDateTime.RangeConnectorSymbolRegex})";
+ public const string LastNegPrefix = @"(?القادم|التالي|الآتي|الحالي|الماضي|المقبل|الحاضر|السابق|الأخير)\b";
+ public static readonly string StrictRelativeRegex = $@"\b(?القادم|التالي|الآتي|هذا|الحالي|الماضي|السابق|الأخير)\b";
+ public const string UpcomingPrefixRegex = @"((هذه\s+)?(المقبل(ة)?))";
+ public static readonly string NextPrefixRegex = $@"\b(بعد|القادم(ة)?|{UpcomingPrefixRegex})\b";
+ public const string AfterNextSuffixRegex = @"\b(after\s+(the\s+)?next)\b";
+ public const string PastPrefixRegex = @"((this\s+)?past)\b";
+ public static readonly string PreviousPrefixRegex = $@"(الماضي(ة)?|السابق(ة)?)\b";
+ public const string ThisPrefixRegex = @"(هذه|الحالي(ة)?)\b";
+ public const string RangePrefixRegex = @"(من|بين)";
+ public const string CenturySuffixRegex = @"(^century)\b";
+ public const string ReferencePrefixRegex = @"(ذلك|نفس|هذا)\b";
+ public const string FutureSuffixRegex = @"\b(الحالي(ة)|القادم(ة)|في المستقبل|التالي(ة)|الآتي(ة)|المقبلين|المقبل(ة))\b";
+ public const string PastSuffixRegex = @"^\b$";
+ public const string DayRegex = @"(?(?:3[0-1]|[1-2]\d|0?[1-9]))";
+ public const string ImplicitDayRegex = @"(the\s*)?(?(?:3[0-1]|[0-2]?\d)(?:th|nd|rd|st))\b";
+ public const string MonthNumRegex = @"(?1[0-2]|(0)?[1-9])\b";
+ public const string WrittenOneToNineRegex = @"(?:واحد|اثنان|ثلاثة|أربعة|خمسة|ستة|سبعة|ثمانية|تسعة)";
+ public const string WrittenElevenToNineteenRegex = @"(إحدى عشر|إثنى عشر|ثلاثة عشر|أربعة عشر|خمسة عشر|ستة عشر|سبعة عشر|ثمانية عشر|تسعة عشر)";
+ public const string WrittenTensRegex = @"(عشر[وي]ن|ثلاث[وي]ن|أربع[وي]ن|خمس[وي]ن|ست[وي]ن|سبع[وي]ن|ثمان[وي]ن|تسع[وي]ن)";
+ public static readonly string WrittenNumRegex = $@"(?:{WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}(\s+{WrittenOneToNineRegex})?)";
+ public static readonly string WrittenCenturyFullYearRegex = $@"(?(واحد|اثنان\s*)?((,\s+|،\s+)?(الألفين|ألفين|ألفان|ألف))(\s+و)?(\s*(ثلاث|أربع|خمس|ست|سبع|ثمان|تسع)\s*(مائة|مئتان)(\s+و)?)?)(?({WrittenElevenToNineteenRegex})|(({WrittenOneToNineRegex})?(\s+و\s*)?)({WrittenTensRegex})?)?";
+ public static readonly string WrittenCenturyOrdinalYearRegex = $@"(?({WrittenElevenToNineteenRegex}|مائة|مائتين)\s+((و)\s*)?({WrittenOneToNineRegex})\s+(و)\s*{WrittenTensRegex})";
+ public static readonly string CenturyRegex = $@"\b(?{WrittenCenturyFullYearRegex}|{WrittenCenturyOrdinalYearRegex}(\s*مائة)?(\s*و)?)\b";
+ public static readonly string LastTwoYearNumRegex = $@"(?:zero\s+{WrittenOneToNineRegex}|{WrittenElevenToNineteenRegex}|{WrittenTensRegex}(\s+{WrittenOneToNineRegex})?)";
+ public static readonly string FullTextYearRegex = $@"(?{CenturyRegex})\s*(?{LastTwoYearNumRegex})|(?{WrittenCenturyFullYearRegex})|{WrittenCenturyOrdinalYearRegex}";
+ public const string OclockRegex = @"(?(ال)?ساعة|(ال)?ساعات)";
+ public const string SpecialDescRegex = @"((?)p\b)";
+ public static readonly string AmDescRegex = $@"(في\s)?(صباح(ا)?|صباحًا|الصباح|{BaseDateTime.BaseAmDescRegex})";
+ public static readonly string PmDescRegex = $@"(في\s)?((ال)?مساء|مساءً|ليلًا|ليلا|(ال)?ليل(ة)?|بعد الظهر|الظهر|ظهرا|{BaseDateTime.BasePmDescRegex})";
+ public static readonly string AmPmDescRegex = $@"(في\s)?(صباح(ا)?|صباحًا|الصباح|(ال)?مساء|مساءً|{BaseDateTime.BaseAmPmDescRegex})";
+ public static readonly string DescRegex = $@"(:?(:?({OclockRegex}\s+)?(?({AmPmDescRegex}|{AmDescRegex}|{PmDescRegex}|{SpecialDescRegex})))|{OclockRegex})";
+ public const string OfPrepositionRegex = @"(\bof\b)";
+ public static readonly string TwoDigitYearRegex = $@"\b(?([0-9]\d))(?!(\s*((\:\d)|{AmDescRegex}|{PmDescRegex}|\.\d)))\b";
+ public static readonly string YearRegex = $@"(?:{BaseDateTime.FourDigitYearRegex}|{FullTextYearRegex})";
+ public const string WeekDayRegex = @"(?(?=يوم\s+)?(الأحد|الإثنين|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت|أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت))";
+ public const string SingleWeekDayRegex = @"(?(?=يوم\s+)?(الأحد|الإثنين|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت|أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت))";
+ public const string NextRegex = @"(\s+)?(الآتي|الأخير|التالي|القادم|من الآن|الحالي|المقبل|الحاضر)";
+ public static readonly string RelativeMonthRegex = $@"(?(من\s+)?(هذا\s+)?(الشهر|شهر)(\s+)?({NextRegex})?)";
+ public const string WrittenMonthRegex = @"(((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?))";
+ public static readonly string MonthSuffixRegex = $@"(?(?:(in|of|on)\s+)?({RelativeMonthRegex}|{WrittenMonthRegex}))";
+ public const string DateUnitRegex = @"((?(((ال)?(يوم(ا)?|أسبوع(ا)?|شهر(ا)?|سنة|عام(ا)?|قرن|حقبة))|نهاية الأسبوع))|(?((ال)?(يومان|أسبوعان|شهران|سنتان|عامان|قرنان|حقبتان|يومين|أسبوعين|شهرين|سنتين|عامين|قرنين|حقبتين|يومان|أسبوعان|شهران|سنتان|عامان|قرنان|حقبتان|أيام|أسابيع|أشهر|سنوات|أعوام|حقبات|قرون|سنين|شهور)))|((?<=\s+\d{1,4})[ymwd]))\b";
+ public const string DateTokenPrefix = @"في ";
+ public const string TimeTokenPrefix = @"عند ";
+ public const string TokenBeforeDate = @"في ";
+ public const string TokenBeforeTime = @"عند ";
+ public const string HalfTokenRegex = @"^(النصف|نصف|والنصف|ونصف)";
+ public const string QuarterTokenRegex = @"^(ربع|الربع|وربع|والربع|إلا ربع|إلا الربع)";
+ public const string ThreeQuarterTokenRegex = @"^(وثلاثة أرباع|ثلاثة أرباع|إلا الربع)";
+ public const string ToTokenRegex = @"\b(إلا)$";
+ public const string ToHalfTokenRegex = @"\b(إلا\s+(النصف|نصف))$";
+ public const string ForHalfTokenRegex = @"\b(ل(s+)?(نصف))$";
+ public const string FromRegex = @"\b(from(\s+the)?)$";
+ public const string BetweenTokenRegex = @"\b(between(\s+the)?)$";
+ public const string OrdinalNumberRegex = @"((ال)?حادي عشر|ل(ال)?ثاني عشر|(ال)?ثالث عشر|(ال)?رابع عشر|(ال)?خامس عشر|(ال)?خمسة عشر|(ال)?سادس عشر|(ال)?سابع عشر|(ال)?ثامن عشر|(ال)?تاسع عشر|(ال)?عشرون|(ال)?عشرين|(ال)?حادي والعشرون|(ال)?حادية والعشرين|(ال)?حادي والعشرين|(ال)?ثاني والعشرون|(ال)?ثانية والعشرين|(ال)?ثالث والعشرون|(ال)?رابع والعشرون|(ال)?خامس والعشرون|(ال)?سادس والعشرون|(ال)?تاسع والعشرون|(ال)?سابع والعشرون|(ال)?رابع والعشرون|الثامن|الأول|الثالث|الرابع|الخامس|السادس|الثاني|العاشر|السابع)";
+ public static readonly string SimpleCasePreMonthRegex = $@"((بين|من)\s+)(({DayRegex}-{DayRegex})\s+)((من|في)\s+)?((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\s+)({RelativeRegex})?({YearRegex})?";
+ public static readonly string SimpleCasesRegex = $@"(((من)\s+)?(({DayRegex}|{OrdinalNumberRegex})\s+)((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\s+)?((حتى|إلى)\s*)(({DayRegex}|{OrdinalNumberRegex})\s+)((من هذا|من|هذا|في)\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})?(\s+({RelativeRegex}))?(\s+{YearRegex})?)|({SimpleCasePreMonthRegex})";
+ public static readonly string MonthFrontSimpleCasesRegex = $@"(((شهر\s+)?{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\s+(بين|من)\s+({DayRegex}|{OrdinalNumberRegex})\s+[و]\s*({DayRegex}|{OrdinalNumberRegex}))|({DayRegex}\s*[-\./]\s*{DayRegex}\s+{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})";
+ public static readonly string MonthFrontBetweenRegex = $@"\b{MonthSuffixRegex}\s+(between\s+)({DayRegex})\s*{RangeConnectorRegex}\s*({DayRegex})((\s+|\s*,\s*){YearRegex})?\b";
+ public static readonly string BetweenRegex = $@"((بين|من)\s+)(({DayRegex}|{OrdinalNumberRegex})\s*)((الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\s+)?((حتى|إلى|و|-)\s*)(({DayRegex}|{OrdinalNumberRegex})\s+)((من هذا|من|هذا|في)\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})?(\s*([,،-])\s*)?(\s*({RelativeRegex}))?(\s+{YearRegex})?";
+ public static readonly string MonthWithYear = $@"((هذا\s+)?(شهر\s+)?({SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})[\.]?(\s*)[/\\\-\.,]?(\s*(من عام|من|في|عام))?(\s*)({YearRegex}))|(({SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})\s+(هذا\s+)?((عام|العام)\s+)?({RelativeRegex})?)";
+ public const string SpecialYearPrefixes = @"(التقويمي(ة)?|(?المالي(ة)?|الدراسي(ة)?))";
+ public static readonly string OneWordPeriodRegex = $@"((بعد|في|آخر)\s+(\d+\s+)?((ال)?سنوات|(ال)?أعوام|(ال)?سنين|(ال)?أسابيع|(ال)?أشهر|(ال)?أيام))(\s+\d+)?(\s+{FutureSuffixRegex})?|((هذا\s+)?(شهر\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})(\s+{RelativeRegex})?)|((هذا\s+)?((عطلة|خلال)\s+)?((نهاية\s+)?({ArabicWeekRegex}|العام)\s*)((بعد\s+)?{RelativeRegex})?)";
+ public static readonly string MonthNumWithYear = $@"\b(({BaseDateTime.FourDigitYearRegex}(\s*)[/\-\.](\s*){MonthNumRegex})|({MonthNumRegex}(\s*)[/\-](\s*){BaseDateTime.FourDigitYearRegex}))\b";
+ public static readonly string WeekOfMonthRegex = $@"(\b(?(الأسبوع)\s+((?الأول|الثاني|الثالث|الرابع|الخامس|الأخير)\s+)((من هذا|هذا|من)\s+)?(شهر\s+)?(الشهر|{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})[,]?(\s+{YearRegex})?)\b)|(((الأسبوع|أسبوع)\s+)(في\s+)?{DayRegex}\s+({SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex}))";
+ public static readonly string WeekOfYearRegex = $@"(?(الأسبوع)\s+(?الأول|الثاني|الثالث|الرابع|الخامس|الأخير)\s+((من هذا|هذا|من)\s+)?(العام|من عام|عام)\s*({YearRegex}|{RelativeRegex})?)";
+ public static readonly string OfYearRegex = $@"\b((of|in)\s+({YearRegex}|{StrictRelativeRegex}\s+year))\b";
+ public const string FirstLastRegex = @"\b(the\s+)?((?first)|(?last))\b";
+ public static readonly string FollowedDateUnit = $@"^\s*{DateUnitRegex}";
+ public static readonly string NumberCombinedWithDateUnit = $@"\b(?\d+(\.\d*)?)(\s)?(-)?{DateUnitRegex}";
+ public const string QuarterTermRegex = @"(الربع[- ]+(?الأول|الثاني|الثالث|الرابع))";
+ public static readonly string RelativeQuarterTermRegex = $@"\b(الربع)\s+(?{StrictRelativeRegex})\b";
+ public static readonly string QuarterRegex = $@"({YearRegex}\s+)?({QuarterTermRegex})(((\s+(من عام|من))?\s+({YearRegex}))|(\s+(هذا|من هذا|)\s+العام))?";
+ public static readonly string QuarterRegexYearFront = $@"(?:{YearRegex}|{RelativeRegex}\s+year)('s)?(?:\s*-\s*|\s+(the\s+)?)?{QuarterTermRegex}";
+ public const string HalfYearTermRegex = @"(?first|1st|second|2nd)\s+half";
+ public static readonly string HalfYearFrontRegex = $@"(?((1[5-9]|20)\d{{2}})|2100)(\s*-\s*|\s+(the\s+)?)?h(?[1-2])";
+ public static readonly string HalfYearBackRegex = $@"(the\s+)?(h(?[1-2])|({HalfYearTermRegex}))(\s+of|\s*,\s*)?\s+({YearRegex})";
+ public static readonly string HalfYearRelativeRegex = $@"(the\s+)?{HalfYearTermRegex}(\s+of|\s*,\s*)?\s+({RelativeRegex}\s+year)";
+ public static readonly string AllHalfYearRegex = $@"({HalfYearFrontRegex})|({HalfYearBackRegex})|({HalfYearRelativeRegex})";
+ public const string EarlyPrefixRegex = @"\b(?بداية|مطلع|وقت مبكر|(?قبل))\b";
+ public const string MidPrefixRegex = @"\b(?في منتصف|منتصف)\b";
+ public const string LaterPrefixRegex = @"\b(?نهاية|باقي|بقية|أواخر|(?في وقت لاحق|لاحقا في|بعد))\b";
+ public static readonly string PrefixPeriodRegex = $@"({EarlyPrefixRegex}|{MidPrefixRegex}|{LaterPrefixRegex}|{RelativeRegex})";
+ public const string PrefixDayRegex = @"\b((?early)|(?mid(dle)?)|(?later?))(\s+in)?(\s+the\s+day)?$";
+ public const string SeasonDescRegex = @"(?(ال)?ربيع|(ال)?صيف|(ال)?خريف|(ال)?شتاء)";
+ public static readonly string SeasonRegex = $@"\b(?(هذا\s+)?(منتصف\s+)?(({SeasonDescRegex})(\s+{PrefixPeriodRegex})?(\s*عام\s*)?(\s*{YearRegex})?))\b";
+ public const string WhichWeekRegex = @"\b(week)(\s*)(?5[0-3]|[1-4]\d|0?[1-9])\b";
+ public const string WeekOfRegex = @"(the\s+)?((week)(\s+(of|(commencing|starting|beginning)(\s+on)?))|w/c)(\s+the)?";
+ public const string MonthOfRegex = @"(من)(\s*)(شهر)";
+ public const string SolarMonthRegex = @"(?يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)";
+ public const string LunarMonthRegex = @"(?محرم|صفر|ربيع الأول|ربيع الثاني|جمادى الأول|جمادى الثاني|رجب|شعبان|رمضان|شوال|ذو القعدة|ذو الحجة)";
+ public const string ArabicMonthRegex = @"(?كانون الثاني|شباط|آذار|نيسان|حزيران|تموز|آب|أيلول|تشرين الأول|تشرين الثاني|كانون الأول|أيار)";
+ public static readonly string MonthRegex = $@"(?{SolarMonthRegex}|{LunarMonthRegex}|{ArabicMonthRegex})";
+ public static readonly string DateYearRegex = $@"(?{BaseDateTime.FourDigitYearRegex}|(?الأسبوعين|الاسبوعين|أسابيع|الاسبوع|الأسبوع|الإسبوع|أسبوعين|أسبوعي|اسبوعين|اسبوعي|أسبوع|الاسابيع|الأسابيع)";
+ public static readonly string ThisRegex = $@"(?=يوم\s+)?({WeekDayRegex})(\s+)?(من|هذا|)(\s+)?(هذا)?(\s+)({ArabicWeekRegex})((\s+)({RelativeRegex}))?";
+ public static readonly string LastDayDateRegex = $@"(?=يوم\s+)?({WeekDayRegex})\s+(الماضي|السابق|الأخير)";
+ public static readonly string LastWeekDateRegex = $@"({ArabicWeekRegex})\s+(الماضي|السابق|الأخير)\s+({WeekDayRegex})";
+ public const string LastMonthYearDateRegex = @"(قبل\s+)(\d+ )?((بضعة|بضع|عدة)\s+)?(سنتين|شهرين|الشهور|أشهر|اشهر|شهر|الشهر|أيام|عامين|عام|أعوام|سنة|سنين|سنوات)";
+ public static readonly string SpecificDayRegex = $@"((قبل|بعد)\s+)?((اليوم|يوم)\s+)?(((?<=ب)الأمس|أمس|الأمس|البارحة)|(آخر يوم|الماضي|السابق|الأخير|يومين)|({DayRegex}\s+{MonthRegex}))";
+ public static readonly string LastDateRegex = $@"({LastDayDateRegex}|{LastWeekDateRegex})";
+ public static readonly string NextDayRegex = $@"(هذا يوم\s+|بعد\s+)?(?=(ال)?يوم\s+)?({WeekDayRegex})((\s+)({NextRegex}))?";
+ public static readonly string NextWeekDayRegex = $@"((بعد )|(في هذا ?=)|(هذا ?=))?((ال|لل|ل)?أسبوع(ين)?|{ArabicWeekRegex}|اليوم|يومي|الغد|غداً|غد|غدا)(يوم)?({ArabicWeekRegex})?(\s*(الآتي|الأخير|التالي|القادم|من الآن|الحالي|المقبل|الحاضر))?(\s*{ArabicWeekRegex})?";
+ public static readonly string NextWeekRegex = $@"(?=بعد )?(هذا )?({ArabicWeekRegex})\s*({NextRegex})?\s+?(يوم)?(\s+)?({WeekDayRegex})?";
+ public static readonly string NextDateRegex = $@"({NextWeekRegex}|{NextDayRegex})";
+ public static readonly string CardinalDayOfMonthRegex = $@"(((?<=في )|(إلى |لل|يوم ))((((ال)?عاشر|(ال)?حادي(ة)? والعشرين|(ال)?ثاني(ة)? والعشرين|(ال)?ثالث(ة)? والعشرين|(ال)?رابع(ة)? والعشرين|(ال)?خامس(ة)? والعشرين|(ال)?سادس(ة)? والعشرين|(ال)?سابع(ة)? والعشرين|(ال)?ثامن(ة)? والعشرين|(ال)?تاسع(ة)? والعشرين|(ال)?ثلاثين|(ال)?حادي(ة)? والثلاثين|(ال)?أول|(ال)?ثاني|(ال)?ثالث|(ال)?رابع|(ال)?خامس|(ال)?سادس|(ال)?سابع|(ال)?ثامن|(ال)?تاسع))|({DayRegex})))|((?<=يوم )({DayRegex})[\./-]\s+({MonthRegex}))";
+ public static readonly string SpecialDayRegex = $@"({NextWeekDayRegex}|{CardinalDayOfMonthRegex}|{SpecificDayRegex}|{LastMonthYearDateRegex})";
+ public static readonly string SpecialDayWithNumRegex = $@"\b((?{WrittenNumRegex})\s+days?\s+from\s+(?yesterday|tomorrow|tmr|today))\b";
+ public static readonly string RelativeDayRegex = $@"\b(((the\s+)?{RelativeRegex}\s+day))\b";
+ public const string SetWeekDayRegex = @"\b(?on\s+)?(?morning|afternoon|evening|night|(sun|mon|tues|wednes|thurs|fri|satur)day)s\b";
+ public static readonly string WeekDayOfMonthRegex = $@"(?(the\s+)?(?first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|last)\s+(week\s+{MonthSuffixRegex}[\.]?\s+(on\s+)?{WeekDayRegex}|{WeekDayRegex}\s+{MonthSuffixRegex}))";
+ public static readonly string RelativeWeekDayRegex = $@"\b({WrittenNumRegex}\s+{WeekDayRegex}\s+(from\s+now|later))\b";
+ public static readonly string SpecialDate = $@"(?=\b(on|at)\s+the\s+){DayRegex}\b";
+ public const string DatePreposition = @"\b(في|عند|من)";
+ public static readonly string DateExtractorYearTermRegex = $@"(\s+|\s*,\s*|\s+من\s+){DateYearRegex}";
+ public const string CardinalDayRegex = @"(?=يوم\s+)?((ال|لل|ل)?عاشر|(ال|لل|ل)?حادي(ة)? و(ال)?عشر[يو]ن|واحد و(ال)?عشر[يو]ن|(ال|لل|ل)?ثاني(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?ثالث(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?رابع(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?خامس(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?سادس(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?سابع(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?ثامن(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?تاسع(ة)? و(ال)?عشر[يو]ن|(ال|لل|ل)?ثلاثين|(ال|لل|ل)?حادي(ة)? والثلاثين|(ال|لل|ل)?أول|(ال|لل|ل)?ثاني|(ال|لل|ل)?ثالث|(ال|لل|ل)?رابع|(ال|لل|ل)?خامس|(ال|لل|ل)?سادس|(ال|لل|ل)?سابع|(ال|لل|ل)?ثامن|(ال|لل|ل)?تاسع)";
+ public static readonly string DateExtractor1 = $@"({CardinalDayRegex})(\s+يوم\s+)({WeekDayRegex})(\s+)(في|من)(\s+)(هذا|هذه)?(\s+)?(الشهر|{MonthRegex})({DateExtractorYearTermRegex}\b)?";
+ public static readonly string DateExtractor3 = $@"\b({WeekDayRegex}(\s+|\s*,\s*|\s*،\s*))?({DayRegex}|{CardinalDayRegex})[\.]?(\s+|\s*,\s*|\s+من\s+|\s*-\s*)?{MonthRegex}[\.]?((\s+(في|عند|عام|سنة|من عام|من سنة))?{DateExtractorYearTermRegex})?\b";
+ public static readonly string DateExtractor4 = $@"\b{MonthNumRegex}\s*[/\\\-]\s*{DayRegex}[\.]?\s*[/\\\-]\s*{DateYearRegex}";
+ public static readonly string DateExtractor5 = $@"\b{DayRegex}\s*[/\\\-\.]\s*({MonthNumRegex}|{MonthRegex})\s*[/\\\-\.]\s*{DateYearRegex}(?!\s*[/\\\-\.]\s*\d+)";
+ public static readonly string DateExtractor6 = $@"(?<={DatePreposition}\s+)({StrictRelativeRegex}\s+)?({WeekDayRegex}\s+)?{MonthNumRegex}[\-\.]{DayRegex}(?![%])\b";
+ public static readonly string DateExtractor7L = $@"\b({WeekDayRegex}\s+)?{MonthNumRegex}\s*/\s*{DayRegex}{DateExtractorYearTermRegex}(?![%])\b";
+ public static readonly string DateExtractor7S = $@"({MonthRegex}\s*[-\./]\s*{DayRegex})|(\b({WeekDayRegex}\s+)?{MonthNumRegex}\s*[/\.]\s*{DayRegex}(?![%])\b)";
+ public static readonly string DateExtractor8 = $@"(?<={DatePreposition}\s+)({StrictRelativeRegex}\s+)?({WeekDayRegex}\s+)?{DayRegex}[\\\-]{MonthNumRegex}(?![%])\b";
+ public static readonly string DateExtractor9L = $@"\b({WeekDayRegex}\s+)?{DayRegex}\s*/\s*{MonthNumRegex}{DateExtractorYearTermRegex}(?![%])\b";
+ public static readonly string DateExtractor9S = $@"\b({WeekDayRegex}\s+)?{DayRegex}\s*[/-]\s*{MonthNumRegex}(?![%])\b";
+ public static readonly string DateExtractorA = $@"\b({WeekDayRegex}\s+)?{BaseDateTime.FourDigitYearRegex}\s*[/\\\-\.]\s*({MonthNumRegex}|{MonthRegex})\s*[/\\\-\.]\s*{DayRegex}";
+ public static readonly string OfMonth = $@"^\s*(يوم\s+)?من\s*{MonthRegex}";
+ public static readonly string MonthEnd = $@"{MonthRegex}\s*(في)?\s*$";
+ public static readonly string WeekDayEnd = $@"(هذا\s+)?{WeekDayRegex}\s*[,،]?\s*$";
+ public const string WeekDayStart = @"^[\.]";
+ public const string RangeUnitRegex = @"\b(?years?|months?|weeks?)\b";
+ public const string HourNumRegex = @"\b(?الأولى|(ال)?واحدة|(ال)?ثانية|(ال)?ثالثة|(ال)?رابعة|(ال)?خامسة|(ال)?سادسة|(ال)?سابعة|(ال)?ثامنة|(ال)?تاسعة|(ال)?عاشرة|(ال)?حادية عشر(ة)?|(ال)?ثانية عشر(ة)?|خمسة عشر|أحد عشر)\b";
+ public const string MinuteNumRegex = @"\b(?أربع|خمس|ست|سبع|ثمان|تسع|عشر|عشرة|أحد عشر|إثني عشر|إثنا عشر|ثلاثة عشر|خمسة عشر|ثمانية عشر|أربعة عشر|ستة عشر|سبعة عشر|(ال)?حادية عشر(ة)?|تسعة عشر|عشرون|ثلاثون|أربعون|خمسون|عشرين|ثلاث(ين)?|أربعين|خمسين|واحد|إثنان|ثلاثة|خمسة|ثمانية)\b";
+ public const string DeltaMinuteNumRegex = @"(?عشرة|أحد عشر|اثنا عشر|ثلاثة عشر|خمسة عشر|ثمانية عشر|أربعة|ستة|سبعة|تسعة|عشرين|أربعة عشر|ستة عشر|سبعة عشر|تسعة عشر| ثلاثون|أربعون|خمسين|أربعين|خمسون|واحد|اثنان|ثلاثة|خمسة|ثمانية|ثلاث(ين)?|أربع|خمس|ست|سبع|ثمان|تسع|(ال)?واحدة|(ال)?ثانية|(ال)?ثالثة|(ال)?رابعة|(ال)?خامسة|(ال)?سادسة|(ال)?سابعة|(ال)?ثامنة|(ال)?تاسعة|(ال)?عاشرة|(ال)?حادية عشر(ة)?|(ال)?ثانية عشر(ة)?)";
+ public const string PmRegex = @"(?(?:(في|حول)\s|ل)?(وقت\s)?(بعد الظهر|بعد الظهيرة|(ال)?مساء|مساءً|منتصف(\s|-)الليل|الغداء|الليل|ليلا))";
+ public const string PmRegexFull = @"(?(?:(في|حول)\s|ل)?(وقت\s)?(بعد الظهر|بعد الظهيرة|(ال)?مساء|مساءً|منتصف(\s|-)الليل|الغداء|الليل|ليلا))";
+ public const string AmRegex = @"(?(?:(في|حول)\s|ل)?(وقت\s)?((ال)?صباح|صباحا|صباحًا))";
+ public const string LunchRegex = @"\b(موعد الغذاء|وقت الغذاء)\b";
+ public const string NightRegex = @"\bمنتصف(\s|-)الليل\b";
+ public const string CommonDatePrefixRegex = @"^[\.]";
+ public static readonly string LessThanOneHour = $@"(?((ال)?ربع|ثلاثة أرباع|(ال)?نصف)|({BaseDateTime.DeltaMinuteRegex}(\s(دقيقة|دقائق))?)|({DeltaMinuteNumRegex}(\s(دقيقة|دقائق))?))";
+ public static readonly string WrittenTimeRegex = $@"(?((ال)?ساعة\s)?{HourNumRegex}\s+(و(\s)?)?({MinuteNumRegex}|{{LessThanOneHour}}|({MinuteNumRegex}\s+(و(\s)?)?(?عشرون|ثلاثون|أربعون|خمسون|عشرين|ثلاثين|أربعين|خمسين))))";
+ public static readonly string TimePrefix = $@"(?(إلا|حتى|و|قبل)?(\s)?{LessThanOneHour})";
+ public static readonly string TimeSuffix = $@"(?{AmRegex}|{PmRegex}|{OclockRegex})";
+ public static readonly string TimeSuffixFull = $@"(?{AmRegex}|{PmRegexFull}|{OclockRegex})";
+ public static readonly string BasicTime = $@"\b(?{WrittenTimeRegex}|{HourNumRegex}|({MinuteNumRegex}(\s(دقيقة|دقائق))?)|{BaseDateTime.HourRegex}:{BaseDateTime.MinuteRegex}(:{BaseDateTime.SecondRegex})?|{BaseDateTime.HourRegex}(?![%\d]))";
+ public const string MidnightRegex = @"(?منتصف(\s|(\s?-\s?))الليل)";
+ public const string MidmorningRegex = @"(?منتصف(\s|(\s?-\s?))الصباح)";
+ public const string MidafternoonRegex = @"(?منتصف(\s|(\s?-\s?))بعد الظهر)";
+ public const string MiddayRegex = @"(?(وقت الغداء\s)?(منتصف(\s|(\s?-\s?)))?(النهار|(الساعة\s)?((((12\s)?الظهر)|(12\s)?الظهيرة)|(12\s)?ظهرا))(\sوقت الغداء)?)";
+ public static readonly string MidTimeRegex = $@"(?({MidnightRegex}|{MidmorningRegex}|{MidafternoonRegex}|{MiddayRegex}))";
+ public static readonly string AtRegex = $@"\b(?:(?:(?<=\bفي\s+)?(?:{WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}(?!\.\d)|{MidTimeRegex}))|{MidTimeRegex})\b";
+ public static readonly string IshRegex = $@"\b((({BaseDateTime.HourRegex}|{WrittenTimeRegex})(\s|-))?(وقت\s)?((الظهيرة|الظهر|ظهر(ا|اً))))\b";
+ public const string TimeUnitRegex = @"([^A-Za-z]{1,}|\b)((?((ال)?(ساعة|دقيقة|ثانية)))|(?((ال)?(ساعات|دقائق|ثوان|ساعتين|دقيقتين|ثانيتين|ساعتان|دقيقتان|ثانيتان))))\b";
+ public const string RestrictedTimeUnitRegex = @"(?(ال)?ساعة|(ال)?دقيقة)\b";
+ public const string FivesRegex = @"(?(?:fifteen|(?:twen|thir|fou?r|fif)ty(\s*five)?|ten|five))\b";
+ public static readonly string HourRegex = $@"\b{BaseDateTime.HourRegex}";
+ public const string PeriodHourNumRegex = @"(?((واحد|اثنان|اثنين|إثنين|ثلاثة|أربعة|إثنان)?(و(\s+)?(عشرون|عشرين)))|أحد عشر|إثني عشر|((ثلاثة|خمسة|ثمانية|أربعة|ستة|سبعة|تسعة)(عشر)?)|صفر|واحد|اثنان|إثنان|ثنان|اثنين|عشرة|الأولى|(ال)?واحدة|(ال)?ثانية|(ال)?ثالثة|(ال)?رابعة|(ال)?خامسة|(ال)?سادسة|(ال)?سابعة|(ال)?ثامنة|(ال)?تاسعة|(ال)?عاشرة|(ال)?حادية عشر(ة)?|(ال)?ثانية عشر(ة)?|خمسة عشر)";
+ public static readonly string ConnectNumRegex = $@"\b{BaseDateTime.HourRegex}(?[0-5][0-9])\s*{DescRegex}";
+ public static readonly string TimeRegexWithDotConnector = $@"({BaseDateTime.HourRegex}(\s*\.\s*){BaseDateTime.MinuteRegex})";
+ public static readonly string TimeRegex1 = $@"\b({TimePrefix}\s+)?({WrittenTimeRegex}(\s{TimePrefix})?|{HourNumRegex}|{BaseDateTime.HourRegex})(\s*|[.]){DescRegex}";
+ public static readonly string TimeRegex2 = $@"(\b{TimePrefix}\s+)?(t)?{BaseDateTime.HourRegex}(\s*)?:(\s*)?{BaseDateTime.MinuteRegex}((\s*)?:(\s*)?{BaseDateTime.SecondRegex})?(?a)?((\s*{DescRegex})|\b)";
+ public static readonly string TimeRegex3 = $@"(\b{TimePrefix}\s+)?{BaseDateTime.HourRegex}\.{BaseDateTime.MinuteRegex}(\s*{DescRegex})";
+ public static readonly string TimeRegex4 = $@"\b({TimePrefix}\s+)?{BasicTime}(\s*{DescRegex})?\s+{TimeSuffix}(\s*{DescRegex})?\b";
+ public static readonly string TimeRegex5 = $@"\b({DescRegex}\s)?{BasicTime}((\s*{DescRegex})((\s+{TimePrefix})?)|(\s+{TimePrefix}(\s+{TimePrefix})?))(\s{DescRegex})?";
+ public static readonly string TimeRegex6 = $@"{BasicTime}(\s*{DescRegex})?\s+{TimeSuffix}\b";
+ public static readonly string TimeRegex7 = $@"\b({DescRegex}\s)?(وقت الغداء\s)?{TimeSuffixFull}\s+(في\s+)?{BasicTime}(\s{DescRegex})?(\sوقت الغداء)?(\s{TimePrefix})?((\s*{DescRegex})|\b)?";
+ public static readonly string TimeRegex8 = $@".^";
+ public static readonly string TimeRegex9 = $@"\b{PeriodHourNumRegex}(\s+|-){FivesRegex}((\s*{DescRegex})|\b)";
+ public static readonly string TimeRegex10 = $@"\b({TimePrefix}\s+)?{BaseDateTime.HourRegex}(\s*h\s*){BaseDateTime.MinuteRegex}(\s*{DescRegex})?";
+ public static readonly string TimeRegex11 = $@"\b((?:({TimeTokenPrefix})?{TimeRegexWithDotConnector}(\s*{DescRegex}))|(?:(?:{TimeTokenPrefix}{TimeRegexWithDotConnector})(?!\s*per\s*cent|%)))";
+ public static readonly string FirstTimeRegexInTimeRange = $@"\b{TimeRegexWithDotConnector}(\s*{DescRegex})?";
+ public static readonly string PureNumFromTo = $@"({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+اليوم)?";
+ public static readonly string PureNumBetweenAnd = $@"(بين\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+اليوم)?";
+ public static readonly string SpecificTimeFromTo = $@"({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+اليوم)?";
+ public static readonly string SpecificTimeBetweenAnd = $@"(بين\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+اليوم)?";
+ public const string SuffixAfterRegex = @"\b(((at)\s)?(or|and)\s+(above|after|later|greater)(?!\s+than))\b";
+ public const string PrepositionRegex = @"(?^(at|on|of)(\s+the)?$)";
+ public const string LaterEarlyRegex = @"((?(\s+|-)الباكر)|(?وقت متأخر(\s+|-))|أواخر(\s+|-)|وقت مبكر(\s+|-)|أول(\s+|-)|آخر(\s+|-))";
+ public const string MealTimeRegex = @"\b((في|عند)\s+)?(وقت\s)?(?(ال)?إفطار|(ال)?فطور|(ال)?عشاء|(ال)?غذاء)\b";
+ public static readonly string UnspecificTimePeriodRegex = $@"({MealTimeRegex})";
+ public static readonly string TimeOfDayRegex = $@"\b(?((((في|عند)\s+)?{LaterEarlyRegex}?(من\s+)?(الصباح|بعد الظهر|الليل|المساء|الظهر|الأمسيات){LaterEarlyRegex}?)|{MealTimeRegex}|(((في|عند|خلال)\s+)?(النهار|((ساعة|ساعات)(\s)?العمل)))))\b";
+ public static readonly string SpecificTimeOfDayRegex = $@"\b(({StrictRelativeRegex}\s+{TimeOfDayRegex})\b|\btoni(ght|te))s?\b";
+ public static readonly string TimeFollowedUnit = $@"^\s*{TimeUnitRegex}";
+ public static readonly string TimeNumberCombinedWithUnit = $@"\b(?\d+(\.\d*)?)(\s)?(-)?{TimeUnitRegex}";
+ public static readonly string[] BusinessHourSplitStrings = { @"business", @"hour" };
+ public const string NowRegex = @"\b(?(right\s+)?now|at th(e|is) minute|as soon as possible|asap|recently|previously)\b";
+ public static readonly string NowParseRegex = $@"\b({NowRegex}|^(date)$)\b";
+ public const string SuffixRegex = @"^\s*(in the\s+)?(morning|afternoon|evening|night)\b";
+ public const string NonTimeContextTokens = @"(building)";
+ public const string DateTimeTimeOfDayRegex = @"\b(?morning|(?afternoon|night|evening))\b";
+ public static readonly string DateTimeSpecificTimeOfDayRegex = $@"\b(({RelativeRegex}\s+{DateTimeTimeOfDayRegex})\b|\btoni(ght|te))\b";
+ public static readonly string TimeOfTodayAfterRegex = $@"^\s*(,\s*)?(in\s+)?{DateTimeSpecificTimeOfDayRegex}";
+ public static readonly string TimeOfTodayBeforeRegex = $@"{DateTimeSpecificTimeOfDayRegex}(\s*,)?(\s+(at|around|in|on))?\s*$";
+ public static readonly string SimpleTimeOfTodayAfterRegex = $@"(?{DateUnitRegex}|(ال)?ساعة|(ال)?ساعات|(ال)?دقيقة|(ال)?دقائق|(ال)?ثانية|(ال)?ثوان|(ال)?ليلة|(ال)?ليال)|ساعت(ين)?(ان)?|دقيقت(ين)?(ان)?|ثانيت(ين)?(ان)?|ليلت(ين)?(ان)?\b";
+ public const string SuffixAndRegex = @"(?\s*(و)\s+(?نصف|ربع))";
+ public const string PeriodicRegex = @"\b(?((?semi|bi|tri)(\s*|-))?(daily|monthly|weekly|quarterly|yearly|annual(ly)?))\b";
+ public static readonly string EachUnitRegex = $@"\b(?(each|every|any|once an?)(?\s+other)?\s+({DurationUnitRegex}|(?quarters?|weekends?)|{WeekDayRegex})|(?weekends))";
+ public const string EachPrefixRegex = @"\b(?(each|every|once an?)\s*$)";
+ public const string SetEachRegex = @"\b(?(each|every)(?\s+other)?\s*)(?!the|that)\b";
+ public static readonly string SetLastRegex = $@"(?following|next|upcoming|this|{LastNegPrefix}last|past|previous|current)";
+ public const string EachDayRegex = @"^\s*(each|every)\s*day\b";
+ public static readonly string DurationFollowedUnit = $@"(^\s*{DurationUnitRegex}\s+{SuffixAndRegex})|(^\s*{SuffixAndRegex}?\s+?{DurationUnitRegex})";
+ public static readonly string NumberCombinedWithDurationUnit = $@"((?\d+(\.\d*)?(\s)?)?({DurationUnitRegex})(\s{WrittenOneToNineRegex})?(\sو)?(\s)?(?\d+(\.\d*)?(\s)?)?(({DurationUnitRegex})?(\s{WrittenOneToNineRegex})?)(\sو)?(\s)?(?\d+(\.\d*)?(\s)?)?({DurationUnitRegex})(\s{WrittenOneToNineRegex})?)";
+ public static readonly string AnUnitRegex = $@"\b((?(1/2|½|نصف)))\s+{DurationUnitRegex}(\s(أخرى))?";
+ public const string DuringRegex = @"\b((((خلال|على مدى|مدة)\s)|ل)+)(?(ال)?عام(ين)?|(ال)?سنتين|(ال)?سنة|(ال)?شهر(ين)?|الأشهر|(ال)?أسبوع(ين)?|(ال)?يوم(ين)?)\b";
+ public const string AllRegex = @"(?(طوال\s+))?(?(ال)?عام|(ال)?سنة|(ال)?شهر|(ال)?أسبوع|(ال)?أسابيع|(ال)?أيام|(ال)?يوم)(?(\s+كامل(ة)?))?";
+ public const string HalfRegex = @"\b((نصف)\s+)?(?(ال)?ساعة|ساعتين|دقيقة|دقيقتين|ثانية|ثانيتين|(ال)?عام(ين)?|(ال)?سنة|(ال)?شهر(ين)?|(ال)?أسبوع(ين)?|(ال)?يوم(ين)?)(?(\s+)?(و)?نصف)?\b";
+ public const string ConjunctionRegex = @"\b((و(\s+ل)?)|مع)\b";
+ public const string ArabicThisYearRegex = @"(\s*)?(هذا|هذه)?(لعام|عام|العام|سنة)?(\s*)?";
+ public const string ArabicEidDay = @"?(يوم |عيد |ليلة | ليل)?(?=\s*)";
+ public static readonly string HolidayList1 = $@"((?=\s*){ArabicEidDay}(إثنين الرماد|رأس السنة الهجرية|الحج|يواندان|الفطر|رأس السنة الجديدة|الأضحى|الأب|الشكر|عيد الميلاد|المولد النبوي|الفصح)(){ArabicThisYearRegex}(العام|السنة)?({YearRegex})?({RelativeRegex})?)";
+ public static readonly string HolidayList2 = $@"((?=\s*){ArabicEidDay}(الشباب|الأطفال|الفتيات|العشاق|الأرض|الافتتاح|جرذ الأرض|الحب|الذكرى|الخريف|القمر|الربيع|الفانوس)(){ArabicThisYearRegex}(العام|السنة)?({YearRegex})?({RelativeRegex})?)";
+ public static readonly string HolidayList3 = $@"((?=\s*){ArabicEidDay}(حقوق الإنسان|العالمي للأعمال الخيرية|يوم التحرير الأفريقي|حرية الصحافة العالمية|الاستقلال|الرؤساء|كل الأرواح|الشجرة|مارتن لوثر كينج| هالوين|العمال العالمي|الأم)(){ArabicThisYearRegex}(العام|السنة)?({YearRegex})?({RelativeRegex})?)";
+ public static readonly string HolidayRegex = $@"({HolidayList1})|({HolidayList2})|({HolidayList3})";
+ public const string AMTimeRegex = @"(?morning)";
+ public const string PMTimeRegex = @"\b(?afternoon|evening|night)\b";
+ public const string NightTimeRegex = @"(night)";
+ public const string NowTimeRegex = @"(now|at th(e|is) minute)";
+ public const string RecentlyTimeRegex = @"(recently|previously)";
+ public const string AsapTimeRegex = @"(as soon as possible|asap)";
+ public const string InclusiveModPrepositions = @"(?((on|in|at)\s+or\s+)|(\s+or\s+(on|in|at)))";
+ public const string AroundRegex = @"(?:\b(?:around|circa)\s*?\b)(\s+the)?";
+ public static readonly string BeforeRegex = $@"((\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)?";
+ public static readonly string AfterRegex = $@"((\b{InclusiveModPrepositions}?((after|(starting|beginning)(\s+on)?(?!\sfrom)|(?>\s*=)|>))(\s+the)?";
+ public const string SinceRegex = @"(?:(?:\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)?";
+ public static readonly string SinceRegexExp = $@"({SinceRegex}|\bfrom(\s+the)?\b)";
+ public const string AgoRegex = @"\b(ago|before\s+(?yesterday|today))\b";
+ public static readonly string LaterRegex = $@"\b(?:later(?!((\s+in)?\s*{OneWordPeriodRegex})|(\s+{TimeOfDayRegex})|\s+than\b)|من الآن|من الان|(from|after)\s+(?tomorrow|tmr|today))\b";
+ public const string BeforeAfterRegex = @"\b((?before)|(?from|after))\b";
+ public static readonly string ModPrefixRegex = $@"\b({RelativeRegex}|{AroundRegex}|{BeforeRegex}|{AfterRegex}|{SinceRegex})\b";
+ public static readonly string ModSuffixRegex = $@"\b({AgoRegex}|{LaterRegex}|{BeforeAfterRegex}|{FutureSuffixRegex}|{PastSuffixRegex})\b";
+ public const string InConnectorRegex = @"\b(in)\b";
+ public static readonly string SinceYearSuffixRegex = $@"(^\s*{SinceRegex}(\s*(the\s+)?year\s*)?{YearSuffix})";
+ public static readonly string WithinNextPrefixRegex = $@"\b(within(\s+the)?(\s+(?{NextPrefixRegex}))?)\b";
+ public const string TodayNowRegex = @"\b(today|now)\b";
+ public static readonly string MorningStartEndRegex = $@"(^(morning|{AmDescRegex}))|((morning|{AmDescRegex})$)";
+ public static readonly string AfternoonStartEndRegex = $@"(^(afternoon|{PmDescRegex}))|((afternoon|{PmDescRegex})$)";
+ public const string EveningStartEndRegex = @"(^(evening))|((evening)$)";
+ public const string NightStartEndRegex = @"(^(over|to)?ni(ght|te))|((over|to)?ni(ght|te)$)";
+ public const string InexactNumberRegex = @"بضع(ة)?|عدة|(?((ل))?عدد(\s+من)?)";
+ public static readonly string InexactNumberUnitRegex = $@"({InexactNumberRegex})\s+({DurationUnitRegex})|(في\s+)?((ال)?يومين|(ال)?أيام|(ال)?أسابيع|(ال)?أشهر|(ال)?سنوات|(ال)?أعوام|(ال)?سنين)\s+(العديدة|القليلة|الثلاثة|الأربعة|الخمسة|الستة|السبعة|الثمانية|التسعة|العشرة)";
+ public static readonly string RelativeTimeUnitRegex = $@"(?:(?:(?:{NextPrefixRegex}|{PreviousPrefixRegex}|{ThisPrefixRegex})\s+({TimeUnitRegex}))|((the|my))\s+({RestrictedTimeUnitRegex}))";
+ public static readonly string RelativeDurationUnitRegex = $@"(?:(?:(?<=({NextPrefixRegex}|{PreviousPrefixRegex}|{ThisPrefixRegex})\s+)({DurationUnitRegex}))|((the|my))\s+({RestrictedTimeUnitRegex}))";
+ public static readonly string ReferenceDatePeriodRegex = $@"\b{ReferencePrefixRegex}\s+(?week|month|year|decade|weekend)\b";
+ public const string ConnectorRegex = @"^(-|,|for|t|around|@)$";
+ public const string FromToRegex = @"(\b(from).+(to|and|or)\b.+)";
+ public const string SingleAmbiguousMonthRegex = @"^(the\s+)?(may|march)$";
+ public const string SingleAmbiguousTermsRegex = @"^(the\s+)?(day|week|month|year)$";
+ public const string UnspecificDatePeriodRegex = @"^(week|month|year)$";
+ public const string PrepositionSuffixRegex = @"\b(on|in|at|around|from|to)$";
+ public const string FlexibleDayRegex = @"(?([A-Za-z]+\s)?[A-Za-z\d]+)";
+ public static readonly string ForTheRegex = $@"\b((((?<=for\s+)the\s+{FlexibleDayRegex})|((?<=on\s+)(the\s+)?{FlexibleDayRegex}(?<=(st|nd|rd|th))))(?\s*(,|\.(?!\d)|!|\?|$)))";
+ public static readonly string WeekDayAndDayOfMonthRegex = $@"\b{WeekDayRegex}\s+(the\s+{FlexibleDayRegex})\b";
+ public static readonly string WeekDayAndDayRegex = $@"\b{WeekDayRegex}\s+(?!(the)){DayRegex}(?!([-:]|(\s+({AmDescRegex}|{PmDescRegex}|{OclockRegex}))))\b";
+ public const string RestOfDateRegex = @"\b(باقي|بقية)\s+(?الشهر|العام|الأسبوع|العقد)\b";
+ public const string RestOfDateTimeRegex = @"\b(rest|remaining)\s+(of\s+)?((the|my|this|current)\s+)?(?day)\b";
+ public const string AmbiguousRangeModifierPrefix = @"(from)";
+ public static readonly string NumberEndingPattern = $@"^(?:\s+(?meeting|appointment|conference|((skype|teams|zoom|facetime)\s+)?call)\s+to\s+(?{PeriodHourNumRegex}|{HourRegex})([\.]?$|(\.,|,|!|\?)))";
+ public const string OneOnOneRegex = @"\b(1\s*:\s*1(?!\d))|(one (on )?one|one\s*-\s*one|one\s*:\s*one)\b";
+ public static readonly string LaterEarlyPeriodRegex = $@"(\b(({PrefixPeriodRegex})\s*\b\s*(?{OneWordPeriodRegex}|(?{BaseDateTime.FourDigitYearRegex}))|({UnspecificEndOfRangeRegex}))\b)|({PrefixPeriodRegex}\s+(من هذا|من|هذا)\s+(الشهر|الأسبوع|العام|الاسبوع)(\s+{PrefixPeriodRegex})?)";
+ public static readonly string WeekWithWeekDayRangeRegex = $@"\b(?(هذا\s+)?(الأسبوع)\s+(({NextPrefixRegex}|{PreviousPrefixRegex})\s+)?)(((بين)\s+{WeekDayRegex}\s+(و)\s*{WeekDayRegex})|(من)\s+{WeekDayRegex}\s+(إلى)\s+{WeekDayRegex})\b";
+ public const string GeneralEndingRegex = @"^\s*((\.,)|\.|,|!|\?)?\s*$";
+ public const string MiddlePauseRegex = @"\s*(,)\s*";
+ public const string DurationConnectorRegex = @"^\s*(?\s+|و|،|,)\s*$";
+ public const string PrefixArticleRegex = @"\bإلى\s+";
+ public const string OrRegex = @"\s*((\b|,\s*)(or|and)\b|,)\s*";
+ public static readonly string SpecialYearTermsRegex = $@"\b(((ال)?سنة|(ال)?عام)(\s+{SpecialYearPrefixes})?)";
+ public static readonly string YearPlusNumberRegex = $@"\b({SpecialYearTermsRegex}\s*((?(\d{{2,4}}))|{FullTextYearRegex}))\b";
+ public static readonly string NumberAsTimeRegex = $@"\b({WrittenTimeRegex}|{PeriodHourNumRegex}|{BaseDateTime.HourRegex})\b";
+ public static readonly string TimeBeforeAfterRegex = $@"\b(((?<=\b(ب|((قبل|في موعد لا يتجاوز| بعد)\s))(وقت\s+)?)({WrittenTimeRegex}|{HourNumRegex}|{BaseDateTime.HourRegex}|{MidTimeRegex}))|{MidTimeRegex})\b";
+ public const string DateNumberConnectorRegex = @"^\s*(?\s+at)\s*$";
+ public const string DecadeRegex = @"(?(ال)?عشرات|(ال)?عشرينيات|(ال)?عشرينات|(ال)?ثلاثينات|(ال)?أربعينيات|(ال)?أربعينات|(ال)?خمسينيات|(ال)?خمسينات|(ال)?ستينات|(ال)?سبعينيات|(ال)?سبعينات|(ال)?ثمانينات|(ال)?تسعينات|الألفين|ألفين)";
+ public static readonly string DecadeWithCenturyRegex = $@"({DecadeRegex})((\s+القرن(\s+(الثماني عشر|التاسع عشر)))|(\s+(و{DecadeRegex})))?";
+ public static readonly string RelativeDecadeRegex = $@"\b(?(الثلاثة|الأربعة|الخمسة|الستة|السبعة|الثمانية|التسعة|العشر|\d+)\s+)?((ال)?عقدين|(ال)?عقد|(ال)?عقود)\s+(الماضيين|الماضية|الماضي|القادمين|القادمة|القادم)\b";
+ public static readonly string YearPeriodRegex = $@"(((من|بين)\s+)?{YearRegex}\s*({TillRegex}|{RangeConnectorRegex})\s*{YearRegex})";
+ public static readonly string StrictTillRegex = $@"(?\b(to|(un)?till?|thru|through)\b|{BaseDateTime.RangeConnectorSymbolRegex}(?!\s*(h[1-2]|q[1-4])(?!(\s+of|\s*,\s*))))";
+ public static readonly string StrictRangeConnectorRegex = $@"(?\b(and|through|to)\b|{BaseDateTime.RangeConnectorSymbolRegex}(?!\s*(h[1-2]|q[1-4])(?!(\s+of|\s*,\s*))))";
+ public const string StartMiddleEndRegex = @"\b((?((the\s+)?(start|beginning)\s+of\s+)?)(?((the\s+)?middle\s+of\s+)?)(?((the\s+)?end\s+of\s+)?))";
+ public static readonly string ComplexDatePeriodRegex = $@"(?:((from|during|in)\s+)?{StartMiddleEndRegex}(?.+)\s*({StrictTillRegex})\s*{StartMiddleEndRegex}(?.+)|((between)\s+){StartMiddleEndRegex}(?.+)\s*({StrictRangeConnectorRegex})\s*{StartMiddleEndRegex}(?.+))";
+ public static readonly string FailFastRegex = $@"{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})";
+ public static readonly Dictionary UnitMap = new Dictionary
+ {
+ { @"قرن", @"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" }
+ };
+ public static readonly Dictionary UnitValueMap = new Dictionary
+ {
+ { @"قرن", 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 }
+ };
+ public static readonly Dictionary SpecialYearPrefixesMap = new Dictionary
+ {
+ { @"fiscal", @"FY" },
+ { @"school", @"SY" },
+ { @"fy", @"FY" },
+ { @"sy", @"SY" }
+ };
+ public static readonly Dictionary SeasonMap = new Dictionary
+ {
+ { @"الربيع", @"SP" },
+ { @"ربيع", @"SP" },
+ { @"الصيف", @"SU" },
+ { @"صيف", @"SU" },
+ { @"الخريف", @"FA" },
+ { @"خريف", @"FA" },
+ { @"الشتاء", @"WI" },
+ { @"شتاء", @"WI" }
+ };
+ public static readonly Dictionary SeasonValueMap = new Dictionary
+ {
+ { @"SP", 3 },
+ { @"SU", 6 },
+ { @"FA", 9 },
+ { @"WI", 12 }
+ };
+ public static readonly Dictionary CardinalMap = new Dictionary
+ {
+ { @"الأول", 1 },
+ { @"الثاني", 2 },
+ { @"الثالث", 3 },
+ { @"الرابع", 4 },
+ { @"الخامس", 5 }
+ };
+ public static readonly Dictionary DayOfWeek = new Dictionary
+ {
+ { @"الاثنين", 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 }
+ };
+ public static readonly Dictionary MonthOfYear = new Dictionary
+ {
+ { @"يناير", 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 }
+ };
+ public static readonly Dictionary Numbers = new Dictionary
+ {
+ { @"صفر", 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 }
+ };
+ public static readonly Dictionary DayOfMonth = new Dictionary
+ {
+ { @"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 }
+ };
+ public static readonly Dictionary DoubleNumbers = new Dictionary
+ {
+ { @"half", 0.5 },
+ { @"quarter", 0.25 }
+ };
+ public static readonly Dictionary> HolidayNames = new Dictionary>
+ {
+ { @"easterday", new string[] { @"easterday", @"easter", @"eastersunday" } },
+ { @"ashwednesday", new string[] { @"ashwednesday" } },
+ { @"palmsunday", new string[] { @"palmsunday" } },
+ { @"maundythursday", new string[] { @"maundythursday" } },
+ { @"goodfriday", new string[] { @"goodfriday" } },
+ { @"eastersaturday", new string[] { @"eastersaturday" } },
+ { @"eastermonday", new string[] { @"eastermonday" } },
+ { @"ascensionday", new string[] { @"ascensionday" } },
+ { @"whitesunday", new string[] { @"whitesunday", @"pentecost", @"pentecostday" } },
+ { @"whitemonday", new string[] { @"whitemonday" } },
+ { @"trinitysunday", new string[] { @"trinitysunday" } },
+ { @"corpuschristi", new string[] { @"corpuschristi" } },
+ { @"earthday", new string[] { @"earthday" } },
+ { @"fathers", new string[] { @"fatherday", @"fathersday" } },
+ { @"mothers", new string[] { @"motherday", @"mothersday" } },
+ { @"thanksgiving", new string[] { @"thanksgivingday", @"thanksgiving" } },
+ { @"blackfriday", new string[] { @"blackfriday" } },
+ { @"cybermonday", new string[] { @"cybermonday" } },
+ { @"martinlutherking", new string[] { @"mlkday", @"martinlutherkingday", @"martinlutherkingjrday" } },
+ { @"washingtonsbirthday", new string[] { @"washingtonsbirthday", @"washingtonbirthday", @"presidentsday" } },
+ { @"canberra", new string[] { @"canberraday" } },
+ { @"labour", new string[] { @"labourday", @"laborday" } },
+ { @"columbus", new string[] { @"columbusday" } },
+ { @"memorial", new string[] { @"memorialday" } },
+ { @"yuandan", new string[] { @"yuandan" } },
+ { @"maosbirthday", new string[] { @"maosbirthday" } },
+ { @"teachersday", new string[] { @"teachersday", @"teacherday" } },
+ { @"singleday", new string[] { @"singleday" } },
+ { @"allsaintsday", new string[] { @"allsaintsday" } },
+ { @"youthday", new string[] { @"youthday" } },
+ { @"childrenday", new string[] { @"childrenday", @"childday" } },
+ { @"femaleday", new string[] { @"femaleday" } },
+ { @"treeplantingday", new string[] { @"treeplantingday" } },
+ { @"arborday", new string[] { @"arborday" } },
+ { @"girlsday", new string[] { @"girlsday" } },
+ { @"whiteloverday", new string[] { @"whiteloverday" } },
+ { @"loverday", new string[] { @"loverday", @"loversday" } },
+ { @"christmas", new string[] { @"christmasday", @"christmas" } },
+ { @"xmas", new string[] { @"xmasday", @"xmas" } },
+ { @"newyear", new string[] { @"newyear" } },
+ { @"newyearday", new string[] { @"newyearday" } },
+ { @"newyearsday", new string[] { @"newyearsday" } },
+ { @"inaugurationday", new string[] { @"inaugurationday" } },
+ { @"groundhougday", new string[] { @"groundhougday" } },
+ { @"valentinesday", new string[] { @"valentinesday" } },
+ { @"stpatrickday", new string[] { @"stpatrickday", @"stpatricksday", @"stpatrick" } },
+ { @"aprilfools", new string[] { @"aprilfools" } },
+ { @"stgeorgeday", new string[] { @"stgeorgeday" } },
+ { @"mayday", new string[] { @"mayday", @"intlworkersday", @"internationalworkersday", @"workersday" } },
+ { @"cincodemayoday", new string[] { @"cincodemayoday" } },
+ { @"baptisteday", new string[] { @"baptisteday" } },
+ { @"usindependenceday", new string[] { @"usindependenceday" } },
+ { @"independenceday", new string[] { @"independenceday" } },
+ { @"bastilleday", new string[] { @"bastilleday" } },
+ { @"halloweenday", new string[] { @"halloweenday", @"halloween" } },
+ { @"allhallowday", new string[] { @"allhallowday" } },
+ { @"allsoulsday", new string[] { @"allsoulsday" } },
+ { @"guyfawkesday", new string[] { @"guyfawkesday" } },
+ { @"veteransday", new string[] { @"veteransday" } },
+ { @"christmaseve", new string[] { @"christmaseve" } },
+ { @"newyeareve", new string[] { @"newyearseve", @"newyeareve" } },
+ { @"juneteenth", new string[] { @"juneteenth", @"freedomday", @"jubileeday" } }
+ };
+ public static readonly Dictionary WrittenDecades = new Dictionary
+ {
+ { @"hundreds", 0 },
+ { @"tens", 10 },
+ { @"twenties", 20 },
+ { @"thirties", 30 },
+ { @"forties", 40 },
+ { @"fifties", 50 },
+ { @"sixties", 60 },
+ { @"seventies", 70 },
+ { @"eighties", 80 },
+ { @"nineties", 90 }
+ };
+ public static readonly Dictionary SpecialDecadeCases = new Dictionary
+ {
+ { @"noughties", 2000 },
+ { @"aughts", 2000 },
+ { @"two thousands", 2000 }
+ };
+ public const string DefaultLanguageFallback = @"MDY";
+ public static readonly IList SuperfluousWordList = new List
+ {
+ @"preferably",
+ @"how about",
+ @"maybe",
+ @"perhaps",
+ @"say",
+ @"like"
+ };
+ public static readonly string[] DurationDateRestrictions = { @"today", @"now" };
+ public static readonly Dictionary AmbiguityFiltersDict = new Dictionary
+ {
+ { @"^(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(? MorningTermList = new List
+ {
+ @"morning"
+ };
+ public static readonly IList AfternoonTermList = new List
+ {
+ @"afternoon"
+ };
+ public static readonly IList EveningTermList = new List
+ {
+ @"evening"
+ };
+ public static readonly IList MealtimeBreakfastTermList = new List
+ {
+ @"breakfast"
+ };
+ public static readonly IList MealtimeBrunchTermList = new List
+ {
+ @"brunch"
+ };
+ public static readonly IList MealtimeLunchTermList = new List
+ {
+ @"lunch",
+ @"lunchtime"
+ };
+ public static readonly IList MealtimeDinnerTermList = new List
+ {
+ @"dinner",
+ @"dinnertime",
+ @"supper"
+ };
+ public static readonly IList DaytimeTermList = new List
+ {
+ @"daytime"
+ };
+ public static readonly IList NightTermList = new List
+ {
+ @"night"
+ };
+ public static readonly IList SameDayTerms = new List
+ {
+ @"today",
+ @"otd"
+ };
+ public static readonly IList PlusOneDayTerms = new List
+ {
+ @"tomorrow",
+ @"tmr",
+ @"day after"
+ };
+ public static readonly IList MinusOneDayTerms = new List
+ {
+ @"yesterday",
+ @"day before"
+ };
+ public static readonly IList PlusTwoDayTerms = new List
+ {
+ @"day after tomorrow",
+ @"day after tmr"
+ };
+ public static readonly IList MinusTwoDayTerms = new List
+ {
+ @"day before yesterday"
+ };
+ public static readonly IList FutureTerms = new List
+ {
+ @"this",
+ @"next"
+ };
+ public static readonly IList LastCardinalTerms = new List
+ {
+ @"الأخير"
+ };
+ public static readonly IList MonthTerms = new List
+ {
+ @"month"
+ };
+ public static readonly IList MonthToDateTerms = new List
+ {
+ @"month to date"
+ };
+ public static readonly IList WeekendTerms = new List
+ {
+ @"weekend"
+ };
+ public static readonly IList WeekTerms = new List
+ {
+ @"week"
+ };
+ public static readonly IList YearTerms = new List
+ {
+ @"year"
+ };
+ public static readonly IList GenericYearTerms = new List
+ {
+ @"y"
+ };
+ public static readonly IList YearToDateTerms = new List
+ {
+ @"year to date"
+ };
+ public const string DoubleMultiplierRegex = @"^(bi)(-|\s)?";
+ public const string HalfMultiplierRegex = @"^(semi)(-|\s)?";
+ public const string DayTypeRegex = @"((week)?da(il)?ys?)$";
+ public const string WeekTypeRegex = @"(week(s|ly)?)$";
+ public const string WeekendTypeRegex = @"(weekends?)$";
+ public const string MonthTypeRegex = @"(month(s|ly)?)$";
+ 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/Arabic/DateTimeDefinitions.tt b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/DateTimeDefinitions.tt
new file mode 100644
index 0000000000..1c742b50ba
--- /dev/null
+++ b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/DateTimeDefinitions.tt
@@ -0,0 +1,7 @@
+<#@ template debug="true" hostspecific="true" language="C#" #>
+<#
+ this.DataFilename = @"Patterns\Arabic\Arabic-DateTime.yaml";
+ this.Language = "Arabic";
+ this.ClassName = "DateTimeDefinitions";
+#>
+<#@ include file="..\CommonDefinitions.ttinclude"#>
\ No newline at end of file
diff --git a/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/NumbersDefinitions.cs b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/NumbersDefinitions.cs
new file mode 100644
index 0000000000..292db1a45b
--- /dev/null
+++ b/.NET/Microsoft.Recognizers.Definitions.Common/Arabic/NumbersDefinitions.cs
@@ -0,0 +1,503 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// Generation parameters:
+// - DataFilename: Patterns\Arabic\Arabic-Numbers.yaml
+// - Language: Arabic
+// - ClassName: NumbersDefinitions
+//
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// ------------------------------------------------------------------------------
+
+namespace Microsoft.Recognizers.Definitions.Arabic
+{
+ using System;
+ using System.Collections.Generic;
+
+ public static class NumbersDefinitions
+ {
+ public const string LangMarker = @"Ara";
+ public const bool CompoundNumberLanguage = false;
+ public const bool MultiDecimalSeparatorCulture = true;
+ public const string RoundNumberIntegerRegex = @"(?:مائتان|مائة|مائة|مائتين|ثلاثمائه|أربعة مئة|خمسمائة|ستمائة|سبعمائة|ثمان مائة|تسعمائة|تريليون|ترليون|آلاف|تريليونين|تريليونات|مليار|ملياري|مليارات|مليون|مليونان|ملايين|ملايين|ألف|مليونين|ألفين|مئة|الف|ومائتين|الفين|بألفين|مئتان|الآف)";
+ public const string ZeroToNineIntegerRegex = @"(وخمسة|و خمسة|بإثنان|وواحد|و واحد|واحد|وأربعة|و أربعة|واثنان|اثنان|إثنان|وثلاثة|و ثلاثة|ثلاثة|واربعة|أربع|أربعة|خمسة|وستة|و ستة|ستة|وسبعة|و سبعة|سبعة|وثمانية|و ثمانية|ثمانية|ثمانٍ|وتسعة|و تسعة|تسع|أحد|اثني|إثني|ثلاث|صفر|سبع|ست|اربع|أربع|السادس|الثامنة|تسعة|اثنين|واحدُ|وإثنين|وواحدُ|الواحد:?)";
+ public const string TwoToNineIntegerRegex = @"(?:ثلاث|ثلاثة|سبعة|ثمان|ثمانية|أربع|أربعة|خمسة|تسعة|اثنان|اثنتان|اثنين|اثتنين|اثنتان|إثنان|إثنتان|إثنين|إثتنين|إثنتان|ست|ستة)";
+ public const string NegativeNumberTermsRegex = @"(?(سالب|ناقص)(\s+)?)";
+ public static readonly string NegativeNumberSignRegex = $@"^{NegativeNumberTermsRegex}.*";
+ public const string AnIntRegex = @"(واحد|أحد)(?=\s)";
+ public const string TenToNineteenIntegerRegex = @"(?:((ثلاث|ثلاثة|سبعة|ثمان|ثمانية|أربع|أربعة|خمسة|تسعة|اثنان|اثنان|اثنين|اثتنين|اثنتان|إثنان|إثنتان|إثنين|إثتنين|إثنتان|ستة|أحد|أربعة|إثني|اثني)\s(عشر|عشرة)))";
+ public const string TensNumberIntegerRegex = @"(عشرة|عشرون|ثلاثون|أربعون|خمسون|ستون|سبعون|ثمانون|تسعين|وعشرين|و عشرين|وثلاثين|و ثلاثين|وأربعين|و أربعين|وخمسين|و خمسين|وستين|وستين|وسبعين|و سبعين|وثمانين|و ثمانين|وتسعين|وتسعين|وعشرون|ثلاثون|وأربعون|و أربعون|وخمسون|و خمسون|وستون|و ستون|وسبعون|و سبعون|وثمانون|و ثمانون|وتسعون|و تسعون|عشرين|ثلاثين|أربعين|خمسين|ستين|سبعين|ثمانين|تسعون|العشرون:?)";
+ public static readonly string SeparaIntRegex = $@"(?:((({RoundNumberIntegerRegex}\s{RoundNumberIntegerRegex})|{TenToNineteenIntegerRegex}|({ZeroToNineIntegerRegex}(((و)?)\s+(و)?|\s*-\s*){TensNumberIntegerRegex})|{TensNumberIntegerRegex}|{ZeroToNineIntegerRegex}|{RoundNumberIntegerRegex})(\s+{RoundNumberIntegerRegex})*))|(((\s+{RoundNumberIntegerRegex})+))";
+ public static readonly string AllIntRegex = $@"(?:({SeparaIntRegex})((\s+(و)?)({SeparaIntRegex})(\s+{RoundNumberIntegerRegex})?)*|((({TenToNineteenIntegerRegex}|({TensNumberIntegerRegex}(\s+(و)?|\s*-\s*){ZeroToNineIntegerRegex})|{TensNumberIntegerRegex}|{ZeroToNineIntegerRegex})?(\s+{RoundNumberIntegerRegex})+)\s+(و)?)*{SeparaIntRegex})";
+ public const string PlaceHolderPureNumber = @"\b";
+ public const string PlaceHolderDefault = @"\D|\b";
+ public static readonly Func NumbersWithPlaceHolder = (placeholder) => $@"(((?(الواحد\s)?((السابق|السابقة|الثانية الى|((الذي)\s*(قبل|قبلا)\s*)?(الأخير)|قبل|بعد|سبق|سبقت|التالي|الحالي|الذي|اخر)(\s))?((تالي|الحالي|السابقة|سابق|قادم|التالي|((الذي)\s*(قبل|قبلا)\s*)?(الأخير)|آخر|أخير|حالي|اخر|الاخير|الأولى)(ة)?)|(الاخر|الاول|الأول|اول|الأولى|((الذي)\s*(قبل|قبلا)\s*)?(الأخير)|السابق|التالي|أخر))";
+ public static readonly string BasicOrdinalRegex = $@"({NumberOrdinalRegex}|{RelativeOrdinalRegex})";
+ public static readonly string SuffixBasicOrdinalRegex = $@"(?:(((({TensNumberIntegerRegex}(\s+(و)?|\s*){ZeroToNineIntegerRegex})|{TensNumberIntegerRegex}|{ZeroToNineIntegerRegex}|({RoundNumberIntegerRegex}|المئة(\s+(و)?)))((\s+{RoundNumberIntegerRegex}|المئة)+|({BasicOrdinalRegex})))\s+(و)?)*({TensNumberIntegerRegex}(\s+|\s*))?{BasicOrdinalRegex}|({TensNumberIntegerRegex}))";
+ public static readonly string SuffixRoundNumberOrdinalRegex = $@"(?:({AllIntRegex}\s+){RoundNumberOrdinalRegex})";
+ public static readonly string AllOrdinalRegex = $@"(?:{SuffixBasicOrdinalRegex}|{SuffixRoundNumberOrdinalRegex})";
+ public const string OrdinalNumericRegex = @"(?<=\b)(?:\d{1,3}(\s*,\s*\d{3})*\s*th)(?=\b)";
+ public static readonly string OrdinalRoundNumberRegex = $@"({RoundNumberOrdinalRegex})";
+ public static readonly string OrdinalEnglishRegex = $@"(?<=\b){AllOrdinalRegex}(?=\b)";
+ public const string FractionNotationWithSpacesRegex = @"(((?<={?[\u0600-\u06ff]}|^)-\s*)|(?<=\b))\d+\s+\d+[/]\d+(?=(\b[^/]|$))";
+ public const string FractionNotationWithSpacesRegex2 = @"(((?<={?[\u0600-\u06ff]}|^)-\s*)|(?({AllIntRegex})|((?({AllIntRegex})|(\d+)(?![\.,]))(?=\b)";
+ public static readonly string FractionPrepositionWithinPercentModeRegex = $@"(?({AllIntRegex})|((?({AllIntRegex})|(\d+)(?![\.,]))(?=\b)";
+ public static readonly string FractionWithOrdinalPrefix = $@"({AllOrdinalRegex})(?=\s*({FractionOrdinalPrefix}))";
+ public static readonly string FractionWithPartOfPrefix = $@"((جزء من)\s+)({AllIntRegexWithLocks})";
+ public static readonly string AllPointRegex = $@"((\s+{ZeroToNineIntegerRegex})+|(\s+{SeparaIntRegex}))";
+ public static readonly string AllFloatRegex = $@"{AllIntRegex}(\s+(نقطة|جزء|جزء من)){AllPointRegex}";
+ public static readonly string DoubleWithMultiplierRegex = $@"(((? DoubleDecimalPointRegex = (placeholder) => $@"(((? DoubleWithoutIntegralRegex = (placeholder) => $@"(?<=\s|^)(? DoubleWithThousandMarkRegex = (placeholder) => $@"(((?و)";
+ public static readonly string NumberWithSuffixPercentage = $@"((?)";
+ public const string LessRegex = @"(?:(أقل|اقل|اصغر|أصغر|أخفض|ادنى)(\s*من)?|تحت|(?|=)<)";
+ public const string EqualRegex = @"(يساوي|(?)=)";
+ public static readonly string MoreOrEqualPrefix = $@"(((ليس|لا)\s+{LessRegex})|(على\s+الأقل))";
+ public static readonly string MoreOrEqual = $@"(?:(({MoreRegex}(\s+من)?)\s+(أو|او)?\s+{EqualRegex})|(({MoreOrEqualPrefix}|(تفوق))(\s+(أو|او)?\s+{EqualRegex})?)|(({EqualRegex}\s+(أو|او)?\s+)?({MoreOrEqualPrefix}|تفوق))|>\s*=)";
+ public const string MoreOrEqualSuffix = @"((أو|او)\s+(((أكبر|أعظم|أطول|فوق|اكثر|اكثر|اكبر|أكثر)((?!\s+من)|(\s+من(?!(\s*\d+)))))|((فوق|أكبر|أطول|اكثر)(?!\s+من))))";
+ public static readonly string LessOrEqualPrefix = $@"((ليس\s+{MoreRegex})|(at\s+most)|(بحد أقصى)|(يصل الى))";
+ public static readonly string LessOrEqual = $@"(((لا\s*)?{LessRegex}\s+(أو|او)?\s+{EqualRegex})|({EqualRegex}\s+(أو|او)?\s+(((أقل|اقل|أدنى|اصغر|أصغر|ادنى)(\s+من))|تحت|(?|=)<))|({LessOrEqualPrefix}(\s+(أو|او)?\s+{EqualRegex})?)|(({EqualRegex}\s+(أو|او)?\s+)?{LessOrEqualPrefix})|<\s*=)";
+ public const string LessOrEqualSuffix = @"((أ|ا)?و\s+(أقل)((?!\s+من)|(\s+من(?!(\s*\d+)))))";
+ public const string NumberSplitMark = @"(?)";
+ public const string MoreRegexNoNumberSucceed = @"((أكبر|أعظم|أطول|فوق|اكثر)((?!\s+من)|\s+(من(?!(\s*\d+))))|(فوق|أكبر|أعظم)(?!(\s*\d+)))";
+ public const string LessRegexNoNumberSucceed = @"((أقل|أصغر)((?!\s+من)|\s+(من(?!(\s*\d+))))|(تحت|اقل|أقل|أصغر)(?!((\s*\d+)|\s*من)))";
+ public const string EqualRegexNoNumberSucceed = @"((يساوي)(?!(\s*\d+)))";
+ public static readonly string OneNumberRangeMoreRegex1 = $@"({MoreOrEqual})\s*(ال)?(?({NumberSplitMark}.)+)|({EqualRegex}\s*(أو|او)?\s+({MoreRegex}))(\s+(من))\s*(?({NumberSplitMark}.)+)|({EqualRegex}\s+(أو|او)?\s+({MoreRegex}))\s*(?({NumberSplitMark}.)+)|({MoreRegex})(\s+(من))\s*(?({NumberSplitMark}.)+)|({MoreRegex})\s*(?({NumberSplitMark}.)+)";
+ public static readonly string OneNumberRangeMoreRegex3 = $@"(?({NumberSplitMark}.)+)\s*(و|أو)\s*({MoreRegex})";
+ public static readonly string OneNumberRangeMoreRegex2 = $@"(?({NumberSplitMark}.)+)\s*{MoreOrEqualSuffix}";
+ public static readonly string OneNumberRangeMoreSeparateRegex = $@"({MoreRegex}\s*(من)\s+(?({NumberSplitMark}.)+)\s+(أو|او)\s+{EqualRegexNoNumberSucceed})|({EqualRegex}\s+(?({NumberSplitMark}.)+)(\s+(أو|او)\s+){MoreRegexNoNumberSucceed})|({MoreRegex}\s+(?({NumberSplitMark}.)+)(\s+(أو|او)\s+){EqualRegexNoNumberSucceed})";
+ public static readonly string OneNumberRangeLessRegex1 = $@"(({LessOrEqual})\s*(ال)?(?