-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from microsoft/master
Fetch Upstream fork
- Loading branch information
Showing
513 changed files
with
6,306 additions
and
6,637 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.NET/Microsoft.Recognizers.Definitions/Microsoft.Recognizers.Definitions.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 10 additions & 33 deletions
43
...icrosoft.Recognizers.Text.Choice/Arabic/Extractors/ArabicBooleanExtractorConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.Text.RegularExpressions; | ||
|
||
using Microsoft.Recognizers.Definitions.Arabic; | ||
using Microsoft.Recognizers.Text.Choice.Extractors; | ||
|
||
namespace Microsoft.Recognizers.Text.Choice.Arabic | ||
{ | ||
public class ArabicBooleanExtractorConfiguration : IBooleanExtractorConfiguration | ||
public class ArabicBooleanExtractorConfiguration : BaseBooleanExtractorConfiguration | ||
{ | ||
public static readonly Regex TrueRegex = | ||
new Regex(ChoiceDefinitions.TrueRegex, RegexOptions.Singleline | RegexOptions.RightToLeft); | ||
|
||
public static readonly Regex FalseRegex = | ||
new Regex(ChoiceDefinitions.FalseRegex, RegexOptions.Singleline | RegexOptions.RightToLeft); | ||
|
||
public static readonly Regex TokenRegex = | ||
new Regex(ChoiceDefinitions.TokenizerRegex, RegexOptions.Singleline | RegexOptions.RightToLeft); | ||
|
||
public static readonly IDictionary<Regex, string> MapRegexes = new Dictionary<Regex, string>() | ||
{ | ||
{ TrueRegex, Constants.SYS_BOOLEAN_TRUE }, | ||
{ FalseRegex, Constants.SYS_BOOLEAN_FALSE }, | ||
}; | ||
|
||
public ArabicBooleanExtractorConfiguration(bool onlyTopMatch = true) | ||
: base( | ||
trueRegex: ChoiceDefinitions.TrueRegex, | ||
falseRegex: ChoiceDefinitions.FalseRegex, | ||
tokenRegex: ChoiceDefinitions.TokenizerRegex, | ||
options: RegexOptions.Singleline | RegexOptions.RightToLeft, | ||
allowPartialMatch: false, | ||
maxDistance: 2, | ||
onlyTopMatch) | ||
{ | ||
this.OnlyTopMatch = onlyTopMatch; | ||
} | ||
|
||
Regex IBooleanExtractorConfiguration.TrueRegex => TrueRegex; | ||
|
||
Regex IBooleanExtractorConfiguration.FalseRegex => FalseRegex; | ||
|
||
IDictionary<Regex, string> IChoiceExtractorConfiguration.MapRegexes => MapRegexes; | ||
|
||
Regex IChoiceExtractorConfiguration.TokenRegex => TokenRegex; | ||
|
||
public bool AllowPartialMatch => false; | ||
|
||
public int MaxDistance => 2; | ||
|
||
public bool OnlyTopMatch { get; } | ||
} | ||
} |
43 changes: 10 additions & 33 deletions
43
...ft.Recognizers.Text.Choice/Bulgarian/Extractors/BulgarianBooleanExtractorConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.Text.RegularExpressions; | ||
|
||
using Microsoft.Recognizers.Definitions.Bulgarian; | ||
using Microsoft.Recognizers.Text.Choice.Extractors; | ||
|
||
namespace Microsoft.Recognizers.Text.Choice.Bulgarian | ||
{ | ||
public class BulgarianBooleanExtractorConfiguration : IBooleanExtractorConfiguration | ||
public class BulgarianBooleanExtractorConfiguration : BaseBooleanExtractorConfiguration | ||
{ | ||
public static readonly Regex TrueRegex = | ||
new Regex(ChoiceDefinitions.TrueRegex, RegexOptions.Singleline); | ||
|
||
public static readonly Regex FalseRegex = | ||
new Regex(ChoiceDefinitions.FalseRegex, RegexOptions.Singleline); | ||
|
||
public static readonly Regex TokenRegex = | ||
new Regex(ChoiceDefinitions.TokenizerRegex, RegexOptions.Singleline); | ||
|
||
public static readonly IDictionary<Regex, string> MapRegexes = new Dictionary<Regex, string>() | ||
{ | ||
{ TrueRegex, Constants.SYS_BOOLEAN_TRUE }, | ||
{ FalseRegex, Constants.SYS_BOOLEAN_FALSE }, | ||
}; | ||
|
||
public BulgarianBooleanExtractorConfiguration(bool onlyTopMatch = true) | ||
: base( | ||
trueRegex: ChoiceDefinitions.TrueRegex, | ||
falseRegex: ChoiceDefinitions.FalseRegex, | ||
tokenRegex: ChoiceDefinitions.TokenizerRegex, | ||
options: RegexOptions.Singleline, | ||
allowPartialMatch: false, | ||
maxDistance: 2, | ||
onlyTopMatch) | ||
{ | ||
this.OnlyTopMatch = onlyTopMatch; | ||
} | ||
|
||
Regex IBooleanExtractorConfiguration.TrueRegex => TrueRegex; | ||
|
||
Regex IBooleanExtractorConfiguration.FalseRegex => FalseRegex; | ||
|
||
IDictionary<Regex, string> IChoiceExtractorConfiguration.MapRegexes => MapRegexes; | ||
|
||
Regex IChoiceExtractorConfiguration.TokenRegex => TokenRegex; | ||
|
||
public bool AllowPartialMatch => false; | ||
|
||
public int MaxDistance => 2; | ||
|
||
public bool OnlyTopMatch { get; } | ||
} | ||
} |
43 changes: 10 additions & 33 deletions
43
...rosoft.Recognizers.Text.Choice/Chinese/Extractors/ChineseBooleanExtractorConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.Text.RegularExpressions; | ||
|
||
using Microsoft.Recognizers.Definitions.Chinese; | ||
using Microsoft.Recognizers.Text.Choice.Extractors; | ||
|
||
namespace Microsoft.Recognizers.Text.Choice.Chinese | ||
{ | ||
public class ChineseBooleanExtractorConfiguration : IBooleanExtractorConfiguration | ||
public class ChineseBooleanExtractorConfiguration : BaseBooleanExtractorConfiguration | ||
{ | ||
public static readonly Regex TrueRegex = | ||
new Regex(ChoiceDefinitions.TrueRegex, RegexOptions.Singleline); | ||
|
||
public static readonly Regex FalseRegex = | ||
new Regex(ChoiceDefinitions.FalseRegex, RegexOptions.Singleline); | ||
|
||
public static readonly Regex TokenRegex = | ||
new Regex(ChoiceDefinitions.TokenizerRegex, RegexOptions.Singleline); | ||
|
||
public static readonly IDictionary<Regex, string> MapRegexes = new Dictionary<Regex, string>() | ||
{ | ||
{ TrueRegex, Constants.SYS_BOOLEAN_TRUE }, | ||
{ FalseRegex, Constants.SYS_BOOLEAN_FALSE }, | ||
}; | ||
|
||
public ChineseBooleanExtractorConfiguration(bool onlyTopMatch = true) | ||
: base( | ||
trueRegex: ChoiceDefinitions.TrueRegex, | ||
falseRegex: ChoiceDefinitions.FalseRegex, | ||
tokenRegex: ChoiceDefinitions.TokenizerRegex, | ||
options: RegexOptions.Singleline, | ||
allowPartialMatch: false, | ||
maxDistance: 2, | ||
onlyTopMatch) | ||
{ | ||
this.OnlyTopMatch = onlyTopMatch; | ||
} | ||
|
||
Regex IBooleanExtractorConfiguration.TrueRegex => TrueRegex; | ||
|
||
Regex IBooleanExtractorConfiguration.FalseRegex => FalseRegex; | ||
|
||
IDictionary<Regex, string> IChoiceExtractorConfiguration.MapRegexes => MapRegexes; | ||
|
||
Regex IChoiceExtractorConfiguration.TokenRegex => TokenRegex; | ||
|
||
public bool AllowPartialMatch => false; | ||
|
||
public int MaxDistance => 2; | ||
|
||
public bool OnlyTopMatch { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 10 additions & 33 deletions
43
.../Microsoft.Recognizers.Text.Choice/Dutch/Extractors/DutchBooleanExtractorConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.Text.RegularExpressions; | ||
|
||
using Microsoft.Recognizers.Definitions.Dutch; | ||
using Microsoft.Recognizers.Text.Choice.Extractors; | ||
|
||
namespace Microsoft.Recognizers.Text.Choice.Dutch | ||
{ | ||
public class DutchBooleanExtractorConfiguration : IBooleanExtractorConfiguration | ||
public class DutchBooleanExtractorConfiguration : BaseBooleanExtractorConfiguration | ||
{ | ||
public static readonly Regex TrueRegex = | ||
new Regex(ChoiceDefinitions.TrueRegex, RegexOptions.Singleline); | ||
|
||
public static readonly Regex FalseRegex = | ||
new Regex(ChoiceDefinitions.FalseRegex, RegexOptions.Singleline); | ||
|
||
public static readonly Regex TokenRegex = | ||
new Regex(ChoiceDefinitions.TokenizerRegex, RegexOptions.Singleline); | ||
|
||
public static readonly IDictionary<Regex, string> MapRegexes = new Dictionary<Regex, string>() | ||
{ | ||
{ TrueRegex, Constants.SYS_BOOLEAN_TRUE }, | ||
{ FalseRegex, Constants.SYS_BOOLEAN_FALSE }, | ||
}; | ||
|
||
public DutchBooleanExtractorConfiguration(bool onlyTopMatch = true) | ||
: base( | ||
trueRegex: ChoiceDefinitions.TrueRegex, | ||
falseRegex: ChoiceDefinitions.FalseRegex, | ||
tokenRegex: ChoiceDefinitions.TokenizerRegex, | ||
options: RegexOptions.Singleline, | ||
allowPartialMatch: false, | ||
maxDistance: 2, | ||
onlyTopMatch) | ||
{ | ||
this.OnlyTopMatch = onlyTopMatch; | ||
} | ||
|
||
Regex IBooleanExtractorConfiguration.TrueRegex => TrueRegex; | ||
|
||
Regex IBooleanExtractorConfiguration.FalseRegex => FalseRegex; | ||
|
||
IDictionary<Regex, string> IChoiceExtractorConfiguration.MapRegexes => MapRegexes; | ||
|
||
Regex IChoiceExtractorConfiguration.TokenRegex => TokenRegex; | ||
|
||
public bool AllowPartialMatch => false; | ||
|
||
public int MaxDistance => 2; | ||
|
||
public bool OnlyTopMatch { get; } | ||
} | ||
} |
Oops, something went wrong.