Initializer

init(validationData:algorithm:language:)

Creates parameters for a text classifier with validation data stored in a set of labeled directories.

Declaration

init(validationData: MLTextClassifier.DataSource, algorithm: MLTextClassifier.ModelAlgorithmType = .maxEnt(revision: 1), language: NLLanguage? = nil)

Parameters

validationData

A data source of the labeled directories the text classifier uses for validation data during training.

algorithm

An algorithm type for the text classifier.

language

The language of the text to classify.

See Also

Creating Parameters

init(validationData: [String : [String]], algorithm: MLTextClassifier.ModelAlgorithmType, language: NLLanguage?)

Creates parameters for a text classifier with validation data stored in a dictionary.

Deprecated
struct NLLanguage

The languages supported by the Natural Language framework.

enum MLTextClassifier.ModelAlgorithmType

The type of algorithm used by a text classifier.