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

# prediction(from:)

Predicts a tag for the input string.

## Declaration

```swift
func prediction(from text: String) throws -> [String]
```

## Parameters

- `text`: The string to tag.

## Return Value

Return Value An array of tags for the tokens in the string.

## See Also

### Testing a word tagger

- [predictions(from:)](createml/mlwordtagger/predictions(from:).md)
- [predictionWithConfidence(from:)](createml/mlwordtagger/predictionwithconfidence(from:).md)
