PHP Mysql Search Strategies


Below is a short list of available databases and a brief description. These are the most commonly used databases. If searching for translations to a specific word or phrase, please select the appropriate database as not all databases are searched by default.

cdl_capture_2011-06-02-11_ 000

  • ! – Search all database until a match is found (1)
  • * – Search all database and return results from all
  • wn – Word Net Dictionary
  • gcide – The Collaborative International Dictionary of English v.0.48
  • moby-thes – Moby Thesaurus II by Grady Ward, 1.0
  • elements – Elements database 20001107
Dictionary Search Strategies:

Search strategies allow you to use different methods for generating the desired result. In some cases you may not be looking for an exact match, but words that are prefixed or suffixed with a substring. kDictAPI Pro allows you to do just that! For more info on the various dictionary search strategies, see the list below:

  • Exact – Matches the word exactly. One of the fastest search algorithms.
    Returns definitions.
  • Lev – Levenshtein algorithm searches for all words that are one distance from the target word.
    (ie: love or loved )
    Returns a list of matches
  • Prefix – Fast binary search algorithm. Matches the beginning of a word. A prefix is a string attached to another string (word) to create a new meaning.
    (ex: becoming)
    Returns a list of matches
  • Re – POXIS 1003.2 (modern) Regular Expression. One of the slower algorithms. Maybe up to 300 times slower than substring queries. Can match one or the other of a phrase string. ReEx may take several minutes to complete depending on the number of potential matches discovered.
    (ie: Hello or World from the phrase "Hello World")
    Returns a list of matches
  • RegExp – Old (basic) Regular Expressions. Maybe used to match dual occurrences of a pattern

    (ex: three characters in the beginning and end of a string)

    Returns a list of matches.
  • Soundex – Finds similar sounding words. May also be used to get correct spelling of words. Fairly fast algorithm. A classic, in fact.
    (ex: How, Hoo, Haw, Hey)
    Returns a list of matches
  • Substring – A relatively fast algorithm that matches a substring anywhere in the headword.
    (ex: innocent, Jordan, Horseradish, grandmother )
    Returns a list of matches
  • Suffix – Search speed similar to that of the Substring algorithm. Matches the suffix of a string. A suffix is a letter, letters, syllable, or syllables postfix at the end of a string or word.
    (ex: Riding, Vetetable )
    Returns a list of matches.
  • Word – Matches any single word. Rule applies to single words and phrases. If a phrase is supplied.
    (ie: hello world. "word" will attempt to match both ‘hello’ and ‘world.’)
    Returns a list of matches.

Leave a comment