Specifies the event type for the DICT MATCH command.
TIdDICTMatchEvent = procedure (AContext:TIdCommand; Database, Strategy,WordToFind : String) of object;
Parameters |
Description |
Thread |
Execution Thread performing the command. |
Database |
Name or wildcard identifying the database(s) to be searched. |
Strategy |
Desired Search algorithm. |
WordToFind |
Word to locate in the dictionary database(s). |
TIdDICTMatchEvent specifies the event type for the DICT MATCH command, and is used by the TIdDICTServer OnCommandMatch event handler to search the dictionary index and report the words found using a particular strategy.
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:
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved. Website http://www.indyproject.org. Post feedback to the Indy Documentation newsgroup. |