Query variables
From OpenCog
(Redirected from Query)
RelEx uses query variables to help identify the subject or object of a query. For example, the parse of "Who invented baseball?" generates:
_subj(invent, _$qVar) _obj(invent, baseball) tense(invent, past) pos(invent, verb) noun_number(baseball, uncountable) pos(baseball, noun) pos(?, punctuation) QUERY-TYPE(_$qVar, who) pos(_$qVar, noun)
In this example, _$qVar identifies the uncertain thing being queried for. It should be viewed as a "blank slot" that, when filled out, provides the right answer. In other words, the output of RelEx can be understood to be a predicate (in the mathematical logic sense) that evaluates to true when the slot is filled with the correct answer.
Note that associated with the query variable is a word property, the QUERY-TYPE, which identifies the basic type of the query. There are seven types: who, what,where, when, how, which, why.

