Initializer

init(trainingData:tokenColumn:labelColumn:parameters:)

Creates a word tagger from a training set in a data table.

Declaration

init(trainingData: MLDataTable, tokenColumn: String, labelColumn: String, parameters: MLWordTagger.ModelParameters = MLWordTagger.defaultParameters) throws

Parameters

trainingData

The tokens and their labels contained in an MLDataTable.

tokenColumn

The name of the column containing the tokens.

labelColumn

The name of the column containing the labels for the tokens.

parameters

The model parameters to use when creating the word tagger.

See Also

Creating and Training a Word Tagger

init(trainingData: [(tokens: [MLWordTagger.Token], labels: [String])], parameters: MLWordTagger.ModelParameters)

Creates a word tagger from a training set in an array of tokens and their labels.

typealias MLWordTagger.Token

The token type of a word tagger, which is String.

struct MLWordTagger.ModelParameters

Parameters that affect the process of training a model.

let modelParameters: MLWordTagger.ModelParameters

The configuration parameters that the word tagger used for training during initialization.