Initializer

init(validationData:algorithm:language:)

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

Declaration

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

Parameters

validationData

A dictionary the text classifier uses for validation data during training.

algorithm

An algorithm type for the classifier.

language

The language of the text to classify.

See Also

Creating Parameters

init(validationData: MLTextClassifier.DataSource, algorithm: MLTextClassifier.ModelAlgorithmType, language: NLLanguage?)

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

Deprecated
struct NLLanguage

The languages supported by the Natural Language framework.

enum MLTextClassifier.ModelAlgorithmType

The type of algorithm used by a text classifier.