• Forum
  • Lounge
  • Making a program which understands Engli

 
Making a program which understands English

I'm trying to make a command line program which keeps recording what I type and answer questions whenever I ask them (questions will be detected by the user typing '?')

-->My name is Eklavya.
-->I am a programmer.
-->I make programs because I like programming.
-->What is my name?
	Your name is Eklavya.
-->What do I make?
	You make programs.
-->Why do I make programs?
	Because you like programming.
-->You are great. You are the best program ever.
-->What am I?
	You are a programmer.
-->What are you?
	I am the best program ever.


Do you people get it? This program will split a program about the verb and extract the subject and the object. It will then...(I haven't thought much about implementation yet)

What I need:
1. previous work (free to view, easy to understand) on this subject
2. a list of words, grouped by nouns, pronouns, verbs, adjectives, etc.
3. good advice
4. Good keywords to search for

I'm currently trying to learn the English grammar.

If anyone has any knowledge on this topic, please share it.
Last edited on
You should learn Sentence Diagramming. It would help immensely if you knew how to diagram a sentence; you could write code that would do it automatically (though represent it in code form, a visual is just bonus points).

You're also setting yourself up for failure by choosing English. It is by far the most ludicrous language. Thankfully you won't need to deal with spelling rules; you can just use a database dictionary.
Yeeaa English is not going to be a fun language to do this in. So many random caveats you have to watch out for.
Gee, I thought we had a thread about this. English is as good a language as any, maybe better. It's just that they're all god awful, especially for this kind of thing.
@hamsterman when experienced native speakers have to ask for help because the rules are so confusing, I think that's a good sign that the language is pretty bad. That doesn't mean it is impractical for everyday use, just one of those things that works but in a really bad way.

Think of it as non-standard C code form the eighties still running on modern day devices. It works, but it's terrible, and we could do better.
Last edited on
But I know only 2 languages English and Hindi.
I thought that by choosing English I can get support on the internet as Hindi is not a widely used language on the internet.

Thanks for the sentence diagramming thing
Oui, on pourrais parler francais.
@LB, yes, English is not too consistent, but no language is. I don't recall you ever giving an example of a better natural language. Do you even know any others? I'm okay with you saying that English is bad, but instead you chose to say that it is the worst.

@eklavya sharma, don't take our replies too seriously. English is an okay choice, at least if you know the essential grammar rules. Still, this will be a fairly hard project (depending on how much you want to constrain your vocabulary and the kinds of sentences you want to understand).
Well I'm not good at french. I haven't studied its grammar much. It is also probably difficult to use Hindi as it uses Devnagri script and phonetic typing using latin will make it difficult to use or ambiguous.
Last edited on
Topic archived. No new replies allowed.