Skip to content

Commit

Permalink
Multiple simple fixes for unsuppoted cases and false positive filters (
Browse files Browse the repository at this point in the history
…#2675)

* Support for "current date" in ranges and additional false positive filter in EN.

* Fix for "hasta"/"até" not supported as range modifier in ES (#2665) and PT respectively.

* Adding ambiguity filter in Sequence/PhoneNumber.

* Standardize code prefix and dependencies in Java resource generation.

* Adding false positive filter rules (fixes #2671, #2672, #2673, #2674).

* Re-generate resources across platforms.
  • Loading branch information
tellarin authored Jul 15, 2021
1 parent d85f617 commit 14aca90
Show file tree
Hide file tree
Showing 42 changed files with 663 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public static class BasePhoneNumbers
':'
};
public const string ColonPrefixCheckRegex = @"(([a-z])\s*$)";
public static readonly Dictionary<string, string> AmbiguityFiltersDict = new Dictionary<string, string>
{
{ @"^\d{4}-\d{4}$", @"omb(\s*(no(\.)?|number|#))?:?\s+\d{4}-?\d{4}" }
};
public static readonly IList<char> SpecialBoundaryMarkers = new List<char>
{
'-',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public static class DateTimeDefinitions
public static readonly string ThisRegex = $@"\b(this(\s*week{PrefixWeekDayRegex}?)?\s*{WeekDayRegex})|({WeekDayRegex}((\s+of)?\s+this\s*week))\b";
public static readonly string LastDateRegex = $@"\b({PreviousPrefixRegex}(\s*week{PrefixWeekDayRegex}?)?\s*{WeekDayRegex})|({WeekDayRegex}(\s+(of\s+)?last\s*week))\b";
public static readonly string NextDateRegex = $@"\b({NextPrefixRegex}(\s*week{PrefixWeekDayRegex}?)?\s*{WeekDayRegex})|((on\s+)?{WeekDayRegex}((\s+of)?\s+(the\s+following|(the\s+)?next)\s*week))\b";
public static readonly string SpecialDayRegex = $@"\b((the\s+)?day before yesterday|(the\s+)?day after (tomorrow|tmr)|the\s+day\s+(before|after)(?!=\s+day)|((the\s+)?({RelativeRegex}|my)\s+day)|yesterday|tomorrow|tmr|today|otd)\b";
public static readonly string SpecialDayWithNumRegex = $@"\b((?<number>{WrittenNumRegex})\s+days?\s+from\s+(?<day>yesterday|tomorrow|tmr|today))\b";
public static readonly string SpecialDayRegex = $@"\b((the\s+)?day before yesterday|(the\s+)?day after (tomorrow|tmr)|the\s+day\s+(before|after)(?!=\s+day)|((the\s+)?({RelativeRegex}|my)\s+day)|yesterday|tomorrow|tmr|today|otd|current date)\b";
public static readonly string SpecialDayWithNumRegex = $@"\b((?<number>{WrittenNumRegex})\s+days?\s+from\s+(?<day>yesterday|tomorrow|tmr|today|current date))\b";
public static readonly string RelativeDayRegex = $@"\b(((the\s+)?{RelativeRegex}\s+day))\b";
public const string SetWeekDayRegex = @"\b(?<prefix>on\s+)?(?<weekday>morning|afternoon|evening|night|(sun|mon|tues|wednes|thurs|fri|satur)day)s\b";
public static readonly string WeekDayOfMonthRegex = $@"(?<wom>(the\s+)?(?<cardinal>first|1st|second|2nd|third|3rd|fourth|4th|fifth|5th|last)\s+(week\s+{MonthSuffixRegex}[\.]?\s+(on\s+)?{WeekDayRegex}|{WeekDayRegex}\s+{MonthSuffixRegex}))";
Expand Down Expand Up @@ -238,7 +238,7 @@ public static class DateTimeDefinitions
public const string AMTimeRegex = @"(?<am>morning)";
public const string PMTimeRegex = @"\b(?<pm>afternoon|evening|night)\b";
public const string NightTimeRegex = @"(night)";
public const string NowTimeRegex = @"(now|at\s+(present|this\s+time|th(e|is)\s+minute|the\s+(moment|present\s+time)))";
public const string NowTimeRegex = @"(now|at\s+(present|this\s+time|th(e|is)\s+minute|the\s+(moment|(current|present)\s+time)))";
public const string RecentlyTimeRegex = @"(recently|previously)";
public const string AsapTimeRegex = @"(as soon as possible|asap)";
public const string InclusiveModPrepositions = @"(?<include>((on|in|at)\s+or\s+)|(\s+or\s+(on|in|at)))";
Expand All @@ -255,7 +255,7 @@ public static class DateTimeDefinitions
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+(?<next>{NextPrefixRegex}))?)\b";
public const string TodayNowRegex = @"\b(today|now)\b";
public const string TodayNowRegex = @"\b(today|now|current (date|time))\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)$)";
Expand Down Expand Up @@ -742,17 +742,18 @@ public static class DateTimeDefinitions
@"say",
@"like"
};
public static readonly string[] DurationDateRestrictions = { @"today", @"now" };
public static readonly string[] DurationDateRestrictions = { @"today", @"now", @"current date" };
public static readonly Dictionary<string, string> AmbiguityFiltersDict = new Dictionary<string, string>
{
{ @"^\d{4}$", @"(\d\.\d{4}|\d{4}\.\d)" },
{ @"^(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(?<!an?\s+)(a|one) second (round|time)\b" },
{ @"\bmay$", @"\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)))|(?<!(in|during|through)\s+)may,? at (its|h(is|er)|y?our|my))\b" },
{ @"^(a|one) second$", @"\b(?<!an?\s+)(a|one) second (round|time|wave|turn|chance|thought|opinion|cycle|take|meaning|life|job|home|hand|language|display|monitor|stimulus|dose|vaccination|shot|jab)\b" },
{ @"\b(breakfast|brunch|lunch(time)?|dinner(time)?|supper)$", @"(?<!\b(at|before|after|around|circa)\b\s)(breakfast|brunch|lunch|dinner|supper)(?!\s*time)" },
{ @"^\d+m$", @"^\d+m$" },
{ @"^(apr|aug|dec|feb|jan|jul|jun|mar|may|nov|oct|sept?)$", @"([$%£&!?@#])(apr|aug|dec|feb|jan|jul|jun|mar|may|nov|oct|sept?)|(apr|aug|dec|feb|jan|jul|jun|mar|may|nov|oct|sept?)([$%£&@#])" }
{ @"^(apr|aug|dec|feb|jan|jul|jun|mar|may|nov|oct|sept?)$", @"([$%£&!?@#])(apr|aug|dec|feb|jan|jul|jun|mar|may|nov|oct|sept?)|(apr|aug|dec|feb|jan|jul|jun|mar|may|nov|oct|sept?)([$%£&@#])" },
{ @"^(to\s+date)$", @"\b((equals?|up)\s+to\s+date)\b" }
};
public static readonly IList<string> MorningTermList = new List<string>
{
Expand Down Expand Up @@ -801,6 +802,7 @@ public static class DateTimeDefinitions
public static readonly IList<string> SameDayTerms = new List<string>
{
@"today",
@"current date",
@"otd"
};
public static readonly IList<string> PlusOneDayTerms = new List<string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,8 @@ public static class NumbersWithUnitDefinitions
};
public static readonly Dictionary<string, string> AmbiguityFiltersDict = new Dictionary<string, string>
{
{ @"\bm\b", @"((('|’)\s*m)|(m\s*('|’)))" }
{ @"\bm\b", @"((('|’)\s*m)|(m\s*('|’)))" },
{ @"^\d{5} f$", @"\b([a-z]{2} \d{5} f)\b" }
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ public static class DateTimeDefinitions
public static readonly string WithinNextPrefixRegex = $@"\b(dentro\s+d(e|as)(\s+(?<next>{NextPrefixRegex}))?)\b";
public const string TodayNowRegex = @"\b(hoje|agora)\b";
public const string CenturySuffixRegex = @"^[.]";
public const string FromRegex = @"((desde|de)(\s*a(s)?)?)$";
public const string FromRegex = @"(de(sde)?(\s*a(s)?)?)$";
public const string BetweenRegex = @"(entre\s*([oa](s)?)?)";
public const string WeekDayRegex = @"\b(?<weekday>(domingos?|(segunda|ter[çc]a|quarta|quinta|sexta)s?([-\s+]feiras?)?|s[aá]bados?|(2|3|4|5|6)[aª])\b|(dom|seg|ter[cç]|qua|qui|sex|sab)\b(\.?(?=\s|,|;|$)))";
public static readonly string OnRegex = $@"(?<=\b(em|no)\s+)({DayRegex}s?)\b";
public static readonly string RelaxedOnRegex = $@"(?<=\b(em|n[oa]|d[oa])\s+)(dia\s+)?({DayRegex}s?)\b(?!\s*[/\\\-\.,:\s]\s*(\d|(de\s+)?{MonthRegex}))";
public static readonly string RelaxedOnRegex = $@"((?<=\b(em|[nd][oa])\s+)(dia\s+)?({DayRegex}s?)|dia\s+{DayRegex}s?)\b(?!\s*[/\\\-\.,:\s]\s*(\d|(de\s+)?{MonthRegex}))";
public static readonly string ThisRegex = $@"\b(([nd]?es[st][ea]\s*){WeekDayRegex})|({WeekDayRegex}\s*([nd]?es[st]a\s+semana))\b";
public static readonly string LastDateRegex = $@"\b(([uú]ltim[ao])\s*{WeekDayRegex})|({WeekDayRegex}(\s+(([nd]?es[st]a|na|da)\s+([uú]ltima\s+)?semana)))\b";
public static readonly string LastDateRegex = $@"\b(([uú]ltim[ao])\s*{WeekDayRegex})|({WeekDayRegex}(\s+(([nd]?es[st]a|[nd]a)\s+([uú]ltima\s+)?semana)))\b";
public static readonly string NextDateRegex = $@"\b(((pr[oó]xim[oa]|seguinte)\s*){WeekDayRegex})|({WeekDayRegex}((\s+(pr[oó]xim[oa]|seguinte))|(\s+(da\s+)?(semana\s+seguinte|pr[oó]xima\s+semana))))\b";
public const string SpecialDayRegex = @"\b((d?o\s+)?(dia\s+antes\s+de\s+ontem|antes\s+de\s+ontem|anteontem)|((d?o\s+)?(dia\s+|depois\s+|dia\s+depois\s+)?de\s+amanh[aã])|(o\s)?dia\s+seguinte|(o\s)?pr[oó]ximo\s+dia|(o\s+)?[uú]ltimo\s+dia|ontem|amanh[ãa]|hoje)|(do\s+dia$)\b";
public const string SpecialDayWithNumRegex = @"^[.]";
Expand Down Expand Up @@ -148,13 +148,13 @@ public static class DateTimeDefinitions
public const string PrepositionRegex = @"(?<prep>([àa]s?|em|por|pel[ao]|n[ao]|de|d[ao]?)?$)";
public const string NowRegex = @"\b(?<now>((logo|exatamente)\s+)?agora(\s+mesmo)?|neste\s+momento|(assim\s+que|t[ãa]o\s+cedo\s+quanto)\s+(poss[ií]vel|possas?|possamos)|o\s+mais\s+(cedo|r[aá]pido)\s+poss[íi]vel|recentemente|previamente)\b";
public const string SuffixRegex = @"^\s*((e|a|em|por|pel[ao]|n[ao]|de)\s+)?(manh[ãa]|madrugada|meio\s*dia|tarde|noite)\b";
public const string TimeOfDayRegex = @"\b(?<timeOfDay>manh[ãa]|madrugada|tarde|noite|((depois\s+do|ap[óo]s\s+o)\s+(almo[çc]o|meio dia|meio-dia)))\b";
public const string TimeOfDayRegex = @"\b(?<timeOfDay>manh[ãa]|madrugada|tarde|noite|((depois\s+do|ap[óo]s\s+o)\s+(almo[çc]o|meio[ -]dia)))\b";
public static readonly string SpecificTimeOfDayRegex = $@"\b(((((a)?\s+|[nd]?es[st]a|seguinte|pr[oó]xim[oa]|[uú]ltim[oa])\s+)?{TimeOfDayRegex}))\b";
public static readonly string TimeOfTodayAfterRegex = $@"^\s*(,\s*)?([àa]|em|por|pel[ao]|de|no|na?\s+)?{SpecificTimeOfDayRegex}";
public static readonly string TimeOfTodayBeforeRegex = $@"({SpecificTimeOfDayRegex}(\s*,)?(\s+([àa]s|para))?\s*)";
public static readonly string SimpleTimeOfTodayAfterRegex = $@"({HourNumRegex}|{BaseDateTime.HourRegex})\s*(,\s*)?{SpecificTimeOfDayRegex}";
public static readonly string SimpleTimeOfTodayBeforeRegex = $@"({SpecificTimeOfDayRegex}(\s*,)?(\s+([àa]s|((cerca|perto|ao\s+redor|por\s+volta)\s+(de|das))))?\s*({HourNumRegex}|{BaseDateTime.HourRegex}))";
public const string SpecificEndOfRegex = @"((no|ao)\s+)?(fi(m|nal)|t[ée]rmin(o|ar))(\s+d?o(\s+dia)?(\s+de)?)?\s*$";
public const string SpecificEndOfRegex = @"([na]o\s+)?(fi(m|nal)|t[ée]rmin(o|ar))(\s+d?o(\s+dia)?(\s+de)?)?\s*$";
public const string UnspecificEndOfRegex = @"^[.]";
public const string UnspecificEndOfRangeRegex = @"^[.]";
public const string UnitRegex = @"(?<unit>anos?|meses|m[êe]s|semanas?|dias?|horas?|hrs?|hs?|minutos?|mins?|segundos?|segs?)\b";
Expand Down Expand Up @@ -185,16 +185,16 @@ public static class DateTimeDefinitions
public static readonly string HolidayRegex1 = $@"\b(?<holiday>sexta-feira santa|sexta-feira da paix[ãa]o|quarta-feira de cinzas|carnaval|dia dos? presidentes?|ano novo chin[eê]s|ano novo|v[ée]spera de ano novo|natal|v[ée]spera de natal|dia de a[cç][ãa]o de gra[çc]as|a[cç][ãa]o de gra[çc]as|yuandan|halloween|dia das bruxas|p[áa]scoa)(\s+(d[eo]?\s+)?({YearRegex}|(?<order>(pr[oó]xim[oa]?|[nd]?es[st][ea]|[uú]ltim[oa]?|em))\s+ano))?\b";
public static readonly string HolidayRegex2 = $@"\b(?<holiday>(dia\s+(d[eoa]s?\s+)?)?(martin luther king|todos os santos|s[ãa]o (patr[íi]cio|francisco|jorge|jo[ãa]o)|independ[êe]ncia))(\s+(d[eo]?\s+)?({YearRegex}|(?<order>(pr[oó]xim[oa]?|[nd]?es[st][ea]|[uú]ltim[oa]?|em))\s+ano))?\b";
public static readonly string HolidayRegex3 = $@"\b(?<holiday>(dia\s+d[eoa]s?\s+)(trabalh(o|ador(es)?)|m[ãa]es?|pais?|mulher(es)?|crian[çc]as?|marmota|professor(es)?))(\s+(d[eo]?\s+)?({YearRegex}|(?<order>(pr[oó]xim[oa]?|[nd]?es[st][ea]|[uú]ltim[oa]?|em))\s+ano))?\b";
public const string BeforeRegex = @"(antes(\s+(de|dos?|das?)?)?)";
public const string AfterRegex = @"((depois|ap[óo]s)(\s*(de|d?os?|d?as?)?)?)";
public const string BeforeRegex = @"(antes(\s+(d[aeo]s?)?)?|at[ée]h?(\s+[oàa]s?\b)?)";
public const string AfterRegex = @"((depois|ap[óo]s|a\s+partir)(\s*(de|d?[oa]s?)?)?)";
public const string SinceRegex = @"(desde(\s+(as?|o))?)";
public const string AroundRegex = @"(?:\b(?:cerca|perto|ao\s+redor|por\s+volta)\s*?\b)(\s+(de|das))?";
public const string PeriodicRegex = @"\b(?<periodic>di[áa]ri[ao]|diariamente|mensalmente|semanalmente|quinzenalmente|anualmente)\b";
public const string PeriodicRegex = @"\b(?<periodic>di[áa]ri[ao]|(diaria|mensal|semanal|quinzenal|anual)mente)\b";
public const string EachExpression = @"cada|tod[oa]s?\s*([oa]s)?";
public static readonly string EachUnitRegex = $@"(?<each>({EachExpression})\s*{UnitRegex})";
public static readonly string EachPrefixRegex = $@"(?<each>({EachExpression})\s*$)";
public static readonly string EachDayRegex = $@"\s*({EachExpression})\s*dias\s*\b";
public static readonly string BeforeEachDayRegex = $@"({EachExpression})\s*dias(\s+(as|ao))?\s*\b";
public static readonly string BeforeEachDayRegex = $@"({EachExpression})\s*dias(\s+a[so])?\s*\b";
public static readonly string SetEachRegex = $@"(?<each>({EachExpression})\s*)";
public const string LaterEarlyPeriodRegex = @"^[.]";
public const string WeekWithWeekDayRangeRegex = @"^[.]";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public static class DateTimeDefinitions
public static readonly string HolidayRegex1 = $@"\b(?<holiday>viernes santo|mi[eé]rcoles de ceniza|martes de carnaval|d[ií]a (de|de los) presidentes?|clebraci[oó]n de mao|año nuevo chino|año nuevo|noche vieja|(festividad de )?los mayos|d[ií]a de los inocentes|navidad|noche buena|d[ií]a de acci[oó]n de gracias|acci[oó]n de gracias|yuandan|halloween|noches de brujas|pascuas)(\s+(del?\s+)?({YearRegex}|(?<order>(pr[oó]xim[oa]?|est[ea]|[uú]ltim[oa]?|en))\s+año))?\b";
public static readonly string HolidayRegex2 = $@"\b(?<holiday>(d[ií]a( del?( la)?)? )?(martin luther king|todos los santos|blanco|san patricio|san valent[ií]n|san jorge|cinco de mayo|independencia|raza|trabajador))(\s+(del?\s+)?({YearRegex}|(?<order>(pr[oó]xim[oa]?|est[ea]|[uú]ltim[oa]?|en))\s+año))?\b";
public static readonly string HolidayRegex3 = $@"\b(?<holiday>(d[ií]a( internacional)?( del?( l[ao]s?)?)? )(trabajador(es)?|madres?|padres?|[aá]rbol|mujer(es)?|solteros?|niños?|marmota|san valent[ií]n|maestro))(\s+(del?\s+)?({YearRegex}|(?<order>(pr[oó]xim[oa]?|est[ea]|[uú]ltim[oa]?|en))\s+año))?\b";
public const string BeforeRegex = @"(\b((ante(s|rior)|m[aá]s\s+temprano|no\s+m[aá]s\s+tard(e|ar)|(?<include>tan\s+tarde\s+como))(\s+(del?|a|que)(\s+(el|las?|los?))?)?)|(?<!\w|>)((?<include><\s*=)|<))";
public const string BeforeRegex = @"(\b((ante(s|rior)|m[aá]s\s+temprano|no\s+m[aá]s\s+tard(e|ar)|hasta|(?<include>tan\s+tarde\s+como))(\s+(del?|a|que)(\s+(el|las?|los?))?)?)|(?<!\w|>)((?<include><\s*=)|<))";
public const string AfterRegex = @"((\b(despu[eé]s|(año\s+)?posterior|m[aá]s\s+tarde|a\s+primeros)(\s*(del?|en|a)(\s+(el|las?|los?))?)?|(empi?en?zando|comenzando)(\s+(el|las?|los?))?)\b|(?<!\w|<)((?<include>>\s*=)|>))";
public const string SinceRegex = @"\b(((cualquier\s+tiempo\s+)?(desde|a\s+partir\s+del?)|tan\s+(temprano|pronto)\s+como(\s+(de|a))?)(\s+(el|las?|los?))?)\b";
public static readonly string SinceRegexExp = $@"({SinceRegex}|\bde\b)";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Microsoft.Recognizers.Definitions;
using Microsoft.Recognizers.Definitions.Chinese;
using Microsoft.Recognizers.Definitions.Utilities;

namespace Microsoft.Recognizers.Text.Sequence.Chinese
{
Expand All @@ -14,6 +16,7 @@ public ChinesePhoneNumberExtractorConfiguration(SequenceOptions options)
EndWordBoundariesRegex = PhoneNumbersDefinitions.EndWordBoundariesRegex;
ColonPrefixCheckRegex = new Regex(PhoneNumbersDefinitions.ColonPrefixCheckRegex);
ForbiddenPrefixMarkers = (List<char>)PhoneNumbersDefinitions.ForbiddenPrefixMarkers;
AmbiguityFiltersDict = AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(BasePhoneNumbers.AmbiguityFiltersDict);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ public PhoneNumberConfiguration(SequenceOptions options = SequenceOptions.None)

public List<char> ForbiddenSuffixMarkers { get; set; }

public Dictionary<Regex, Regex> AmbiguityFiltersDict { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public override List<ExtractResult> Extract(string text)
}
}

// filter hexadecimal address like 00 10 00 31 46 D9 E9 11
// Filter hexadecimal address like 00 10 00 31 46 D9 E9 11
var maskMatchCollection = Regex.Matches(text, BasePhoneNumbers.PhoneNumberMaskRegex);

for (var index = ers.Count - 1; index >= 0; --index)
Expand All @@ -223,6 +223,9 @@ public override List<ExtractResult> Extract(string text)
}
}

