Skip to content

Commit

Permalink
Fixed Spelling on stopwords
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoGaunt committed Dec 2, 2020
1 parent d257b88 commit 0ebe4f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx) :
{

const string dir = "Stopwords";
NormStr.Pool stopwrods = null;
NormStr.Pool stopwords = null;
bool res = ctx.TryProcessSubModel(dir,
c =>
{
Expand All @@ -997,22 +997,22 @@ private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx) :
int cstr = ctx.Reader.ReadInt32();
Host.CheckDecode(cstr > 0);

stopwrods = new NormStr.Pool();
stopwords = new NormStr.Pool();
for (int istr = 0; istr < cstr; istr++)
{
var nstr = stopwrods.Add(ctx.LoadString());
var nstr = stopwords.Add(ctx.LoadString());
Host.CheckDecode(nstr.Id == istr);
}

// All stopwords are distinct.
Host.CheckDecode(stopwrods.Count == cstr);
Host.CheckDecode(stopwords.Count == cstr);
// The deserialized pool should not have the empty string.
Host.CheckDecode(stopwrods.Get("") == null);
Host.CheckDecode(stopwords.Get("") == null);
});
if (!res)
throw Host.ExceptDecode();

_stopWordsMap = stopwrods;
_stopWordsMap = stopwords;
}
}

Expand Down

0 comments on commit 0ebe4f6

Please sign in to comment.