Advertisement:

Author Topic: Spell Check [Merged]  (Read 90080 times)

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Spell Check [Merged]
« Reply #160 on: December 05, 2005, 05:10:08 PM »
My host has just installed Aspell .51 but i'm getting the following error message when using ?action=spellcheck

Quote
2: PSPELL couldn't open the dictionary. reason: The file "/usr/lib/aspell/en-only.rws" is not in the proper format.
File: /home/domain/public_html/forum/Sources/Subs-Post.php
Line: 838

Do I need to add "en-only" in to Subs-Post.php ?

I installed and un-installed a mod and now have this problem.  Any resolution that any of you can remember?

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,926
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Spell Check in more than one languages
« Reply #161 on: December 20, 2005, 11:09:47 AM »
I have pspell compiled to php and English spell check works fine. However, I would like to have spell checking for other languages as well as I run a multilingual site. Is this possible? How can it be done?

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,727
  • xxx
Re: Spell Check [Merged]
« Reply #162 on: December 20, 2005, 11:17:12 AM »
Simply install the required dictionaries, SMF should ask pspell to use the relevant dictionary for the language pack thats being used.
Liverpool FC Forum with 14 million+ posts.

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,926
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: Spell Check [Merged]
« Reply #163 on: December 20, 2005, 11:58:25 AM »
Yes, but what happens if the language pack is English and the actual text is in Greek for example? Is it not possible for the user to select which language is going to be spell checked? As far as I know aspell supports Greek but there is no Greek file for pspell.

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,920
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Spell Check [Merged]
« Reply #164 on: December 20, 2005, 12:07:24 PM »
If the language pack is English and the text is in Greek, unless you modify index.english.php to tell it to use the Greek dictionary instead, SMF will use the english dictionary for spell-checking.

All the dictionaries are available at ftp://ftp.gnu.org/gnu/aspell/dict/ (Linux/Unix) or ftp://ftp.gnu.org/gnu/aspell/w32/ (Windows). There is a greek dictionary available, but it's for aSpell 0.50 so it may not work with the latest version.
Michael Eshom
Cincy Space - now open!

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,712
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Spell Check [Merged]
« Reply #165 on: December 22, 2005, 04:18:00 AM »
i got our host to move us to a server with pspell and the spell check feature does appear in posts.
but when i click on it nothing happens. nothing at all. Error logs (SMF and Site) show no errors.
manually opening a page http://www.mysite.com/forums/index.php?action=spellcheck is bringing up a blank page.

the Configure Command in phpinfo shows it installed
Quote
'./configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pgsql=/usr' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'

what is wrong?
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,920
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Spell Check [Merged]
« Reply #166 on: December 22, 2005, 11:16:34 AM »
What does this do?

Code: [Select]
<?php
error_reporting
(E_ALL);
$pspell_link pspell_config_create("en");
$badwords = array("theez""wurdz""arn\&#39;t""spelt""ritely");
echo &
#39;<pre>&#39;;
foreach($badwords as $key => $mistake)
{
echo &
#39;Suggestions for <b>&#39; . $mistake . &#39;</b>:<br />&#39;;
    
print_r(array_values(pspell_suggest($pspell_link$mistake)));
echo &
#39;<br />&#39;;
}
echo &
#39;</pre>&#39;;
?>

That should generate a bunch of suggested replacements for the horribly misspelled words. The error_reporting(E_ALL); flag should force PHP to generate any errors that occur, even minor warnings.
« Last Edit: December 22, 2005, 11:18:28 AM by Oldiesmann »
Michael Eshom
Cincy Space - now open!

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,712
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Spell Check [Merged]
« Reply #167 on: December 22, 2005, 02:16:02 PM »
http://lordsofclantribe.com/SleePys/pspell.php

Quote
Suggestions for theez:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for wurdz:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for arn\'t:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for spelt:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for ritely:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9
« Last Edit: December 23, 2005, 01:28:41 PM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,712
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Spell Check [Merged]
« Reply #168 on: December 23, 2005, 01:30:06 PM »
*Bump*

i found another thread here on a blank spell check page and ran that
it says:
The en dictionary is installed
so i do got the dictionary installed
any other suggestions or things i should run to see why?
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline mediman

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,663
  • Gender: Male
Re: Spell Check [Merged]
« Reply #169 on: December 25, 2005, 08:18:15 PM »
manually opening a page http://www.mysite.com/forums/index.php?action=spellcheck is bringing up a blank page.

what do you think should here appear? i blank page with index.php?action=spellcheck is okay!

please check instead

http://www.mysite.com/forums/index.php?action=helpadmin;help=enableSpellChecking

and tell me the result

cheers

mediman

My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

Offline mediman

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,663
  • Gender: Male
Re: Spell Check [Merged]
« Reply #170 on: December 25, 2005, 10:00:26 PM »
http://lordsofclantribe.com/SleePys/pspell.php

Quote
Suggestions for theez:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for wurdz:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for arn\'t:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for spelt:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9


Suggestions for ritely:
Warning:  pspell_suggest(): 1 is not a PSPELL result index in /home/mdccla2/public_html/SleePys/pspell.php on line 9
Warning:  array_values(): The argument should be an array in /home/mdccla2/public_html/SleePys/pspell.php on line 9

this is normal coz the code from oldiesman has errors ...

try instead this

<?php
error_reporting
(E_ALL);
$pspell_link pspell_new("en");

