---
title: "enumerateLinguisticTags(in:scheme:options:orthography:using:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsstring/enumeratelinguistictags(in:scheme:options:orthography:using:)"
---

# enumerateLinguisticTags(in:scheme:options:orthography:using:)

Performs linguistic analysis on the specified string by enumerating the specific range of the string, providing the Block with the located tags.

## Declaration

```swift
func enumerateLinguisticTags(in range: NSRange, scheme: NSLinguisticTagScheme, options: NSLinguisticTagger.Options = [], orthography: NSOrthography?, using block: (NSLinguisticTag?, NSRange, NSRange, UnsafeMutablePointer<ObjCBool>) -> Void)
```

## Parameters

- `range`: The range of the string to analyze.
- `scheme`: The tag scheme to use. See Linguistic Tag Schemes for supported values.
- `options`: The linguistic tagger options to use. See doc://com.apple.foundation/documentation/Foundation/NSLinguisticTagger/Optionsfor the constants. These constants can be combined using the C-Bitwise OR operator.
- `orthography`: The orthography of the string. If nil, the linguistic tagger will attempt to determine the orthography from the string content.
- `block`: The Block to apply to the string. The block takes four arguments:

## Discussion

Discussion This is a convenience method.  It is the equivalent of creating an instance of NSLinguisticTagger, specifying the receiver as the string to be analyzed, and the orthography (or nil) and then invoking the NSLinguisticTagger method or enumerateTags(in:scheme:options:using:).

## See Also

### Performing Linguistic Analysis

- [linguisticTags(in:scheme:options:orthography:tokenRanges:)](foundation/nsstring/linguistictags(in:scheme:options:orthography:tokenranges:).md)
- [NSString.EnumerationOptions](foundation/nsstring/enumerationoptions.md)
