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

# predictionWithConfidence(from:)

Predicts tags and confidence scores for the input string. Predicts tags and confidence scores for the input string.

## Declaration

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

## Parameters

- `text`: The string to tag.

## Return Value

Return Value An array of dictionaries. Each dictionary corresponds to a token in the input text string. A dictionary entry contains a tag prediction with its associated confidence score.

## See Also

### Testing a word tagger

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