A tokenizer that segments natural language text into semantic units.
- iOS 12.0+
- macOS 10.14+
- tvOS 12.0+
- watchOS 5.0+
- Natural Language
NLTokenizer creates individual units from natural language text. Define the desired unit (word, sentence, paragraph, or document as declared in the
NLToken) for tokenization, and then assign a string to tokenize. enumerateTokens(in:using:) provides the ranges of the tokens in the string based on the tokenization unit.