// Remove common ambiguous cases
ers = FilterAmbiguity(ers, text);

return ers;
}

Expand All @@ -244,5 +247,26 @@ private static int CountDigits(string candidateString)

return count;
}

private List<ExtractResult> FilterAmbiguity(List<ExtractResult> extractResults, string text)
{
if (this.config.AmbiguityFiltersDict != null)
{
foreach (var regex in this.config.AmbiguityFiltersDict)
{
foreach (var extractResult in extractResults)
{
if (regex.Key.IsMatch(extractResult.Text))
{
var matches = regex.Value.Matches(text).Cast<Match>();
extractResults = extractResults.Where(er => !matches.Any(m => m.Index < er.Start + er.Length && m.Index + m.Length > er.Start))
.ToList();
}
}
}
}

return extractResults;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Microsoft.Recognizers.Definitions;
using Microsoft.Recognizers.Definitions.Utilities;

namespace Microsoft.Recognizers.Text.Sequence
{
Expand All @@ -16,6 +17,7 @@ public BasePhoneNumberExtractorConfiguration(SequenceOptions options)
ColonMarkers = (List<char>)BasePhoneNumbers.ColonMarkers;
ForbiddenPrefixMarkers = (List<char>)BasePhoneNumbers.ForbiddenPrefixMarkers;
ForbiddenSuffixMarkers = (List<char>)BasePhoneNumbers.ForbiddenSuffixMarkers;
AmbiguityFiltersDict = AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(BasePhoneNumbers.AmbiguityFiltersDict);
}
}
}
Loading

0 comments on commit 14aca90

Please sign in to comment.