Skip to content

Commit f861125

Browse files
authored
Random doc updates (#7476)
* doc updates * a * Update src/Microsoft.ML.Transforms/CustomMappingTransformer.cs * revert changes to internal API * Revert "revert changes to internal API" This reverts commit 017e001. * revert changes to internal API
1 parent 0e29ebb commit f861125

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

src/Microsoft.ML.Transforms/CategoricalCatalog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static OneHotEncodingEstimator OneHotEncoding(this TransformsCatalog.Cate
5151
new[] { new OneHotEncodingEstimator.ColumnOptions(outputColumnName, inputColumnName, outputKind, maximumNumberOfKeys, keyOrdinality) }, keyData);
5252

5353
/// <summary>
54-
/// Create a <see cref="OneHotEncodingEstimator"/>, which converts one or more input text columns specified in <paramref name="columns"/>
54+
/// Creates a <see cref="OneHotEncodingEstimator"/>, which converts one or more input text columns specified in <paramref name="columns"/>
5555
/// into as many columns of one-hot encoded vectors.
5656
/// </summary>
5757
/// <remarks>If multiple columns are passed to the estimator, all of the columns will be processed in a single pass over the data.

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

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ namespace Microsoft.ML.Transforms.Text
3232
public interface IStopWordsRemoverOptions { }
3333

3434
/// <summary>
35-
/// An estimator that turns a collection of text documents into numerical feature vectors.
36-
/// The feature vectors are normalized counts of word and/or character n-grams (based on the options supplied).
35+
/// Represents an estimator that turns a collection of text documents into numerical feature vectors.
36+
/// The feature vectors are normalized counts of word or character n-grams (based on the options supplied).
3737
/// </summary>
3838
/// <remarks>
3939
/// <format type="text/markdown"><![CDATA[
@@ -51,23 +51,23 @@ public interface IStopWordsRemoverOptions { }
5151
/// * [Tokenization](https://en.wikipedia.org/wiki/Lexical_analysis#Tokenization)
5252
/// * [Text normalization](https://en.wikipedia.org/wiki/Text_normalization)
5353
/// * [Predefined and custom stopwords removal](https://en.wikipedia.org/wiki/Stop_words)
54-
/// * [Word-based or character-based Ngram extraction and SkipGram extraction (through the advanced [options](xref:Microsoft.ML.Transforms.TextFeaturizingEstimator.Options.WordFeatureExtractor))](https://en.wikipedia.org/wiki/N-gram)
54+
/// * [Word-based or character-based Ngram extraction and SkipGram extraction](https://en.wikipedia.org/wiki/N-gram)
5555
/// * [TF, IDF or TF-IDF](https://en.wikipedia.org/wiki/Tf%E2%80%93idf)
5656
/// * [L-p vector normalization](xref: Microsoft.ML.Transforms.LpNormNormalizingTransformer)
5757
///
58-
/// By default the features are made of (word/character) n-grams/skip-grams and the number of features are equal to the vocabulary size found by analyzing the data.
58+
/// By default the features are made of (word/character) n-grams/skip-grams, and the number of features is equal to the vocabulary size found by analyzing the data.
5959
/// To output an additional column with the tokens generated, use [OutputTokensColumnName](xref:Microsoft.ML.Transforms.Text.TextFeaturizingEstimator.Options.OutputTokensColumnName).
6060
/// The number of features can also be specified by selecting the maximum number of n-gram to keep in the <xref:Microsoft.ML.Transforms.Text.TextFeaturizingEstimator.Options>, where the estimator can be further tuned.
6161
///
62-
/// Check the See Also section for links to usage examples.
62+
/// For links to usage examples, see <see cref="TextCatalog.FeaturizeText(TransformsCatalog.TextTransforms, string, Options, string[])"/> and <see cref="TextCatalog.FeaturizeText(TransformsCatalog.TextTransforms, string, string)"/>.
6363
/// ]]></format>
6464
/// </remarks>
6565
/// <seealso cref="TextCatalog.FeaturizeText(TransformsCatalog.TextTransforms, string, Options, string[])"/>
6666
/// <seealso cref="TextCatalog.FeaturizeText(TransformsCatalog.TextTransforms, string, string)"/>
6767
public sealed class TextFeaturizingEstimator : IEstimator<ITransformer>
6868
{
6969
/// <summary>
70-
/// Text language. This enumeration is serialized.
70+
/// Specifies text languages. This enumeration is serialized.
7171
/// </summary>
7272
public enum Language
7373
{
@@ -81,7 +81,7 @@ public enum Language
8181
}
8282

8383
/// <summary>
84-
/// Text vector normalizer kind.
84+
/// Specifies the kinds of text vector normalizers.
8585
/// </summary>
8686
public enum NormFunction
8787
{
@@ -121,7 +121,7 @@ internal bool TryUnparse(StringBuilder sb)
121121
}
122122

123123
/// <summary>
124-
/// Advanced options for the <see cref="TextFeaturizingEstimator"/>.
124+
/// Provides advanced options for the <see cref="TextFeaturizingEstimator"/>.
125125
/// </summary>
126126
public sealed class Options : TransformInputBase
127127
{
@@ -140,18 +140,20 @@ public sealed class Options : TransformInputBase
140140
private IStopWordsRemoverOptions _stopWordsRemoverOptions;
141141

142142
/// <summary>
143-
/// Option to set type of stop word remover to use.
143+
/// Gets or sets the type of stop word remover to use.
144+
/// </summary>
145+
/// <remarks>
144146
/// The following options are available
145147
/// <list type="bullet">
146148
/// <item>
147-
/// <description>The <see cref="StopWordsRemovingEstimator.Options"/> removes the language specific list of stop words from the input.</description>
149+
/// <description>The <see cref="StopWordsRemovingEstimator.Options"/> removes the language-specific list of stop words from the input.</description>
148150
/// </item>
149151
/// <item>
150-
/// <description>The <see cref="CustomStopWordsRemovingEstimator.Options"/> uses user provided list of stop words.</description>
152+
/// <description>The <see cref="CustomStopWordsRemovingEstimator.Options"/> uses a user-provided list of stop words.</description>
151153
/// </item>
152154
/// </list>
153155
/// Setting this to 'null' does not remove stop words from the input.
154-
/// </summary>
156+
/// </remarks>
155157
public IStopWordsRemoverOptions StopWordsRemoverOptions
156158
{
157159
get { return _stopWordsRemoverOptions; }
@@ -208,15 +210,17 @@ public IStopWordsRemoverOptions StopWordsRemoverOptions
208210
private WordBagEstimator.Options _wordFeatureExtractor;
209211

210212
/// <summary>
211-
/// Norm of the output vector. It will be normalized to one.
213+
/// Gets the norm of the output vector. It will be normalized to one.
212214
/// </summary>
213215
[Argument(ArgumentType.AtMostOnce, HelpText = "Normalize vectors (rows) individually by rescaling them to unit norm.", Name = "VectorNormalizer", ShortName = "norm", SortOrder = 13)]
214216
public NormFunction Norm = NormFunction.L2;
215217

216218
/// <summary>
217-
/// Ngram feature extractor to use for words (WordBag/WordHashBag).
218-
/// Set to <see langword="null" /> to turn off n-gram generation for words.
219+
/// Gets or sets the n-gram feature extractor to use for words (WordBag/WordHashBag).
219220
/// </summary>
221+
/// <value>
222+
/// Set to <see langword="null" /> to turn off n-gram generation for words.
223+
/// </value>
220224
public WordBagEstimator.Options WordFeatureExtractor
221225
{
222226
get { return _wordFeatureExtractor; }
@@ -247,9 +251,11 @@ public WordBagEstimator.Options WordFeatureExtractor
247251
private WordBagEstimator.Options _charFeatureExtractor;
248252

249253
/// <summary>
250-
/// Ngram feature extractor to use for characters (WordBag/WordHashBag).
251-
/// Set to <see langword="null" /> to turn off n-gram generation for characters.
254+
/// Gets or sets the n-gram feature extractor to use for characters (WordBag/WordHashBag).
252255
/// </summary>
256+
/// <value>
257+
/// Set to <see langword="null" /> to turn off n-gram generation for characters.
258+
/// </value>
253259
public WordBagEstimator.Options CharFeatureExtractor
254260
{
255261
get { return _charFeatureExtractor; }
@@ -625,9 +631,11 @@ private static string GenerateColumnName(DataViewSchema schema, string srcName,
625631
}
626632

627633
/// <summary>
628-
/// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer.
629-
/// Used for schema propagation and verification in a pipeline.
634+
/// Returns the <see cref="SchemaShape"/> of the schema that will be produced by the transformer.
630635
/// </summary>
636+
/// <remarks>
637+
/// This method is used for schema propagation and verification in a pipeline.
638+
/// </remarks>
631639
public SchemaShape GetOutputSchema(SchemaShape inputSchema)
632640
{
633641
_host.CheckValue(inputSchema, nameof(inputSchema));

0 commit comments

Comments
 (0)