Contents

tag(at:unit:scheme:)

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

Declaration

@nonobjc func tag(at index: String.Index, unit: NLTokenUnit, scheme: NLTagScheme) -> (NLTag?, Range<String.Index>)

Parameters

  • unit:

    The linguistic unit. See Nltokenunit for possible values.

  • scheme:

    The tag scheme. See Nltagscheme for possible values.

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