Okay, that explains a lot, especially about how the bot would know classifications for words I haven't yet defined. I was looking at the :isa and :means variables in the WordMeansSomething script and wondering where they were defined, but that makes more sense now. By the way, I take :that to mean the last phrase, as in 'I just said that', but what is :thatstar? I did find #classification in the knowledge base and see a listing of them, I assume I can do the same for #primitives.
That answers the quoting versus variable question very well. Thanks very much. An example of a parts of speech tagger, would be as such.., if I said "Does Jane run fast?" a POS tagger could determine the interrogative "Does", and the predicate "Jane run(s) fast?". Since the predicate is in this case a logical statement, the bot could by recognizing it is a question, extract the predicate and test it by identifying the subject "Jane", the verb "runs" and the adverb "fast" and testing if "runs" is a verb associated with Jane and if "fast" is an adverb associated with the "runs" verb of Jane. Of course, the bot would have to be told this information (or learn it from Freebase) and #actions could be associated to verbs, but the advantage here is by tagging parts of speech and analyzing their validity within the relationships of the sentence structure, the nesting of case based responses could simplified (flattened) into variable declarations :interrogative, :subject, :verb and :adverb and a slightly more complex, but generic Equation.
This is similar to the NounVerbAdjective structures, but could be more easily extended to other sentences, by adding more variable declarations. Thus in a slightly more challenging case of a "What can you do?" query, instead of adding the variations of "can" as "do, could, will, won't and can't" to separate cases of the WhatState, with separate goto states and possibly equations, they could be identified as all variations of the 'modal' "can" in the interrogative (see link below for POS tag abbreviation definitions). The same analysis process could be used for "What can't you do?" after simply replacing the interrogative "can" with "can not", as to whether the subject "I" has any items related to the verb "do" and "can not". The same could be repeated for "do, could, will and won't" I think even from separate scripts by associating a new words to the classification of 'modal'. "What", by the way, in this case is treated in the sense of "what all" to the interrogative "can".
With an POS tagger, even the variable declarations might be reduced to an :anything where the Equation then checks if the #word can be tagged as a POS, and then sends the parts to be analyzed using the sentence structure. Essentially, shifting the speech analysis from an explicit bit-wise branching scheme written by the scripter (which is fundamental, don't get me wrong), to more of a language processor based on checking the validity of parts and structure relationships. Especially, if existing information is imported from Freebase that could be queried without specific routines. Hope that makes sense. I think this is close to how the brain, (at least mine), works, as in it generally determines if a statement is declarative or interrogative and identifies the subject first and then either searches for or and verifies and creates claims of attributes to it.