Enumerates a block over the tagger’s string, given a range, token unit, and tag scheme.
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
- Natural Language
The range of the string you want the tagger to analyze.
The block this method uses to iterate over the tagger’s
stringproperty. The block has the following parameters:
The tag of the token.
The range of the token.
A reference to a Boolean value. The block can set the value to
trueto stop further processing of the set. The
stopargument is an out-only argument. You should only ever set this Boolean to
truewithin the block.
Use this method to iterate your block over the given range of a string. The method divides up the string with the given
NLTag and then calls your block. For example, use the
NLTag tag scheme to identify which tokens are parts of speech, types of whitespace, or types of punctuation. Use the
NLTag tag scheme to identify the stem form of each word token, if known.