Spell Check [Merged]

Started by Senkusha, March 15, 2004, 11:26:56 AM

Previous topic - Next topic

RoarinRow

Quote from: Fizzy on July 19, 2005, 02:32:35 AM
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

spiros

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?

Ben_S

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.

spiros

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.

Oldiesmann

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
Christian Metal Fans

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Oldiesmann

#166
What does this do?

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


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.
Michael Eshom
Christian Metal Fans

SleePy

#167
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
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

*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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

mediman

Quote from: SleePy on December 22, 2005, 04:18:00 AM
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.

mediman

#170
Quote from: SleePy 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

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 />"
   }
}
?>
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

SleePy

using that i get
QuoteEnable 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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

mediman

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.

SleePy

click my signature to further support me  ;D
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Nordoelum

Quote from: SleePy on December 29, 2005, 08:24:33 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

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.

BiGBLiZZ

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!

JayBachatero

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

BiGBLiZZ

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!

Advertisement: