<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage/NLTagger/tagHypotheses(at:unit:scheme:maximumCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Natural Language",
      "NaturalLanguage"
    ],
    "preciseIdentifier" : "s:So8NLTaggerC15NaturalLanguageE13tagHypotheses2at4unit6scheme12maximumCountSDySSSdG_SnySS5IndexVGtAK_So11NLTokenUnitVSo11NLTagSchemeaSitF"
  },
  "title" : "tagHypotheses(at:unit:scheme:maximumCount:)"
}
-->

# tagHypotheses(at:unit:scheme:maximumCount:)

Finds multiple possible tags for a given linguistic unit, for a single scheme, at the specified character position.

```
@nonobjc func tagHypotheses(at index: String.Index, unit: NLTokenUnit, scheme: NLTagScheme, maximumCount: Int) -> ([String : Double], Range<String.Index>)
```

## Parameters

`index`

The position of the initial character.

`unit`

The linguistic unit. See [`NLTokenUnit`](/documentation/NaturalLanguage/NLTokenUnit) for possible values.

`scheme`

The tag scheme. See [`NLTagScheme`](/documentation/NaturalLanguage/NLTagScheme) for possible values. Not all tag schemes produce more than one prediction.

`maximumCount`

The maximum number of tag predictions to return.

## Return Value

A tuple containing a dictionary and a range.

## Discussion

Each dictionary entry is a predicted tag with its associated probability score. These tags are the top candidates proposed as possible tags for the token. The dictionary contains up to `maximumCount` entries.

The range contains the range of the individual token for which these tags were produced.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)