Query Modeling

Queries in Gellish Formal English are a special case of Gellish Messages. They can be expressed in the same way in which ordinary statements are expressed, and models are composed, except that the intention of some expressions is not ‘statement’, but ‘question’ and the intention of some expressions may be ‘specification’.

The unknown thing(s) in a query model shall have UID’s in the range 1-99. Those unknowns may be represented by any artificial names (terms). For example the names what, which, who, etc. (or what-1, what-2, etc. or unknown-1, etc. or A, B, C, etc.).

This capability is based on the principle that expressions have a generalized form of a statement, that is extended with an explicit intention, such as ‘statement’, ‘question’, ‘answer’, ‘confirmation’, ‘promise’, ‘denial’, etc.

For example, in Gellish Formal English the following expression is a correct statement:
statement: (101) The Eiffel Tower <is located in> (102) Paris

In a similar way the question where The Eiffel Tower is located can be formulated as follows:
question: (101) The Eiffel Tower <is located in> (1) where

Gellish enabled application software should be able to produce the following response:
answer: (101) The Eiffel Tower <is located in> (102) Paris

Search Strings

To find the UID of The Eiffel Tower in the first place, and to eliminate possible homonyms, Gellish Enabled software should support the use of a search string without a UID and a specification of the extent in which the found strings shall comply with the search string. For example a specification that the found string shall contain ‘Eiff’.

Complex query models

A query may also consist of a model complex model in which one or more things are unknown.
For example, the above query may be extended with a question about the height of The Eiffel Tower. This is specified with the following additional line:

question: (101) The Eiffel Tower <has as aspect> (3) h1
question: (3) h1 <is classified as a> height

A rule for Gellish Queries is that a question about an aspect should result not only in the name of the aspect, but also in its qualification or quantification, possible on a scale (unit of measure).

Multiple answers

Queries may result in multiple answers, such as the answer on the following single line query:

question: (2) what <is classified as a> (130206) pump

Gellish enabled application software should be able to produce for example the following response:

answer: (203) P-1004 <is classified as a> centrifugal pump
answer: (306) P-2001 <is classified as a> reciprocating pump

This answer illustrates that two answers satisfy the query, because the Gellish Dictionary-Taxonomy defines that centrifugal pump as well as reciprocating pump are both subtypes of pump.

Further explanation

Further information about the specification of queries is given in the free document ‘Definition of Universal Semantic Databases and Data Exchange Messages‘.