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

  1. Find /phpspellcheck/core/settings/default-settings.php
  2. 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

  1. Find /phpspellcheck/dictionaries/language-rules/enforced-corrections.txt
  2. 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.

  1. Find /phpspellcheck/dictionaries/language-rules/common-mistakes.txt
  2. Add or edit lines to this file to fine tune suggestion behaviour


  • The typing mistake "abotu" should be "about"

Other Performance Tuning Resources