[beta] Spell check mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

[beta] Spell check mod

Post by Ifroggy » Thu Jul 04, 2002 6:01 pm

Right , responding directly to a request I have made a spellchecker mod.

a demo of it is on

http://www.blacksheepbar.com
hen you post a message you will see a spell check button underneath the message area.
Click that and a window will pop up with your message in in. all miss-spelled words are in a select box in red with other options for the word in blue. You then choose your replacements or leave them as it is and click update . the altered message is then placed back into your message!

its quite a basic spell checker and it doesnt handle grammar or bad capitals etc.

But gimme a break this was all coded with no php knowlege at first :)

any feed back on ideas and options welcome. I know sometimes it does give the best results , but hey I've just learnt how to do it , I'm working on an improved algorith , sometimes it works great :)

Once I have tidied up the code , written docs and general improved it to handle stupidity and bad setups I will release it publicly :)
Last edited by Ifroggy on Wed Jul 31, 2002 4:14 pm, edited 1 time in total.
Perversion
*Team phpSpell*

DanielJarrett
Registered User
Posts: 425
Joined: Fri Dec 14, 2001 7:30 pm
Location: near Paris, France
Contact:

Post by DanielJarrett » Thu Jul 04, 2002 6:05 pm

Where did you get the words from?

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Thu Jul 04, 2002 6:30 pm

lol is that all you can ask? cheers!

Seriously , it wasnt as easy as you would think to get txt files but i did I found them on the net , I found a few from open source dictionaries , and a few commerical programs have their dictionaries in txt format. I think thats ok , cos , well words arenot copyrighted are they!
Perversion
*Team phpSpell*

everybody knows me
Registered User
Posts: 2
Joined: Thu Jul 04, 2002 8:08 pm

Post by everybody knows me » Thu Jul 04, 2002 8:11 pm

Wow...its all text files?

That means we can actually add our own words to it?

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Thu Jul 04, 2002 8:21 pm

right there are three parts to it :

1 The spellchecker part
2 The spellcher installation .
here you tell it you mysql database stuff and also whch .dic file ( just a txt file with a single word on each line) to install

3) An updater for more .dic files

So , you can install whatever words you want , just make a txt file with a .dic extension and format it so it just has one word per line and run the updater and it'll put it into the database

the spellcheker uses a database not txt files but its esay to inport new data from text files :)
Perversion
*Team phpSpell*

radmanics
Registered User
Posts: 307
Joined: Sat Mar 30, 2002 3:29 pm
Location: England
Contact:

Post by radmanics » Thu Jul 04, 2002 9:07 pm

isnt there an online dictionary you can connect to? i dont know if that will be better, as you can add your own words.

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Fri Jul 05, 2002 12:59 am

no that would be naff , I like to keep things contained , with these scripts you have everything you need ,
ie it comes with a 130,000 word dictionary :)
Perversion
*Team phpSpell*

zemaj
Registered User
Posts: 267
Joined: Thu Mar 07, 2002 3:58 am
Location: Australia
Contact:

Post by zemaj » Fri Jul 05, 2002 1:44 am

That's very nice. You should really allow users to add words though.

-zemaj

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Fri Jul 05, 2002 1:55 am

Sorry ? Am I not getting through ... hello ... hello is this thing on?

It comes with a 130,000 word dictionary *BUT YOU CAN USE THE UPDATER TO ADD WORDS ANYTIME YOU WANT*

As for letting users add words , no , that would lead to megga crap fillign the database.

May be a personal dictionary would be nice using cookies , but thats for another time , this does the job it was designed for very nicly, personal dictionaries would not be too hard to add though .. maybe v2 :)
Perversion
*Team phpSpell*

User avatar
RMS
Registered User
Posts: 517
Joined: Sun Apr 21, 2002 1:53 am
Location: I'm not sure

Post by RMS » Fri Jul 05, 2002 2:03 am

So basically anyone who has access to this function in the admin panel can alter it? Change some definitions to fit your purpose, add some net jargon, and board specific abbreviations or whatever?
This is my signature.

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Fri Jul 05, 2002 2:11 am

basically that will be the case
the installer script has to be uploaded and run then deleted for security.
the updater scrip currently is just run from a url , but i will try and make it so its run of the admin panel and only people with admin panel right can use it.

using the updater , yes you can add *any* word , jargon ,abs whatever :)

there is no functunality to change words though or delete them , good idea I will look into that . But I think that functionality will have to wait till v2. Think about it , you have like 130,000 words , just ilsting them and asking you to type out the one you want to delete would be naff , so I'd have to make a nice interface with tick boxes to delete , or icons to edit em etc etc , there not that much need to go around deleting words or changing em when you can add more really.
Perversion
*Team phpSpell*

User avatar
BarryMoore
Registered User
Posts: 52
Joined: Thu Dec 20, 2001 4:37 pm
Location: UK

Post by BarryMoore » Fri Jul 05, 2002 8:41 am

Nice work. One more thing you might want to think about adding - If it picks up a word as miss-spelled but their are no alternatives you should be able to edit it directly - at the moment you can't, you have to click on update and then can only edit it in the post-message box.

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Fri Jul 05, 2002 12:24 pm

yeah I thought about , trying to think of an interface which will allow that and also provide ease of use.
Perversion
*Team phpSpell*

radmanics
Registered User
Posts: 307
Joined: Sat Mar 30, 2002 3:29 pm
Location: England
Contact:

Post by radmanics » Fri Jul 05, 2002 4:59 pm

how about like the word spell checker? a window on top showing the mistake, highlight, which is editable?

or amybe an easier way, you could have an input box next to the select box, which you put the repleacement word in, which is then inserted instead. So the codes something like:

Code: Select all

if ($own_word != "") {
       ----- [code to replace word/s ] ------
} else if ($default_word != "") {
       ----- [code to replace word/s ] ------
} else {
       ----- [ error code ] ------
}

Ifroggy
Registered User
Posts: 78
Joined: Thu Jun 27, 2002 1:58 am
Location: www.blacksheepbar.com
Contact:

Post by Ifroggy » Fri Jul 05, 2002 5:42 pm

oh I know various ways *to do it* , just trying to keep it simple , maybe what'll happen in v2 is that bad spelt words are just red , and a little box next to them allows you to click on it and a popup layer will let you do funky things ...
Perversion
*Team phpSpell*

Locked

Return to “[2.0.x] MODs in Development”