forrestedw/spellchecker

A convenient chainable wrapper for tigitz/php-spellchecker

1.0.0 2020-05-06 11:21 UTC

This package is auto-updated.

Last update: 2024-06-09 01:07:52 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');