---
title: "predictions(from:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mltextclassifier/predictions(from:)"
---

# predictions(from:)

Classifies an array of strings with labels.

## Declaration

```swift
func predictions(from texts: [String]) throws -> [String]
```

## Parameters

- `texts`: The array of strings to be classified.

## Return Value

Return Value An array of labels for the given strings.

## See Also

### Testing a text classifier

- [prediction(from:)](createml/mltextclassifier/prediction(from:).md)
- [predictionWithConfidence(from:)](createml/mltextclassifier/predictionwithconfidence(from:).md)
- [predictionsWithConfidence(from:)](createml/mltextclassifier/predictionswithconfidence(from:).md)
