Instance Method

tagAtIndex:unit:scheme:tokenRange:

Finds a tag for a given linguistic unit, for a single scheme, at the specified character position.

Declaration

- (NLTag)tagAtIndex:(NSUInteger)characterIndex unit:(NLTokenUnit)unit scheme:(NLTagScheme)scheme tokenRange:(NSRangePointer)tokenRange;

Parameters

characterIndex

The position of the initial character.

unit

The linguistic unit. See NLTokenUnit for possible values.

scheme

The tag scheme. See NLTagScheme for possible values.

tokenRange

A pointer to the token range.

Return Value

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.

See Also

Getting Linguistic Tags

- tagsInRange:unit:scheme:options:tokenRanges:

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