Instance Method


Returns an array of possible tags for the given scheme at the specified range, supplying matching scores.


func possibleTags(at charIndex: Int, scheme tagScheme: String, tokenRange: NSRangePointer?, sentenceRange: NSRangePointer?, scores: AutoreleasingUnsafeMutablePointer<NSArray?>?) -> [String]?



The position of the initial character.


The tag scheme. See NSLinguisticTagScheme for possible values.


The token range.


The range of the sentence.


Returns by reference an array of numeric scores indicating the likelihood that the range matches the tag scheme.

Return Value

Returns an array of possible tags for the tag scheme at the specified location, starting with the most likely tag scheme. For some tag schemes only a single tag will be returned, but for others a list of possibilities will be provided.


Calling this method is not recommended; for most use cases, this information is not as useful as what is provided by the methods described in Enumerating Linguistic Tags and Getting Linguistic Tags.

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