%iKnow.Matching.Formats.SimpleSuffixFormat
Class %iKnow.Matching.Formats.SimpleSuffixFormat Extends %iKnow.Matching.Formats.Format [ Deprecated, System = 4 ]
This sample %iKnow.Matching.Formats.Format implementation checks whether any word in a string ends with the supplied suffix and optionally returns the fragment (or just the word) preceding the suffix. If the suffix is preceded by only a single word (directly or separated with a space), it is considered a full match.
Format parameters:
- suffix (%String, no default) - the suffix to check for (cannot contain spaces)
- lastWordOnly (%Boolean, default 0) - whether to check for the last word of the entity only
- outputType (%Integer, default 0) - what to supply in terms of output:
- 0: no output
- 1: the remainder of the word preceding the (first occurrence of the) suffix
- 2: same as 1, but if there is a space preceding the suffix, returns the word before
- 3: the whole entity up to the (first occurrence of the) suffix
Methods
MatchSingle
Method MatchSingle(string As %String, formatParams As %List, Output matchScore As %Numeric, Output matchedWordBits, Output isScattered As %Boolean, Output formatOutput) As %Status