Source for file PSpell.php
Documentation is available at PSpell.php
* $Id: PSpell.php,v 1.1 2009/08/07 01:59:36 sam2kb Exp $
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
* Spellchecks an array of words.
* @param {String} $lang Language code like sv or en.
* @param {Array} $words Array of words to spellcheck.
* @return {Array} Array of misspelled words.
foreach ($words as $word) {
if (!pspell_check($plink, trim($word)))
* Returns suggestions of for a specific word.
* @param {String} $lang Language code like sv or en.
* @param {String} $word Specific word to get suggestions for.
* @return {Array} Array of suggestions for the specified word.
$words =
pspell_suggest($this->_getPLink($lang), $word);
for ($i=
0; $i<
count($words); $i++
)
* Opens a link for pspell.
// Check for native PSpell support
$this->throwError("PSpell support not found in PHP installation.");
$this->_config['PSpell.spelling'],
$this->_config['PSpell.jargon'],
$this->_config['PSpell.encoding'],
$this->_config['PSpell.mode']
$pspellConfig = pspell_config_create(
$this->_config['PSpell.spelling'],
$this->_config['PSpell.jargon'],
$this->_config['PSpell.encoding']
$plink = pspell_new_config($pspell_config);
$this->throwError("No PSpell link found opened.");