php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74869 Spelling issues
Submitted: 2017-07-06 19:50 UTC Modified: 2017-07-07 04:21 UTC
From: aviaialon at gmail dot com Assigned:
Status: Not a bug Package: Pspell related
PHP Version: 5.6.30 OS: Linux
Private report: No CVE-ID: None
 [2017-07-06 19:50 UTC] aviaialon at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.pspell-suggest
---

Hi, im not sure if this a bug. but why would pspell even suggest words like this?

php -r ' print_r(pspell_suggest(pspell_new("en", null, null, null, \PSPELL_FAST | \PSPELL_RUN_TOGETHER), "kc1433xfc"));'



Test script:
---------------
php -r ' print_r(pspell_suggest(pspell_new("en", null, null, null, \PSPELL_FAST | \PSPELL_RUN_TOGETHER), "kc1433xfc"));'


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-06 19:55 UTC] spam2 at rhsoft dot net
that's pretty sure the wrong bugtracker since PHP is only a wrapper

http://php.net/manual/en/pspell.requirements.php
To compile PHP with pspell support, you need the aspell library, available from ยป http://aspell.net/
 [2017-07-07 03:47 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: Output Control +Package: Pspell related
 [2017-07-07 03:47 UTC] requinix@php.net
If you're asking why pspell is attempting to find a spelling suggestion then, well, that's what it's supposed to do. Maybe don't run it on random nonsense?
If you're asking why pspell is suggesting something weird then that's a question for the aspell people.
 [2017-07-07 04:21 UTC] aviaialon at gmail dot com
Thank you requinix for clarifying that the user generated input was nonsense, i haven't noticed.

The nonsense mentionned above happened to be a slightly mistyped product code from a search page. Imagine the user's surprised when the site responded with: no results found. Did you mean cocksucker?

Ill defer to aspell for this.
Thanks
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 20:01:28 2019 UTC