Enumeration

MLTextClassifier.DataSource

A data source for a text classifier.

Declaration

enum MLTextClassifier.DataSource

Topics

Creating a Data Source

case labeledDirectories(at: URL)

A root directory of labeled directories for your data set.

Retrieving the Data

func labeledTexts() -> [String : [String]]

Fetches the labeled data from the data source.

See Also

Creating and Training a Text Classifier

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

Creates a classifier from a training set in a dictionary.

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

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

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.