tag(at:unit:scheme:tokenRange:)
Returns a tag for a single scheme, for a given linguistic unit, at the specified character position.
Declaration
func tag(at charIndex: Int, unit: NSLinguisticTaggerUnit, scheme: NSLinguisticTagScheme, tokenRange: NSRangePointer?) -> NSLinguisticTag?Parameters
- charIndex:
The position of the initial character.
- unit:
The linguistic unit. See Nslinguistictaggerunit for possible values.
- scheme:
The tag scheme. See Nslinguistictagscheme for possible values.
- tokenRange:
A pointer to the token range.
Return Value
Returns the tag for the requested tag scheme and linguistic unit, or nil. If a tag is returned, this function returns by reference the range of the token to tokenRange.