Creates a classifier from a training set in a dictionary.


init(trainingData: [String : [String]], parameters: MLTextClassifier.ModelParameters = ModelParameters(validationData: [:])) throws

See Also

Creating and Training a Text Classifier

init(trainingData: MLTextClassifier.DataSource, parameters: MLTextClassifier.ModelParameters)

Creates a classifier from a training set stored in a set of directories.

enum MLTextClassifier.DataSource

A data source for a text classifier.

struct MLTextClassifier.ModelParameters

Parameters that affect the process of training a model.

let modelParameters: MLTextClassifier.ModelParameters

The configuration parameters that the text classifier used for training during initialization.