A tokenizer that segments natural language text into semantic units.
- iOS 12.0+
- macOS 10.14+
- UIKit for Mac 13.0+Beta
- 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.