GNU Dictionary Server
Appendix A Available Strategies
This appendix summarizes search strategies available for use in Dico 2.7.
Match words exactly. This is a built-in strategy.
Match word prefixes. This is a built-in strategy.
This strategy is similar to ‘prefix’, except that it allows the user to limit the number of returned matches. If the search term has the structure ‘skip#count#string’, where skip and count are integer numbers, then the ‘nprefix’ strategy will return at most count headwords that begin with string, omitting first skip unique matches.
This strategy is implemented in the nprefix loadable module. See nprefix.
Match word suffixes. This is a built-in strategy.
Match words using SOUNDEX algorithm5. This strategy matches headwords that sound approximately the same as the search term. Note, that it is suitable only for English words.
This is a built-in strategy.
Match headwords within given Levenshtein distance (1 by default). This strategy accounts for the most usual spelling errors.
The Levenshtein distance between two strings is the minimum number of edits needed to transform one string into the other. The edits are: insertion, deletion, or substitution of a single character. Thus, Levenshtein distance 1 means that only one such operation suffices to convert one string to another. This is the default for that strategy.
This built-in strategy is used as a default one (see default strategy), unless the
default-strategyconfiguration statement mandates otherwise.
The dictionary server may optionally allow users to alter the Levenshtein distance using the extension command
XLEV. This command is enabled by setting the ‘xlev’ capability. See xlev, for a detailed description.
Match normalized headwords within given Levenshtein distance. This strategy is similar to ‘lev’, except that it treats any runlength of whitespace characters appearing in a headword as a single space (ASCII 32) character.
Match headwords within given Damerau-Levenshtein distance (1 by default).
The Damerau-Levenshtein distance extends the Levenshtein distance by an additional edit operation: transposition of two adjacent characters.
This strategy is similar to ‘lev’, but covers a much wider range of spelling and typographical errors.
The distance threshold optionally be configured using the
XLEVcommand (see xlev).
This is the same as ‘dlev’, except that it treats any runlength of whitespace characters appearing in a headword as a single space (ASCII 32) character.
Match using POSIX 1003.2 regular expressions. This strategy treats the search term as a regular expression (see Extended regular expressions in GNU sed).
Match using basic regular expressions.
Match using Perl-compatible regular expressions. This strategy is implemented in the loadable module pcre. See pcre.
Match everything. This experimental strategy ignores its argument and matches all headwords. It is implemented in the stratall module, which you must load if you wish to make that strategy available. See stratall.
Match a substring anywhere in the headword. This strategy is implemented as a loadable module. See substr.
Match a word anywhere in the headword. This is one of the strategies provided by the word loadable module. See word.
Match the first word within headwords. This strategy is implemented in word loadable module. See word.
Match the last word within headwords. This strategy is implemented in word loadable module. See word.
This document was generated on September 25, 2018 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.