Skip to main content

%iKnow.Matching.Formats.SimpleSuffixFormat

deprecated class %iKnow.Matching.Formats.SimpleSuffixFormat extends %iKnow.Matching.Formats.Format

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:

  1. suffix (%String, no default) - the suffix to check for (cannot contain spaces)
  2. lastWordOnly (%Boolean, default 0) - whether to check for the last word of the entity only
  3. 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

Method Inventory

Methods

method MatchSingle(string As %String, formatParams As %List, Output matchScore As %Numeric, Output matchedWordBits, Output isScattered As %Boolean, Output formatOutput) as %Status
Inherited description:

Implementations of this method check whether an individual string complies with the format this class represents, returning a matchScore (0..1) and optional matchedWordBits, isScattered and formatOutput through output parameters.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab