#39921 [NEW]: pspell_check returning incorrect results
| From: | dansoftaus at yahoo dot com dot au | Date: | Thu, 21 Dec 2006 10:09:21 +0000 |
| Subject: | #39921 [NEW]: pspell_check returning incorrect results | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-106721@lists.php.net to get a copy of this message | ||
From: dansoftaus at yahoo dot com dot au
Operating system: GNU/Linux
PHP version: 4.4.4
PHP Bug Type: Pspell related
Bug description: pspell_check returning incorrect results
Description:
------------
OS: Debian GNU/Linux
PHP version: 4.4.4
Aspell version: 0.60.4
Using pspell_check returns incorrect results for some words. For example,
it marks spellling and permanate are being spelt correctly, and online as
being spelt incorrectly
Reproduce code:
---------------
<?php
// Code from
http://www.simplemachines.org/community/index.php?topic=125497.msg802209#msg802209
$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 />';
?>
Expected result:
----------------
spel->incorrect
spell->correct
spelll->incorrect
speling->incorrect
spelling->correct
spellling->incorrect
Actual result:
--------------
spel->incorrect
spell->correct
spelll->incorrect
speling->incorrect
spelling->correct
spellling->correct
(notice the last result)
--
Edit bug report at http://bugs.php.net/?id=39921&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39921&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39921&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39921&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39921&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39921&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39921&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39921&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39921&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39921&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39921&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39921&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39921&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39921&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39921&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39921&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39921&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39921&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39921&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39921&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39921&r=mysqlcfg