TorchSharpCatalog.NamedEntityRecognition Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
NamedEntityRecognition(MulticlassClassificationCatalog+MulticlassClassificationTrainers, NerTrainer+NerOptions) |
Fine tune a Named Entity Recognition model. |
NamedEntityRecognition(MulticlassClassificationCatalog+MulticlassClassificationTrainers, String, String, String, Int32, Int32, BertArchitecture, IDataView) |
Fine tune a NAS-BERT model for Named Entity Recognition. The limit for any sentence is 512 tokens. Each word typically will map to a single token, and we automatically add 2 specical tokens (a start token and a separator token) so in general this limit will be 510 words for all sentences. |
NamedEntityRecognition(MulticlassClassificationCatalog+MulticlassClassificationTrainers, NerTrainer+NerOptions)
- Source:
- TorchSharpCatalog.cs
- Source:
- TorchSharpCatalog.cs
- Source:
- TorchSharpCatalog.cs
Fine tune a Named Entity Recognition model.
public static Microsoft.ML.TorchSharp.NasBert.NerTrainer NamedEntityRecognition(this Microsoft.ML.MulticlassClassificationCatalog.MulticlassClassificationTrainers catalog, Microsoft.ML.TorchSharp.NasBert.NerTrainer.NerOptions options);
static member NamedEntityRecognition : Microsoft.ML.MulticlassClassificationCatalog.MulticlassClassificationTrainers * Microsoft.ML.TorchSharp.NasBert.NerTrainer.NerOptions -> Microsoft.ML.TorchSharp.NasBert.NerTrainer
<Extension()>
Public Function NamedEntityRecognition (catalog As MulticlassClassificationCatalog.MulticlassClassificationTrainers, options As NerTrainer.NerOptions) As NerTrainer
Parameters
The transform's catalog.
- options
- NerTrainer.NerOptions
The full set of advanced options.
Returns
Applies to
NamedEntityRecognition(MulticlassClassificationCatalog+MulticlassClassificationTrainers, String, String, String, Int32, Int32, BertArchitecture, IDataView)
- Source:
- TorchSharpCatalog.cs
- Source:
- TorchSharpCatalog.cs
- Source:
- TorchSharpCatalog.cs
Fine tune a NAS-BERT model for Named Entity Recognition. The limit for any sentence is 512 tokens. Each word typically will map to a single token, and we automatically add 2 specical tokens (a start token and a separator token) so in general this limit will be 510 words for all sentences.
public static Microsoft.ML.TorchSharp.NasBert.NerTrainer NamedEntityRecognition(this Microsoft.ML.MulticlassClassificationCatalog.MulticlassClassificationTrainers catalog, string labelColumnName = "Label", string outputColumnName = "PredictedLabel", string sentence1ColumnName = "Sentence", int batchSize = 32, int maxEpochs = 10, Microsoft.ML.TorchSharp.NasBert.BertArchitecture architecture = Microsoft.ML.TorchSharp.NasBert.BertArchitecture.Roberta, Microsoft.ML.IDataView validationSet = default);
static member NamedEntityRecognition : Microsoft.ML.MulticlassClassificationCatalog.MulticlassClassificationTrainers * string * string * string * int * int * Microsoft.ML.TorchSharp.NasBert.BertArchitecture * Microsoft.ML.IDataView -> Microsoft.ML.TorchSharp.NasBert.NerTrainer
<Extension()>
Public Function NamedEntityRecognition (catalog As MulticlassClassificationCatalog.MulticlassClassificationTrainers, Optional labelColumnName As String = "Label", Optional outputColumnName As String = "PredictedLabel", Optional sentence1ColumnName As String = "Sentence", Optional batchSize As Integer = 32, Optional maxEpochs As Integer = 10, Optional architecture As BertArchitecture = Microsoft.ML.TorchSharp.NasBert.BertArchitecture.Roberta, Optional validationSet As IDataView = Nothing) As NerTrainer
Parameters
The transform's catalog.
- labelColumnName
- String
Name of the label column. Column should be a key type.
- outputColumnName
- String
Name of the output column. It will be a key type. It is the predicted label.
- sentence1ColumnName
- String
Name of the column for the first sentence.
- batchSize
- Int32
Number of rows in the batch.
- maxEpochs
- Int32
Maximum number of times to loop through your training set.
- architecture
- BertArchitecture
Architecture for the model. Defaults to Roberta.
- validationSet
- IDataView
The validation set used while training to improve model quality.