53 references to StopWordsRemovingEstimator
Microsoft.ML.Core.Tests (1)
UnitTests\TestEntryPoints.cs (1)
1808
StopWordsRemoverOptions = new
StopWordsRemovingEstimator
.Options(),
Microsoft.ML.PerformanceTests (1)
StochasticDualCoordinateAscentClassifierBench.cs (1)
106
StopWordsRemoverOptions = new
StopWordsRemovingEstimator
.Options(),
Microsoft.ML.Samples (3)
Dynamic\TextTransform.cs (1)
59
new
StopWordsRemovingEstimator
.Options()
Dynamic\Transforms\Text\FeaturizeTextWithOptions.cs (1)
52
StopWordsRemoverOptions = new
StopWordsRemovingEstimator
.Options()
Dynamic\Transforms\Text\RemoveDefaultStopWords.cs (1)
34
StopWordsRemovingEstimator
.Language.English));
Microsoft.ML.Tests (2)
OnnxConversionTest.cs (1)
1568
StopWordsRemovingEstimator
.Language.English));
Transformers\TextFeaturizerTests.cs (1)
51
var options = new TextFeaturizingEstimator.Options() { StopWordsRemoverOptions = new
StopWordsRemovingEstimator
.Options(), OutputTokensColumnName = "OutputTokens" };
Microsoft.ML.Transforms (46)
Text\StopWordsRemovingTransformer.cs (37)
60
return new StopWordsRemovingTransformer(env, columns.Select(x => new
StopWordsRemovingEstimator
.ColumnOptions(x.Name, x.Source)).ToArray());
65
/// <see cref="ITransformer"/> resulting from fitting a <see cref="
StopWordsRemovingEstimator
"/>.
77
public
StopWordsRemovingEstimator
.Language? Language;
110
public
StopWordsRemovingEstimator
.Language Language =
StopWordsRemovingEstimator
.Defaults.DefaultLanguage;
133
internal IReadOnlyCollection<
StopWordsRemovingEstimator
.ColumnOptions> Columns => _columns.AsReadOnly();
135
private readonly
StopWordsRemovingEstimator
.ColumnOptions[] _columns;
137
private static volatile Dictionary<ReadOnlyMemory<char>,
StopWordsRemovingEstimator
.Language> _langsDictionary;
149
var values = Enum.GetValues(typeof(
StopWordsRemovingEstimator
.Language)).Cast<int>();
164
private static Dictionary<ReadOnlyMemory<char>,
StopWordsRemovingEstimator
.Language> LangsDictionary
168
Dictionary<ReadOnlyMemory<char>,
StopWordsRemovingEstimator
.Language> result = _langsDictionary;
171
var langsDictionary = Enum.GetValues(typeof(
StopWordsRemovingEstimator
.Language)).Cast<
StopWordsRemovingEstimator
.Language>()
181
private static (string outputColumnName, string inputColumnName)[] GetColumnPairs(
StopWordsRemovingEstimator
.ColumnOptions[] columns)
190
if (!
StopWordsRemovingEstimator
.IsColumnTypeValid(type))
191
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName,
StopWordsRemovingEstimator
.ExpectedColumnType, type.ToString());
199
internal StopWordsRemovingTransformer(IHostEnvironment env, params
StopWordsRemovingEstimator
.ColumnOptions[] columns) :
233
_columns = new
StopWordsRemovingEstimator
.ColumnOptions[columnsLength];
236
var lang = (
StopWordsRemovingEstimator
.Language)ctx.Reader.ReadInt32();
237
Contracts.CheckDecode(Enum.IsDefined(typeof(
StopWordsRemovingEstimator
.Language), lang));
239
_columns[i] = new
StopWordsRemovingEstimator
.ColumnOptions(ColumnPairs[i].outputColumnName, ColumnPairs[i].inputColumnName, lang, langColName);
261
var cols = new
StopWordsRemovingEstimator
.ColumnOptions[options.Columns.Length];
265
cols[i] = new
StopWordsRemovingEstimator
.ColumnOptions(
294
foreach (
StopWordsRemovingEstimator
.Language lang in Enum.GetValues(typeof(
StopWordsRemovingEstimator
.Language)))
319
private static void AddResourceIfNotPresent(
StopWordsRemovingEstimator
.Language lang)
341
private static Stream GetResourceFileStreamOrNull(
StopWordsRemovingEstimator
.Language lang)
374
if (!
StopWordsRemovingEstimator
.IsColumnTypeValid(srcType))
375
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", parent._columns[i].InputColumnName,
StopWordsRemovingEstimator
.ExpectedColumnType, srcType.ToString());
408
StopWordsRemovingEstimator
.Language stopWordslang = _parent._columns[iinfo].Language;
483
private void UpdateLanguage(ref
StopWordsRemovingEstimator
.Language langToUse, ValueGetter<ReadOnlyMemory<char>> getLang, ref ReadOnlyMemory<char> langTxt)
488
StopWordsRemovingEstimator
.Language lang;
494
langToUse =
StopWordsRemovingEstimator
.Defaults.DefaultLanguage;
498
private bool ResourceExists(
StopWordsRemovingEstimator
.Language lang)
661
: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(
StopWordsRemovingEstimator
)), new StopWordsRemovingTransformer(env, columns))
1077
if (!
StopWordsRemovingEstimator
.IsColumnTypeValid(srcType))
1078
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", parent.ColumnPairs[i].inputColumnName,
StopWordsRemovingEstimator
.ExpectedColumnType, srcType.ToString());
Text\TextCatalog.cs (3)
307
public static
StopWordsRemovingEstimator
RemoveDefaultStopWords(this TransformsCatalog.TextTransforms catalog,
310
StopWordsRemovingEstimator
.Language language =
StopWordsRemovingEstimator
.Language.English)
Text\TextFeaturizingEstimator.cs (6)
147
/// <description>The <see cref="
StopWordsRemovingEstimator
.Options"/> removes the language specific list of stop words from the input.</description>
164
if (_stopWordsRemoverOptions is
StopWordsRemovingEstimator
.Options)
167
Language = (_stopWordsRemoverOptions as
StopWordsRemovingEstimator
.Options).Language;
313
public
StopWordsRemovingEstimator
.Language StopwordsLanguage
314
=> (
StopWordsRemovingEstimator
.Language)Enum.Parse(typeof(
StopWordsRemovingEstimator
.Language), Language.ToString());