|
Dico |
GNU Dictionary Server |
Sergey Poznyakoff |
| GNU Dico Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
The MATCH command searches for word in the database index.
The searching algorithm is called strategy. The following
strategies are supported by the server:
Match a word exactly (case-insensitive).
Match a word prefix (case-insensitive).
Match using SOUNDEX algorithm.
Match headwords within given Levenshtein distance. That distance,
called a Levenshtein threshold is by default 1. It can be
modified using the XLEV extension command (see section XLEV).
Match headwords within given Damerau-Levenshtein distance. That distance is the same as for the ‘lev’ strategy.
Match using POSIX 1003.2 (a.k.a ‘extended’) regular expressions.
Match using basic regular expressions.
The dictorg module (see section The dictorg module.) additionally provides the
following strategy:
Match word suffixes (case-insensitive).
Other modules may provide more matching strategies.
Match word in database using strategy. As with
DEFINE, the database can be ‘!’ or ‘*’
(See section The DEFINE Command, for a detailed description of these wildcards).
The strategy is either the name of a strategy to use, or
a dot (‘.’), meaning to use default strategy. The default
strategy is set using default-strategy configuration file
statement (see section default-strategy. Its default
value is ‘lev’, which means ‘use Levenshtein algorithm’ (see
above).
If no matches are found in any of the searched databases, then response code 552 will be returned. Otherwise, response code 152 will be returned followed by a list of matched words, one per line, in the form:
database word |
Thus, prepending a ‘DEFINE ’ to each such response, one obtains a
valid DEFINE command.
The textual body of the match list is terminated with a line containing only a dot character.
Following the list, response code 250 is sent, which includes
timing information, if timing directive is set in the
configuration file (see section Tuning).
Possible responses:
Examples:
C: MATCH * . "weather" S: 152 12 matches found: list follows C: eng-afr "feather" C: eng-afr "leather" C: eng-afr "weather" C: eng-deu "feather" C: eng-deu "heather" C: eng-deu "leather" C: eng-deu "weather" C: eng-deu "wether" C: eng-deu "wheather" C: devils "WEATHER" S: . S: 250 Command complete [d/m/c = 0/12/100677 0.489r 0.479u 0.007s] |
| GNU Dico Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.