Our stop word remover has a variable misspelt as stopwrods instead of stopwords:
|
NormStr.Pool stopwrods = null; |
|
bool res = ctx.TryProcessSubModel(dir, |
|
c => |
|
{ |
|
Host.CheckValue(c, nameof(ctx)); |
|
c.CheckAtModel(GetStopwordsManagerVersionInfo()); |
|
|
|
// *** Binary format *** |
|
// int: number of stopwords |
|
// int[]: stopwords string ids |
|
int cstr = ctx.Reader.ReadInt32(); |
|
Host.CheckDecode(cstr > 0); |
|
|
|
stopwrods = new NormStr.Pool(); |
|
for (int istr = 0; istr < cstr; istr++) |
|
{ |
|
var nstr = stopwrods.Add(ctx.LoadString()); |
|
Host.CheckDecode(nstr.Id == istr); |
|
} |
|
|
|
// All stopwords are distinct. |
|
Host.CheckDecode(stopwrods.Count == cstr); |
|
// The deserialized pool should not have the empty string. |
|
Host.CheckDecode(stopwrods.Get("") == null); |
|
}); |
|
if (!res) |
|
throw Host.ExceptDecode(); |
|
|
|
_stopWordsMap = stopwrods; |
Our stop word remover has a variable misspelt as
stopwrodsinstead ofstopwords:machinelearning/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs
Lines 987 to 1015 in 7879849