forrestedw / spellchecker
A convenient chainable wrapper for tigitz/php-spellchecker
1.0.0
2020-05-06 11:21 UTC
Requires
- tigitz/php-spellchecker: ^0.1.1
This package is auto-updated.
Last update: 2025-03-09 02:49:34 UTC
README
A convenient chainable wrapper for tigitz/php-spellchecker
Usage
use Forrestedw\SpellChecker\SpellChecker; //Initiate the SpellChecker $spellChecker = (new SpellChecker); //Whitelist words. Optional. $spellChecker->whiteList(['Lett','theese','spellins','goo']); //Set preferred words to select from corrctions. Optional. $spellChecker->prefer(['These','Words','Are','Most','Important','To','Me']); $correction = $spellChecker->check('A word or sentence');