The --spl_sthresh and --dym_sthresh flags are used to set the threshold spelling correction score for words used by the auto-correct or DYM engines, respectively. This is the threshold at which the engine will consider the suggestion. Words that qualify have a score below a given threshold. The higher the edit distance for a term, the higher the score. The default for --spl_sthresh is 125, and the default for --dym_sthresh is 175.

Based on these default values, if a particular suggestion has a score of 100, it can be used for either DYM or auto-correct, and if it has a score of 200, it is not used by either. If the suggested word has a score better (that is, lower) than the default DYM threshold of 175, but not good enough (that is, higher) than the default auto-correct threshold of 125, it qualifies only for DYM.

A higher value for either of these settings generally results in more suggestions being generated for a misspelled word. In an example query against the sample wine data, changing the --dym_sthresh value from 175 to 225 increased the number of terms considered for DYM from one to ten. However, raising scores too high could result in a lot of noise. That is to say, it is generally a good thing if nonsense strings used as search terms receive neither auto-correct nor DYM suggestions.

Copyright © Legal Notices