Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grammar check module?

Status
Not open for further replies.

skydesigns

Technical User
Oct 22, 2001
4
US
I want to prevent people from posting garbage link this in my forms:

sffstdtysah addafgaytys

Maybe it can be done simply with regex, but I haven't been able to figure it out. I guess it would be easier to define what constitutes and word, rather than what is "not" a word.

Is there a Perl module available for this sort of thing?

Thanks!

Matt Parker
 
what if the 'good' link is
Code:
[URL unfurl="true"]http://255.255.255.255/[/URL]
???
or
Code:
[URL unfurl="true"]http://www.tdtg.com/[/URL]

as u said 'Maybe it can be done simply with regex'

use regex to see if there is at least (in the link):
- twice /
- http: or ftp:
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
I'm sorry, I typed "link this" when I meant "like this" :-(

Well, it's not links that I'm concerned about. The fields that I'm having trouble with are text fields where people are suppose to put comments, describe themselves, etc. They are required fields - and I already check for min/max length and "word length", but that doesn't stop anyone from just hitting a bunch of keys, typing in some garbage and submitting the form.

This is a difficult one, because numbers and other characters are allowed in these fields. I just want to try and force people to use "real" words, rather than just a string of characters. This seemed like it may be beyond the scope of a set of regex's, and that's why I was hoping there may be a module for just this purpose.
 
even if there were a "english checker" module
this wont be very "user friendly"
people will get pissed if they make "english errors"
or "fast english" like :
r "as" are
u "as" you
etc....
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
You could test against a partial dictionary listing. I'm not a linux man by any stretch, but the last system I worked on had /usr/dict/words which was a simple text file of about 43000 english words (<.5MB), one per line. I actually used it as part of a password guesser to catch the people who make bad passwords to my bbs and write them nasty e-mails demanding a change. You could use such a thing to test if at least x number of words in the input area are found in such a word listing. The list could be ordered, so efficient searching options would be available. I might have that file laying around somewhere if you'd like to do something with it. Just my 2 cents. ----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top