|
Class Reference
%iKnow.Matching.Formats.Format
|
|
![]() |
|||
Private Storage |
This abstract class describes the interface to be implemented by an actual Dictionary Format matching object. Subclasses of this class can for example introduce regular expression matching, date matching, number checking or something more domain-specific.
Subclasses should at least override
Format implementations can be parameterized through a number of parameters the Format class
defines, which will get passed to the
|
|
Properties |
---|
DomainId |
Subclasses | ||
---|---|---|
%iKnow.Matching.Formats.SimpleDateFormat | %iKnow.Matching.Formats.SimplePrefixFormat | %iKnow.Matching.Formats.SimpleSuffixFormat |
|
|
This method is called after matching has finished to clean up eventual memory structures generated while executing
MatchSingle orMatchAll calls and can be overridden in subclasses to perform any required cleanup operations.
Whether or not this Format class has a
MatchAll function that deals with a set of strings directly. Subclasses should make sure to override this method (to make it return true) if they overrideMatchAll .
This method loops through @stringsGlobalName@(" "_string) = id and matches all global entries, storing the results in @resultGlobalName@(id) = $lb(matchScore, matchedWordBits, isScattered, formatOutput). The implementation should ignore all ids > minEntUniId and should not store any results if the matchScore is 0.
Implementing this method only makes sense if the specific format this class represents can exploit the inverse global structure of @stringsGlobalName.
Note: entries in @stringsGlobalName are all in lowercase and prefixed with a space
Warning: an implementation for this method does not replace
MatchSingle . There should still be a MatchSingle alternative, for example to process strings longer than $$$IKHASHSIZE that would not appear in @stringsGlobalName.
As
MatchAll can only tackle those strings shorter than $$$IKHASHSIZE, this method complements it by looping through the corresponding global structures for longer strings and checking them manually usingMatchSingle .
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.