Instance Method


Sets the orthography for the specified range.


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



The orthography for the given range.


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


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.

See Also

Determining the Dominant Language and Orthography

var dominantLanguage: NLLanguage?

The dominant language of the string set for the linguistic tagger.

func setLanguage(NLLanguage, range: Range<String.Index>)

Sets the language for a range of text within the tagger's string.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software