Indy 9
|
TIdDICTMatchEvent = procedure ( Thread: TIdPeerThread; Database, Strategy,WordToFind : String ) of object;
All DICT servers must implement the MATCH command, and must support the "exact" and "prefix" strategies.
The "exact" strategy performs a case-insensitive comparison. The "prefix" strategy is similar to "exact", except that it only compares the first part of the word. These strategies are easily implemented and are generally the most useful. Other strategies are server dependent.
Other strategies that might be considered are matches based on substring, suffix, regular expressions, soundex [KNUTH73], and Levenshtein [PZ85] algorithms. These last two are especially useful for correcting spelling errors. Other useful strategies perform some sort of "reverse" lookup (i.e., by searching definitions to find the word that the query suggests).
Strategy may also contain the special character ".", which indicates that the server should use the default strategy for that server. This is usually a derivative of the Levenshtein algorithm [PZ85].
Database contains the name of the database to be searched, in a form returned by SHOW DB, or one the following wildcard characters: