Spellling, permanate, and several other misspelled words get passed by the spell checker on every SMF forum I've seen. Doesn't SMF use aspell? Does everybody just have outdated aspell libraries?
I googled around and found this php spellcheck script which does not seem to have the same problem: http://chxo.com/scripts/spellcheck.php
SMF does use aspell. Not sure why it's not finding those words.
Not sure why, but it's definitely something with aspell. I've tried this code:
<?php
$pspell_link = pspell_new('en', 'american', '', 'UTF-8', PSPELL_FAST | PSPELL_RUN_TOGETHER);
$tests = array(
'spel',
'spell',
'spelll',
'speling',
'spelling',
'spellling',
);
foreach ($tests as $test)
echo $test, '->', pspell_check($pspell_link, $test) ? 'correct' : 'incorrect', '<br />';
?>
and it produced the following output:
spel->incorrect
spell->correct
spelll->incorrect
speling->incorrect
spelling->correct
spellling->correct
I made a bug report on the aspell site, but the developer said it was just an old version of aspell and that it had been fixed. I guess it's standard practice to have ancient versions of aspell on web servers? Or maybe php points to the wrong one by default?
I think this has something to do with PHP's pspell functions. Running the script posted above:
spel->incorrect
spell->correct
spelll->incorrect
speling->incorrect
spelling->correct
spellling->correct
So, it marks spellling as correct. However, running aspell from a SSH prompt:
root@server1:/home/daniel# cat test_words
spel
spell
spelll
speling
spelling
spellling
root@server1:/home/daniel# cat test_words | aspell list
spel
spelll
speling
spellling
root@server1:/home/daniel# aspell -v
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.4)
Running it from a shell prompt shows the correct results (spellling is wrong). I guess it's the way PHP uses aspell?
Does php use aspell or pspell? I've noticed a few other weird words spell check doesn't correct, like "outdune".
That's the confusing bit. PHP has two libraries, aspell and pspell. The aspell library is an OLD version of aspell, and the pspell library is what's used currently (which also uses aspell, via a backwards-compatibility interface)
It seems any word, if it uses a combination of correctly spelled words, passes the spell check. For example, "donkeyspitmonkeypoopflingingelephant" passes the spell check. It only works for words past a certain length (4 letters?). "on" and "line" both pass the spell check, however, "online" does not pass the spell check.
QuoteFor example, "donkeyspitmonkeypoopflingingelephant" passes the spell check.
That's an... interesting word :P
I guess this is a PHP bug, and hence it should be reported to the PHP developers?
OK, I reported it myself, even though I'm not quite sure if it's really a PHP bug, or a pspell/aspell bug... See http://bugs.php.net/39921
I use www.iespell.com on a lot of other forums that don't have a spell checker and it will find words that are miss spelled that SMF won't find, no big deal. One thing I would like to see is a "add" button for words that are not spelled wrong but are just not in the dictionary.
ther eis alreayd a mod add-on for SMF to add custom words into the dictionary.
look at the custom dictionary words mod, by Jay...
Quote from: Kindred on December 25, 2006, 10:36:31 AM
ther eis alreayd a mod add-on for SMF to add custom words into the dictionary.
look at the custom dictionary words mod, by Jay...
Thanks Jay, I didn't know that.