tagHypothesesAtIndex:unit:scheme:maximumCount:tokenRange:
Finds multiple possible tags for a given linguistic unit, for a single scheme, at the specified character position.
Declaration
- (NSDictionary<NSString *,NSNumber *> *) tagHypothesesAtIndex:(NSUInteger) characterIndex unit:(NLTokenUnit) unit scheme:(NLTagScheme) scheme maximumCount:(NSUInteger) maximumCount tokenRange:(NSRangePointer) tokenRange;Parameters
- unit:
The linguistic unit. See Nltokenunit for possible values.
- scheme:
The tag scheme. See Nltagscheme for possible values. Not all tag schemes produce more than one prediction.
- maximumCount:
The maximum number of tag predictions to return.
- tokenRange:
The range of the token for which the tags were produced.
Mentioned in
Return Value
A tuple containing a dictionary and a range.
Discussion
Each dictionary entry is a predicted tag with its associated probability score. These tags are the top candidates proposed as possible tags for the token. The dictionary contains up to maximumCount entries.
The range contains the range of the individual token for which these tags were produced.