<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/StringProtocol/linguisticTags(in:scheme:options:orthography:tokenRanges:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sy10FoundationE14linguisticTags2in6scheme7options11orthography11tokenRangesSaySSGqd_0__qd__So25NSLinguisticTaggerOptionsVSo13NSOrthographyCSgSpySaySnySS5IndexVGGGSgtSyRd__SXRd_0_AO5BoundRtd_0_r0_lF"
  },
  "title" : "linguisticTags(in:scheme:options:orthography:tokenRanges:)"
}
-->

# linguisticTags(in:scheme:options:orthography:tokenRanges:)

Returns an array of linguistic tags for the specified
range and requested tags within the receiving string.

```
func linguisticTags<T, R>(in range: R, scheme tagScheme: T, options opts: NSLinguisticTagger.Options = [], orthography: NSOrthography? = nil, tokenRanges: UnsafeMutablePointer<[Range<Self.Index>]>? = nil) -> [String] where T : StringProtocol, R : RangeExpression, R.Bound == String.Index
```

---

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)