Performance Tuning The Suggestion Engine
PHPSpellCheck has method for developers to fine tune the performance of the suggestion engine.
Suggestion Tolerance
The tolerance of the spellchecker to error can be fine tuned in the settings file
- Find /phpspellcheck/core/settings/default-settings.php
- Edit this line: $spellcheckObject -> SuggestionTollerance = 1.5;
This allows you to tune the tolerance of the spellchecker to 'unlikely' suggestions.
- 0=few suggestions
- 10=more suggestions
Enforced Corrections
The enforced corrections file allows you to manually force a suggestion for any word
- Find /phpspellcheck/dictionaries/language-rules/enforced-corrections.txt
- Add lines to this file to add enforced spelling suggestions
Format: PHPSpellcheck--> PHPSpellCheck || PHP Spell Check
- PHPSpellcheck will show suggestions "PHPSpellCheck" AND "PHP Spell Check"
Common Typing Mistakes
The file contains a list of common typing errors which are used to fine tune the behaviour of the fuzzy-logic suggestion engine.
- Find /phpspellcheck/dictionaries/language-rules/common-mistakes.txt
- Add or edit lines to this file to fine tune suggestion behaviour
Format:abotu-->about
- The typing mistake "abotu" should be "about"
Other Performance Tuning Resources
- The Settings File
- Language Filters (Banning Words & Strict 'Legal' checking)
- Adding Custom Vocabulary (Custom Dictionaries from files and SQL)
- Encoding a Dictionary