Instance Method

tags(in:unit:scheme:options:tokenRanges:)

Returns an array of linguistic tags and token ranges for a given string range and linguistic unit.

Declaration

Parameters

range

The range from which to return tags.

unit

The linguistic unit. See NSLinguisticTaggerUnit for possible values.

tagScheme

The tag scheme. See NSLinguisticTagScheme for possible values.

opts

The linguistic tagger options to use. See NSLinguisticTagger.Options for possible values.

tokenRanges

Returns by reference an array of token ranges.

Return Value

An array of the tags in the requested range.

Discussion

When the returned array contains an entry that doesn't have a corresponding tag scheme, that entry is an empty string ("").