<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage/NLTagger/setOrthography(_:range:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Natural Language",
      "NaturalLanguage"
    ],
    "preciseIdentifier" : "s:So8NLTaggerC15NaturalLanguageE14setOrthography_5rangeySo13NSOrthographyC_SnySS5IndexVGtF"
  },
  "title" : "setOrthography(_:range:)"
}
-->

# setOrthography(_:range:)

Sets the orthography for the specified range.

```
@nonobjc func setOrthography(_ orthography: NSOrthography, range: Range<String.Index>)
```

## Parameters

`orthography`

The orthography for the given range.

`range`

The range of the string that is being assigned an orthography.

## Discussion

If the orthography of the linguistic tagger is not set, it will determine it automatically from the contents of the text. You should call this method only if you know the orthography of the text by some other means.

---

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)