A tokenizer that segments natural language text into semantic units.
SDKs
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
Framework
- Natural Language
Declaration
class NLTokenizer : NSObject
Overview
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.