Instance Method

possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:

Returns an array of possible tags for the given scheme at the specified range, supplying matching scores.

Declaration

- (NSArray<NSString *> *)possibleTagsAtIndex:(NSUInteger)charIndex scheme:(NSString *)tagScheme tokenRange:(NSRangePointer)tokenRange sentenceRange:(NSRangePointer)sentenceRange scores:(NSArray<NSValue *> * _Nullable *)scores;

Parameters

charIndex

The position of the initial character.

tagScheme

The tag scheme. See NSLinguisticTagScheme for possible values.

tokenRange

The token range.

sentenceRange

The range of the sentence.

scores

Returns by reference an array of numeric scores indicating the likelihood that the range matches the tag scheme.

Return Value

Returns an array of possible tags for the tag scheme at the specified location, starting with the most likely tag scheme. For some tag schemes only a single tag will be returned, but for others a list of possibilities will be provided.

Discussion

Calling this method is not recommended; for most use cases, this information is not as useful as what is provided by the methods described in Enumerating Linguistic Tags and Getting Linguistic Tags.