Skip to content

Commit 4659b80

Browse files
committed
Addressed reviewers' comments.
1 parent ee835d1 commit 4659b80

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private static TransformWrapper MakeTransformer(IHostEnvironment env,
262262
}
263263

264264
/// <summary>
265-
/// Produces a bag of counts of ngrams (sequences of consecutive words ) in a given text.
265+
/// Produces a bag of counts of ngrams (sequences of consecutive words) in a given text.
266266
/// It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag.
267267
/// </summary>
268268
public sealed class WordBagEstimator : TrainedWrapperEstimatorBase
@@ -275,7 +275,7 @@ public sealed class WordBagEstimator : TrainedWrapperEstimatorBase
275275
private readonly NgramTransform.WeightingCriteria _weighting;
276276

277277
/// <summary>
278-
/// Produces a bag of counts of ngrams (sequences of consecutive words ) in <paramref name="inputColumn"/>
278+
/// Produces a bag of counts of ngrams (sequences of consecutive words) in <paramref name="inputColumn"/>
279279
/// and outputs bag of word vector as <paramref name="outputColumn"/>
280280
/// </summary>
281281
/// <param name="env">The environment.</param>
@@ -299,7 +299,7 @@ public WordBagEstimator(IHostEnvironment env,
299299
}
300300

301301
/// <summary>
302-
/// Produces a bag of counts of ngrams (sequences of consecutive words ) in <paramref name="inputColumns"/>
302+
/// Produces a bag of counts of ngrams (sequences of consecutive words) in <paramref name="inputColumns"/>
303303
/// and outputs bag of word vector as <paramref name="outputColumn"/>
304304
/// </summary>
305305
/// <param name="env">The environment.</param>
@@ -323,7 +323,7 @@ public WordBagEstimator(IHostEnvironment env,
323323
}
324324

325325
/// <summary>
326-
/// Produces a bag of counts of ngrams (sequences of consecutive words ) in <paramref name="columns.inputs"/>
326+
/// Produces a bag of counts of ngrams (sequences of consecutive words) in <paramref name="columns.inputs"/>
327327
/// and outputs bag of word vector for each output in <paramref name="columns.output"/>
328328
/// </summary>
329329
/// <param name="env">The environment.</param>
@@ -517,7 +517,7 @@ public sealed class NgramEstimator : TrainedWrapperEstimatorBase
517517
private readonly NgramTransform.WeightingCriteria _weighting;
518518

519519
/// <summary>
520-
/// Produces a bag of counts of ngrams (sequences of consecutive words ) in <paramref name="inputColumn"/>
520+
/// Produces a bag of counts of ngrams (sequences of consecutive words) in <paramref name="inputColumn"/>
521521
/// and outputs bag of word vector as <paramref name="outputColumn"/>
522522
/// </summary>
523523
/// <param name="env">The environment.</param>
@@ -541,7 +541,7 @@ public NgramEstimator(IHostEnvironment env,
541541
}
542542

543543
/// <summary>
544-
/// Produces a bag of counts of ngrams (sequences of consecutive words ) in <paramref name="columns.inputs"/>
544+
/// Produces a bag of counts of ngrams (sequences of consecutive words) in <paramref name="columns.inputs"/>
545545
/// and outputs bag of word vector for each output in <paramref name="columns.output"/>
546546
/// </summary>
547547
/// <param name="env">The environment.</param>

test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ public void WordBagWorkout()
140140

141141
var est = new WordBagEstimator(Env, "text", "bag_of_words").
142142
Append(new WordHashBagEstimator(Env, "text", "bag_of_wordshash"));
143-
//TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic);
143+
144+
// The following call fails because of the following issue
145+
// https://github.com/dotnet/machinelearning/issues/969
146+
// TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic);
144147

145148
var outputPath = GetOutputPath("Text", "bag_of_words.tsv");
146149
using (var ch = Env.Start("save"))
@@ -175,7 +178,10 @@ public void NgramWorkout()
175178
.Append(new TermEstimator(Env, "text", "terms"))
176179
.Append(new NgramEstimator(Env, "terms", "ngrams"))
177180
.Append(new NgramHashEstimator(Env, "terms", "ngramshash"));
178-
//TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic);
181+
182+
// The following call fails because of the following issue
183+
// https://github.com/dotnet/machinelearning/issues/969
184+
// TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic);
179185

180186
var outputPath = GetOutputPath("Text", "ngrams.tsv");
181187
using (var ch = Env.Start("save"))

0 commit comments

Comments
 (0)