TextCatalog.ProduceWordBags 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ProduceWordBags(TransformsCatalog+TextTransforms, String, Char, Char, String, Int32) |
建立 WordBagEstimator,其會將 中指定的 |
ProduceWordBags(TransformsCatalog+TextTransforms, String, String, Int32, Int32, Boolean, Int32, NgramExtractingEstimator+WeightingCriteria) |
建立 WordBagEstimator,其會將 中指定的 |
ProduceWordBags(TransformsCatalog+TextTransforms, String, String[], Int32, Int32, Boolean, Int32, NgramExtractingEstimator+WeightingCriteria) |
建立 WordBagEstimator,其會將 中指定的 |
ProduceWordBags(TransformsCatalog+TextTransforms, String, Char, Char, String, Int32)
建立 WordBagEstimator,其會將 中指定的 inputColumnName
數據行對應至名為 outputColumnName
的新數據行中 n-gram 計數的向量。
public static Microsoft.ML.Transforms.Text.WordBagEstimator ProduceWordBags (this Microsoft.ML.TransformsCatalog.TextTransforms catalog, string outputColumnName, char termSeparator, char freqSeparator, string inputColumnName = default, int maximumNgramsCount = 10000000);
static member ProduceWordBags : Microsoft.ML.TransformsCatalog.TextTransforms * string * char * char * string * int -> Microsoft.ML.Transforms.Text.WordBagEstimator
<Extension()>
Public Function ProduceWordBags (catalog As TransformsCatalog.TextTransforms, outputColumnName As String, termSeparator As Char, freqSeparator As Char, Optional inputColumnName As String = Nothing, Optional maximumNgramsCount As Integer = 10000000) As WordBagEstimator
參數
- catalog
- TransformsCatalog.TextTransforms
轉換的目錄。
- termSeparator
- Char
- freqSeparator
- Char
- inputColumnName
- String
要從中擷取數據的數據行名稱。 要儲存在字典中的 n-gram 數目上限。用來分隔字詞/頻率組的分隔符。用來分隔詞彙與其頻率的分隔符。 此估算器會透過文字向量運作。
- maximumNgramsCount
- Int32
傳回
備註
WordBagEstimator 不同於 NgramExtractingEstimator 先前在內部標記化文字,後者則會採用標記化文字作為輸入。
適用於
ProduceWordBags(TransformsCatalog+TextTransforms, String, String, Int32, Int32, Boolean, Int32, NgramExtractingEstimator+WeightingCriteria)
建立 WordBagEstimator,其會將 中指定的 inputColumnName
數據行對應至名為 outputColumnName
的新數據行中 n-gram 計數的向量。
public static Microsoft.ML.Transforms.Text.WordBagEstimator ProduceWordBags (this Microsoft.ML.TransformsCatalog.TextTransforms catalog, string outputColumnName, string inputColumnName = default, int ngramLength = 2, int skipLength = 0, bool useAllLengths = true, int maximumNgramsCount = 10000000, Microsoft.ML.Transforms.Text.NgramExtractingEstimator.WeightingCriteria weighting = Microsoft.ML.Transforms.Text.NgramExtractingEstimator+WeightingCriteria.Tf);
static member ProduceWordBags : Microsoft.ML.TransformsCatalog.TextTransforms * string * string * int * int * bool * int * Microsoft.ML.Transforms.Text.NgramExtractingEstimator.WeightingCriteria -> Microsoft.ML.Transforms.Text.WordBagEstimator
<Extension()>
Public Function ProduceWordBags (catalog As TransformsCatalog.TextTransforms, outputColumnName As String, Optional inputColumnName As String = Nothing, Optional ngramLength As Integer = 2, Optional skipLength As Integer = 0, Optional useAllLengths As Boolean = true, Optional maximumNgramsCount As Integer = 10000000, Optional weighting As NgramExtractingEstimator.WeightingCriteria = Microsoft.ML.Transforms.Text.NgramExtractingEstimator+WeightingCriteria.Tf) As WordBagEstimator
參數
- catalog
- TransformsCatalog.TextTransforms
轉換的目錄。
- inputColumnName
- String
要從中擷取數據的數據行名稱。 此估算器會透過文字向量運作。
- ngramLength
- Int32
Ngram 長度。
- skipLength
- Int32
建構 n-gram 時要略過的令牌數目上限。
- useAllLengths
- Boolean
是否要包含所有 n-gram 長度,最多 ngramLength
或只 ngramLength
包含 。
- maximumNgramsCount
- Int32
要儲存在字典中的 n-gram 數目上限。
統計量值,用來評估單字對主體中的檔有多重要。
傳回
備註
WordBagEstimator 不同於 NgramExtractingEstimator 先前在內部標記化文字,後者則會採用標記化文字作為輸入。
適用於
ProduceWordBags(TransformsCatalog+TextTransforms, String, String[], Int32, Int32, Boolean, Int32, NgramExtractingEstimator+WeightingCriteria)
建立 WordBagEstimator,其會將 中指定的 inputColumnNames
多個數據行對應至名為 outputColumnName
的新數據行中 n-gram 計數的向量。
public static Microsoft.ML.Transforms.Text.WordBagEstimator ProduceWordBags (this Microsoft.ML.TransformsCatalog.TextTransforms catalog, string outputColumnName, string[] inputColumnNames, int ngramLength = 2, int skipLength = 0, bool useAllLengths = true, int maximumNgramsCount = 10000000, Microsoft.ML.Transforms.Text.NgramExtractingEstimator.WeightingCriteria weighting = Microsoft.ML.Transforms.Text.NgramExtractingEstimator+WeightingCriteria.Tf);
static member ProduceWordBags : Microsoft.ML.TransformsCatalog.TextTransforms * string * string[] * int * int * bool * int * Microsoft.ML.Transforms.Text.NgramExtractingEstimator.WeightingCriteria -> Microsoft.ML.Transforms.Text.WordBagEstimator
<Extension()>
Public Function ProduceWordBags (catalog As TransformsCatalog.TextTransforms, outputColumnName As String, inputColumnNames As String(), Optional ngramLength As Integer = 2, Optional skipLength As Integer = 0, Optional useAllLengths As Boolean = true, Optional maximumNgramsCount As Integer = 10000000, Optional weighting As NgramExtractingEstimator.WeightingCriteria = Microsoft.ML.Transforms.Text.NgramExtractingEstimator+WeightingCriteria.Tf) As WordBagEstimator
參數
- catalog
- TransformsCatalog.TextTransforms
轉換的目錄。
- inputColumnNames
- String[]
要從中擷取數據的多個數據行名稱。 此估算器會透過文字向量運作。
- ngramLength
- Int32
Ngram 長度。
- skipLength
- Int32
建構 n-gram 時要略過的令牌數目上限。
- useAllLengths
- Boolean
是否要包含所有 n-gram 長度,最多 ngramLength
或只 ngramLength
包含 。
- maximumNgramsCount
- Int32
要儲存在字典中的 n-gram 數目上限。
統計量值,用來評估單字對主體中的檔有多重要。
傳回
備註
WordBagEstimator 不同於 NgramExtractingEstimator 先前在內部標記化文字,後者則會採用標記化文字作為輸入。