0
Anonymous Posted 19 years ago
Grammar

Basic syntax of a sentance

hello,

I am trying to create a computer program that can interpret english sentances, but I'm struggling with the syntax of an english sentance (which I need to work out first before I can write instructions for the computer). I realize that a real life person wouldn't ever want to use every part of this syntax all at once... but this is for interpreting sentances, not creating them. I'm trying to keep the possibility for it to understand commonly used (yet incorrect) grammar as well.

I've gotten this far:
[adverb] (article [adjective] noun || [adjective] pronoun) verb [ [, verb...] conjunction verb...] [preposition] [(article [adjective] noun || [adjective] pronoun)] [, conjunction <repeat entire sequence once but this time you can leave out the subject; the first noun/pronoun>]
format:
  • [brackets] contain parts_of_speech (POS) which are optional. if two parts of speech are contained withing a single pair of brackets (ex. [conjunction verb] it means that you either have both or neither.)
  • (text1 || text2) indicates that either text1 or text2 may be used but not both
  • 3 dots... indicates that the sequence contained in brackets may repeat (ex. [conjunction verb...] could be conjunction verb conjunction verb; ran and jumped
  • <text> inside greater than and less than symbols is descriptive text and doesn't represent a single POS
I know this looks a little hard to follow but it really isn't that bad... please help I'd really appreciate it

Thanks so much,
Jim
  

Top answer

Not to be a wet blanket, but I don't think this is going to work. Although most statements do follow a basic S-V-O/A sequence, adverbs alone can appear at so many points in a sentence that the permutations are endless.

  • Not to be a wet blanket, but I don't think this is going to work.
  • Although most statements do follow a basic S-V-O/A sequence, adverbs alone can appear at so many points in a sentence that the permutations are endless.
Free · every Monday

Get the Weekly English Kit 📬

New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.

5 Answers
0
Not to be a wet blanket, but I don't think this is going to work. Although most statements do follow a basic S-V-O/A sequence, adverbs alone can appear at so many points in a sentence that the permutations are endless.
0
well the software doesn't have to know every possibility... it could easily check for adverbs and just attach them to their corresponding words so as to ignore them (for syntax analysis purposes) completely.

where can I find the basic syntax for all types of sentances? I'll need to put together similar formulas for questions and commands as well. I appreciate the help

Jim Robert
0
It might be instructive for you to try this on your own before checking what others have already done, but be aware that you are repeating work that began quite a long time ago. One of the first attempts that I'm aware of was Terry Winograd's Language as a Cognitive Process, Volume 1, Syntax (1983), although he quotes parsing algorithms that date back to 1972 or earlier. Appendix D
0
your reply was EXTREMELY helpful! thank you very much

Related Questions