Grammer correctness software?

Started by
9 comments, last by Emmanuel Deloget 18 years, 11 months ago
I am wondering if there are programes which check spelling but additionaly check if a sentence's grammer is correct? I am asking this to know if such a task is reasnoable or very difficult.
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
Advertisement
Microsoft Word has some grammar-checking capability, if you're interested in seeing such a thing in action. My initial thought is that coding something like this would be non-trivial. Grammar (English grammar in particular) seems like the sort of thing that would be difficult for a computer to analyze. I would think even a rudimentary grammar-checking program would be quite complex.
Quote:Original post by jyk
Microsoft Word has some grammar-checking capability, if you're interested in seeing such a thing in action. My initial thought is that coding something like this would be non-trivial. Grammar (English grammar in particular) seems like the sort of thing that would be difficult for a computer to analyze. I would think even a rudimentary grammar-checking program would be quite complex.


It is not non-trivial, it is impossible (as of today). First, any natural language grammar is context sensitive, and computers are very bad at context understanding. Second, you can use unusual grammar to add more style to your wording - a natural language grammar is barely defined by 'anything which can be understood is good enough' :)

As a conséquence, natural language processing is considered to be the holy grail of modern programming.

Regards,
I dont want to check if the sentence makes sense. A sentence like: "My donkey is purple" would be fine. I just want to know which words can be put next to each other, there must be some rules for that. I dont think you can invent any sentence you would like. Why the words are divided to noun, verbs and etc? if as you imply there are no rules for composing a sentence from words by their types.
I find it hard to believe that a sentence is grammatically correct depending on its context, since context is not something unequivocal and thefore for different people the same sentence will be grammatically correct or grammaticaly incorrect depending on their understanding of the context?
Perhaps what you mean about grammer is different from what I mean.

Can you please give an example of a sentence that would be grammatically correct in one context but grammatically incorrect in other context?

I thought that grammer is only about the correctness of a sentence standing for its own, without the paragraph it is from. If not, then how does that called?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
Consider this, in German you can say: I walked down the street and saw a ENTE!

A ENTE can be either a car (it is very old and not being manufactured anymore)
but a ENTE can also be a fraud in a newspaper or at least the being duck.

You see a word can have several meanings and a computer is very bad in finding out the difference I mean when I write the sentence.

What you need is (basically spoken) a buffer that reads int the complete paragraph and then get the essence of it. Which is very hard-as I think.

I think that's why OpenOffice/StarOffice doesn't have any grammar checkers and their products are cheaper while Microsoft Word has a grammar checker and is much more expensive.

I don't want to say that it isn't possible to do such a thing but it's a job that even pros (like the guys from StarOffice/OpenOffice) didn't approach.
So the problem is with words that may have two meanings? and thus different types of a word.
I just want to check if a sentence standing on its own is correct, without caring of its meaning. So if a sentence is using a word that may have two meanings, if either one of those two meanings is suitable for the sentence to be correct, then thats enougth for me. Even if the intention of the meaning of the word was different, and even if the sentence doesnt make any sense.
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
Quote:Original post by The C modest god
So the problem is with words that may have two meanings? and thus different types of a word.
I just want to check if a sentence standing on its own is correct, without caring of its meaning. So if a sentence is using a word that may have two meanings, if either one of those two meanings is suitable for the sentence to be correct, then thats enougth for me. Even if the intention of the meaning of the word was different, and even if the sentence doesnt make any sense.


Grammatically the sentence " I am a programmer" can be correct when I say "Programmer am I" you cannot solve a sentence without know the meaning of what you want to express.

In my study I had addend a course...and the professor was using a very god example for this.

Take the cookie monster for example. It's a simple program that uses if-phrases. The cookie monster asks you for a cookie. If you give him, let's say, a bread, it will answer you: No I want a cookie. And it will asking you for a cookie.

Why? Because it doesn't know anything about the keywords except Cookie. What I want to say is, English and German are very complex languages, where the grammar can not be substracted to a few simple rules, like verb noun and so on. You must understand the meaning of the sentence in order to get the basic rules that lie behind the sentence.

If you got to Star Wars 3 and hear Yoda talking, well his sentences are grammatically correct but the problem is nobody would talk like him.
Open up a copy of Microsoft Word, and turn on grammar check. Type some grammatically correct, and some grammatically incorrect, sentences. Watch the incorrect ones be underlined in green. Clearly, it's possible to provide useful grammar hints in modern software.

I seem to remember that we licensed this kind of functionality from the Houghton-Mifflin company in a former life (15 years ago) -- perhaps they're still around?
enum Bool { True, False, FileNotFound };
It wouldn't be that hard to make something that kinda sorta works but a real comercial product is not fesable. Basicly you would take your spell check dictionary and add part of speech information to it. Then transform the sentence from words to a parts of speech represntation. Finally vaildiate it aginst a list of grammer rules. That should get you something fun to play with but nothing ready for production. That said there are grammer rules that would be dificult to impossible to codify in this manner such as run-on sentances.
"Programmer am I" is also acceptable, even if no one talks like that.
However, can you not give me a single rule (based on the types of the words, what are they for if no rule can be derived from them?) that will determine that a sentence is incorrect?
For example the sentence: "a I a eating if" will also be grammatically correct?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.

This topic is closed to new replies.

Advertisement