1 instantiation of TextNormalizingEstimator
Microsoft.ML.Transforms (1)
Text\TextFeaturizingEstimator.cs (1)
469
new
TextNormalizingEstimator
(h, tparams.TextCase, tparams.KeepDiacritics, tparams.KeepPunctuations,
50 references to TextNormalizingEstimator
Microsoft.ML.Samples (3)
Dynamic\Transforms\Text\FeaturizeTextWithOptions.cs (1)
50
CaseMode =
TextNormalizingEstimator
.CaseMode.Lower,
Dynamic\Transforms\Text\NormalizeText.cs (2)
26
var
normTextPipeline = mlContext.Transforms.Text.NormalizeText(
27
"NormalizedText", "Text",
TextNormalizingEstimator
.CaseMode.Lower,
Microsoft.ML.Tests (16)
OnnxConversionTest.cs (2)
391
new TextNormalizingEstimator(mlContext, keepDiacritics: true, caseMode:
TextNormalizingEstimator
.CaseMode.Upper, columns: new[] { ("UpperText", "text") })).Append(
392
new TextNormalizingEstimator(mlContext, keepDiacritics: true, caseMode:
TextNormalizingEstimator
.CaseMode.None, columns: new[] { ("OriginalText", "text") }));
Transformers\TextFeaturizerTests.cs (11)
249
CaseMode =
TextNormalizingEstimator
.CaseMode.None
261
private void TestCaseMode(IDataView dataView, TestClass[] data,
TextNormalizingEstimator
.CaseMode caseMode)
276
if (caseMode ==
TextNormalizingEstimator
.CaseMode.Upper)
281
else if (caseMode ==
TextNormalizingEstimator
.CaseMode.Lower)
286
else if (caseMode ==
TextNormalizingEstimator
.CaseMode.None)
303
TestCaseMode(dataView, data,
TextNormalizingEstimator
.CaseMode.Lower);
304
TestCaseMode(dataView, data,
TextNormalizingEstimator
.CaseMode.Upper);
305
TestCaseMode(dataView, data,
TextNormalizingEstimator
.CaseMode.None);
314
CaseMode =
TextNormalizingEstimator
.CaseMode.None,
351
CaseMode =
TextNormalizingEstimator
.CaseMode.None,
389
CaseMode =
TextNormalizingEstimator
.CaseMode.None,
Transformers\TextNormalizer.cs (3)
43
var
pipe = new TextNormalizingEstimator(ML, columns: new[] { ("NormA", "A"), ("NormB", "B") });
57
new TextNormalizingEstimator(ML, caseMode:
TextNormalizingEstimator
.CaseMode.Upper, columns: new[] { ("UpperText", "text") })).Append(
82
var
pipe = new TextNormalizingEstimator(Env, columns: new[] { ("NormA", "A"), ("NormB", "B") });
Microsoft.ML.Transforms (31)
Text\TextCatalog.cs (4)
13
using TextNormalizeDefaults =
TextNormalizingEstimator
.Defaults;
114
/// Creates a <see cref="
TextNormalizingEstimator
"/>, which normalizes incoming text in <paramref name="inputColumnName"/> by optionally
134
public static
TextNormalizingEstimator
NormalizeText(this TransformsCatalog.TextTransforms catalog,
137
TextNormalizingEstimator
.CaseMode caseMode = TextNormalizeDefaults.Mode,
Text\TextFeaturizingEstimator.cs (5)
26
using CaseMode =
TextNormalizingEstimator
.CaseMode;
184
public CaseMode CaseMode =
TextNormalizingEstimator
.Defaults.Mode;
187
public bool KeepDiacritics =
TextNormalizingEstimator
.Defaults.KeepDiacritics;
190
public bool KeepPunctuations =
TextNormalizingEstimator
.Defaults.KeepPunctuations;
193
public bool KeepNumbers =
TextNormalizingEstimator
.Defaults.KeepNumbers;
Text\TextNormalizing.cs (22)
33
/// <see cref="ITransformer"/> resulting from fitting a <see cref="
TextNormalizingEstimator
"/>.
60
public
TextNormalizingEstimator
.CaseMode TextCase =
TextNormalizingEstimator
.Defaults.Mode;
64
public bool KeepDiacritics =
TextNormalizingEstimator
.Defaults.KeepDiacritics;
67
public bool KeepPunctuations =
TextNormalizingEstimator
.Defaults.KeepPunctuations;
70
public bool KeepNumbers =
TextNormalizingEstimator
.Defaults.KeepNumbers;
96
private readonly
TextNormalizingEstimator
.CaseMode _caseMode;
102
TextNormalizingEstimator
.CaseMode caseMode =
TextNormalizingEstimator
.Defaults.Mode,
103
bool keepDiacritics =
TextNormalizingEstimator
.Defaults.KeepDiacritics,
104
bool keepPunctuations =
TextNormalizingEstimator
.Defaults.KeepPunctuations,
105
bool keepNumbers =
TextNormalizingEstimator
.Defaults.KeepNumbers,
119
if (!
TextNormalizingEstimator
.IsColumnTypeValid(type))
120
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName,
TextNormalizingEstimator
.ExpectedColumnType, type.ToString());
163
_caseMode = (
TextNormalizingEstimator
.CaseMode)ctx.Reader.ReadByte();
164
host.CheckDecode(Enum.IsDefined(typeof(
TextNormalizingEstimator
.CaseMode), _caseMode));
249
var isCaseChange = (_parent._caseMode ==
TextNormalizingEstimator
.CaseMode.Lower) ? "LOWER" :
250
(_parent._caseMode ==
TextNormalizingEstimator
.CaseMode.Upper) ? "UPPER" : "NONE";
424
if (_parent._caseMode ==
TextNormalizingEstimator
.CaseMode.Lower)
426
else if (_parent._caseMode ==
TextNormalizingEstimator
.CaseMode.Upper)
569
: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(
TextNormalizingEstimator
)),
587
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.inputColumnName,
TextNormalizingEstimator
.ExpectedColumnType, col.ItemType.ToString());