Enumeration

NLTokenUnit

Constants representing linguistic units.

Declaration

enum NLTokenUnit : Int

Overview

Topics

Constants

case word

An individual word.

case sentence

An individual sentence.

case paragraph

An individual paragraph.

case document

The document in its entirety.

See Also

Deteriming the Range of a Unit Token

func tokenRange(at: String.Index, unit: NLTokenUnit) -> Range<String.Index>

Returns the range of the linguistic unit containing the specified character index.