if (!
pspell_check($pspell_link"wurdz")) {
   $suggests pspell_suggest($pspell_link"wurdz");

   foreach ($suggests as $suggest) {
       echo "Suggestions for <b>wurds</b>: $suggest<br />"
   }
}
?>
« Last Edit: December 26, 2005, 07:13:57 PM by mediman »
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,712
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Spell Check [Merged]
« Reply #171 on: December 29, 2005, 05:40:37 PM »
using that i get
Quote
Enable spell checking. You MUST have the pspell library installed on your server and your PHP configuration set up to use the pspell library. Your server DOES appear to have this set up.

running that php file i get
Quote
Suggestions for wurds: wards
Suggestions for wurds: words
Suggestions for wurds: weirds
Suggestions for wurds: weds
Suggestions for wurds: wurst
Suggestions for wurds: Ward
Suggestions for wurds: Ward's
Suggestions for wurds: ward
Suggestions for wurds: ward's
Suggestions for wurds: weeds
Suggestions for wurds: word
Suggestions for wurds: word's
Suggestions for wurds: wits
Suggestions for wurds: wads
Suggestions for wurds: wides
Suggestions for wurds: Warde
Suggestions for wurds: wordy
Suggestions for wurds: Kurds
Suggestions for wurds: curds
Suggestions for wurds: turds
Suggestions for wurds: warez
Suggestions for wurds: weird
Suggestions for wurds: weirdos
Suggestions for wurds: Woods
Suggestions for wurds: warts
Suggestions for wurds: woods
Suggestions for wurds: WATS
Suggestions for wurds: Wed
Suggestions for wurds: Wed's
Suggestions for wurds: wed
Suggestions for wurds: wets
Suggestions for wurds: weirdo
Suggestions for wurds: wireds
Suggestions for wurds: wursts
Suggestions for wurds: dz
Suggestions for wurds: quartz
Suggestions for wurds: wades
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline mediman

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,663
  • Gender: Male
Re: Spell Check [Merged]
« Reply #172 on: December 29, 2005, 07:03:08 PM »
For further support i have to ask you for a link to the board ...
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,712
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Spell Check [Merged]
« Reply #173 on: December 29, 2005, 08:24:33 PM »
click my signature to further support me  ;D
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,712
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Spell Check [Merged]
« Reply #174 on: January 10, 2006, 10:37:08 PM »
just replying back to say i finally got spell check working...
how...
well i had rc2 on my site and spell check was working so i was running around finding out why. i then saw the spellchecker.js in the default themes folder and copied its contents to the spellchecker.js on my other site. and it fixed it... i have no clue as to why and the other site is still rc1...  ???

Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Nordoelum

  • Guest
Re: Spell Check [Merged]
« Reply #175 on: January 10, 2006, 10:59:03 PM »
click my signature to further support me  ;D

OT: Not everybody have signatures enabled. So please post it in the post instead. Not keen on change the view only to see your link in the signature :P

neonet01

  • Guest
Re: Spell Check [Merged]
« Reply #176 on: February 16, 2006, 07:31:36 PM »
Well after doing that Linux line change thing suggested on what page 3 worked.  Didn't think it was going to do anything but it did.  Installed the files right off the web site, added the line to php.ini and then edit those 2 files and it loaded right up.

www.casblog.net
Windows Server 2003
IIS 6
PHP 4.4.2
SMF 1.1RC2

So it can be done, just have to change the two files to Linux.

Offline BiGBLiZZ

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
  • Riddler Extraordinaire
    • CWoT
Re: Spell Check [Merged]
« Reply #177 on: March 13, 2006, 06:52:37 PM »
My turn to complain about the Spell Checking not working on my forums!

I have read this thread about 12 times now, and sent back and forth with my web host (they are SO great to put up with me this long.

Here are the out puts from their responses:

Quote from:  web host
It is installed on the node, the direct path to it here is:

/usr/bin/aspell

Where do I look to make sure the forum is looking here?

then as far as Pspell and the libraries and Aspell version:

Quote from: web host
Its already set:

root@ophira [~]# php -i|grep -i spell Configure Command => './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zip' '--with-zlib' pspell PSpell Support => enabled


If you need the english aspell dictionary, it's already installed and has been present for a while:

root@ophira [~]# rpm -qa | grep aspell aspell-en-0.51-11 aspell-0.50.5-3.fc3

I think the library is being picked up correctly.

I have double and triple checked that spell check is enabled and it is, but I still get this error:

Quote from:  error message
Enable spell checking. You MUST have the pspell library installed on your server and your PHP configuration set up to use the pspell library. Your server DOES NOT appear to havethis set up.

So what do I do now?

Thanks for any help

I am running 1.1 RC2  btw
Think you are clever?
Prove It!

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Spell Check [Merged]
« Reply #178 on: March 13, 2006, 10:13:01 PM »
ASk them to install a dictionary.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline BiGBLiZZ

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
  • Riddler Extraordinaire
    • CWoT
Re: Spell Check [Merged]
« Reply #179 on: March 14, 2006, 12:59:23 AM »
There is one already there:

Quote
If you need the english aspell dictionary, it's already installed and has been present for a while:

root@ophira [~]# rpm -qa | grep aspell aspell-en-0.51-11 aspell-0.50.5-3.fc3

That's why I am so confused here.   :o
Think you are clever?
Prove It!