This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
querying_a_gellish_english_database [2020/03/11 14:01] andries Base queries paragraph added |
querying_a_gellish_english_database [2020/03/11 14:06] andries |
||
---|---|---|---|
Line 21: | Line 21: | ||
|query| what | is classified as a | pump | | |query| what | is classified as a | pump | | ||
|query| who| is general manager of | Ford | | |query| who| is general manager of | Ford | | ||
- | //Table 1, Simple queries in Gellish English// \\ | + | //Table 1, Simple queries in Gellish English// \\ |
The example question on the first line asks for the object(s) that have a relation of type “is classified as a” with the concept “pump”. Because of the taxonomic nature of Gellish this query should also trigger software to search for subtypes of 'pump'. Thus, for example, it should also find things that are classified as a 'centrifugal pump' (which is defined as a subtype of 'pump'). \\ | The example question on the first line asks for the object(s) that have a relation of type “is classified as a” with the concept “pump”. Because of the taxonomic nature of Gellish this query should also trigger software to search for subtypes of 'pump'. Thus, for example, it should also find things that are classified as a 'centrifugal pump' (which is defined as a subtype of 'pump'). \\ | ||
The name of an unknown may consist of multiple terms. The first term of a multi term name of an unknown might be followed by the name of a kind, which should be interpreted by software as a requirement for the kind that classifies the searched individual thing(s). For example the query: 'which pump is part of Unit-100' specifies two requirements in one expression, because it asks for individual things that are classified as a pump and that are parts of Unit-100. | The name of an unknown may consist of multiple terms. The first term of a multi term name of an unknown might be followed by the name of a kind, which should be interpreted by software as a requirement for the kind that classifies the searched individual thing(s). For example the query: 'which pump is part of Unit-100' specifies two requirements in one expression, because it asks for individual things that are classified as a pump and that are parts of Unit-100. | ||
Line 27: | Line 28: | ||
The use of the intention 'query' or 'question' indicates that an expression should be interpreted by a computer as a question. If a query is expressed in a Gellish expression format file, then the file header may include 'category=query', which specifies that the file contains one or more queries. Then the specification of the intention in a separate table column may be omitted, because the software should append that automatically.\\ | The use of the intention 'query' or 'question' indicates that an expression should be interpreted by a computer as a question. If a query is expressed in a Gellish expression format file, then the file header may include 'category=query', which specifies that the file contains one or more queries. Then the specification of the intention in a separate table column may be omitted, because the software should append that automatically.\\ | ||
Note that Gellish includes the following rule: when an unknown appears to be an aspect, then the software should not only retrieve the possible aspect(s) name(s), but also their values and if applicable it should also retrieve the units of measures for the values. \\ | Note that Gellish includes the following rule: when an unknown appears to be an aspect, then the software should not only retrieve the possible aspect(s) name(s), but also their values and if applicable it should also retrieve the units of measures for the values. \\ | ||
- | Gellish queries may specify unique identifiers (UID's) to identify the known and also the unknown objects. The use of UIDs for known objects eliminate possible misinterpretations because of the use of homonyms (different objects with the same name). Objects that are unknowns should be identified in Gellish by UIDs in the reserved range 1-99, possibly preceded by a prefix and a colon, such as 'unkn:'. Thus, the use of a UID in that range means that the object is unknown and is requested. | + | Gellish queries may specify unique identifiers (UIDs) to identify the known and also the unknown objects. The use of UIDs for known objects eliminate possible misinterpretations because of the use of homonyms (different objects with the same name). Objects that are unknowns should be identified in Gellish by UIDs in the reserved range 1-99, possibly preceded by a prefix and a colon, such as 'unkn:'. Thus, the use of a UID in that range means that the object is unknown and is requested. |
==== 2.2 Querying results and inheritance ==== | ==== 2.2 Querying results and inheritance ==== | ||
- | A query expressions are in fact a template for the resulting expressions, where knowns are filled-in on places of unknowns. So a search engine should find all the expressions that fit in the template. Thus, the result of a query will be a list of expressions that satisfy the query template. \\ | + | Query expressions are in fact a template for the resulting expressions, where knowns are filled-in on places of unknowns. Thus, a search engine should find all the expressions that fit in the template and the result of a query will be a list of expressions that satisfy the query template. \\ |
If the query asks for objects that are classified by a concept that is defined in the dictionary, then the //inheritance// rules for the subtype-supertype hierarchy in the taxonomy imply that not only objects that are directly classified by that concept satisfy the question, but also objects that are classified by one of the subtypes of that concept. For example, the question: \\ | If the query asks for objects that are classified by a concept that is defined in the dictionary, then the //inheritance// rules for the subtype-supertype hierarchy in the taxonomy imply that not only objects that are directly classified by that concept satisfy the question, but also objects that are classified by one of the subtypes of that concept. For example, the question: \\ | ||
- what is classified as a pressure gauge? \\ | - what is classified as a pressure gauge? \\ | ||
Line 47: | Line 48: | ||
| query specification | Capacity of pump | is classified as a | capacity (volume flow rate) | | | query specification | Capacity of pump | is classified as a | capacity (volume flow rate) | | ||
| query specification | Capacity of pump | has on scale a value grater than | 30 | dm3/s| | | query specification | Capacity of pump | has on scale a value grater than | 30 | dm3/s| | ||
- | //Table 2, Example of a query with constraints// | + | //Table 2, Example of a query with constraints // |
In this example the names that start with a capital character are individual unknowns. The name 'Capacity of pump' indicates the capacity of any potentially found pump and that capacity is classified and should have a value greater than 30 dm3/s. | In this example the names that start with a capital character are individual unknowns. The name 'Capacity of pump' indicates the capacity of any potentially found pump and that capacity is classified and should have a value greater than 30 dm3/s. |