Ruby and the shell - 2
After thinking a bit on patterns of question that we normally tend to ask, I have quickly derived a method by which the shell could be made to respond to queries sent to the shell as simple questions. Apart from the noise words, most simple questions have a verb and/or a noun. A noun should be parsed by a definition handler, and a verb should be parsed by an action handler.
Coming to think deep about it, English is a badly designed (and evolved) spoken/written language. Sometimes, I just feel the urge of implementing my own spoken/written language that remains perfectly consistent and easily interpretable by the computer as well as humans. Oh yes, there's Sanskrit, the ancient and unadulterated Tamil (both of which I know conceptually, but hardly indepth). But darn, most part of the world breathes English, and asking them to learn a new language isn't going to help. And yes, the most tricky issue is to get other languages to work on my machine first :-P.
On the other hand, I was just thinking of creating a subset of English with a more consistent dialect in forming phrases, clauses and sentences which could be easily adopted by us as a form of spoken language. I need to think more, think deeper to get ideas, as this can get much complex beyond my mental perception.
The last option is to read a list of grammar books, skim through well polished articles, interviews and forms of well written English literature, just to parse the various patterns of words that go into building sentences and contexts. It would also help to build a database with indexes word-to-word affinity - which determines the frequency of a set of words being used together in the same pattern always.
Infact, I've decided to deliberately avoid searching for previous work/attempt/research/advancements or googling in this area as I'm afraid that they would either demotivate the quest for my dream AI shell, or (mis)align (or rather narrow down) my thinking to their line of thought which leads to the still(?) unresolved mystery of building a perfect human-computer interaction mechanism.