LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Developing a Spelling & Grammar Checker (https://www.linuxquestions.org/questions/programming-9/developing-a-spelling-and-grammar-checker-20486/)

X11 05-08-2002 08:29 AM

Developing a Spelling & Grammar Checker
 
I was wondering how I could develop a spelling and grammar checker.

Eg. what programing language would be most suitable for this, how does a grammar checker actually work properly (I've noticed sometimes it does), would I need have a HUGE list of words from a dictionary or is there an easier way, etc.

Thanks in advance :)

Mik 05-08-2002 09:43 AM

I don't know about a grammer checker. But for a spelling checker I would look for either ispell or aspell at http://freshmeat.net

Sfin 05-09-2002 03:35 PM

Well for a spell checker I think that you will need a database that conatins all the words you want, and have a facility to allow users to add words into this dictionary.

Then as the user types in words they are compared with words in the dictonary, and if there is a match then the work is correct, otherwise it will be a spelling mistake. Then it will prompt the user to correct it.

Also for a little more advanced functionality; assuming the word isn't in the dictionary, you can have the program compare the work with other words in the dictonary and have it list those words in the dictionary that most resemble the word that is wrong. That way you can give the user some suggestions to correct the word.

Then you can also add some automatic corrections, ex. a lot of people sometimes right "teh" instead of "the" so have the program automatically change it.

There are a lot of stuff you can do, but I think that this is the basic framework of a spell checker.

About the grammer thing I have no idea. Maybe have a list of nouns, verbs and so on each in a different dictionary, then make sure that they come in a specific order to make a correct sentence or so on. So you would check from a starting "." to an edning "." and that makes one sentence; so the program checks between those that there is a verb, noun, and so on in a specifc order to make a correct word.

djjones 05-26-2002 05:23 PM

Did you manage to do it?
 
I'm curious if you were able to build the Java Grammar checker. Please let me know.

David Jones, djjones@ariasolutions.com

lackluster 05-26-2002 06:17 PM

Grammar checker, take an English (or whatever language you wanna use) class and listen attentivly to what is being said. Pay close attention to sentance diagrams; as you take in the information, think about how you could relate what is being said to a computer (via a HLL, hopefully :)). I would choose perl if you just wanna run through a document and present output. Otherwise I'd use C++ and the STL. This would be my approach, at least. Hope that helps some :).


All times are GMT -5. The time now is 02:38 PM.