Instance Method

prediction(from:)

Classifies a string with a label.

Declaration

func prediction(from text: String) throws -> String

Parameters

text

The string to be classified.

Return Value

The label for the given string.

See Also

Testing a Text Classifier

func predictions(from: [String]) -> [String]

Classifies an array of strings with labels.