User Tools

Site Tools


querying_a_gellish_english_database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
querying_a_gellish_english_database [2011/10/20 23:13]
peter [2. Questions about unknown objects]
querying_a_gellish_english_database [2018/02/15 12:29] (current)
Line 1: Line 1:
-===== Querying a Gellish English database ===== +====== Querying a Gellish English database ​====== 
-===== 1. Queries, questions and dialogues in Gellish English =====+====== 1. Queries, questions and dialogues in Gellish English ​======
  
 Queries for conventional databases are usually expressed in a special query language, such as SQL. \\ Queries for conventional databases are usually expressed in a special query language, such as SQL. \\
-Gellish does not require a special query language, because Gellish Queries are nearly identical to ordinary propositions. In a natural language there is no big difference between the structure of sentence that expresses a question and a sentence that expresses a proposition. That same principle is applied in Gellish English. If you know how to express facts in Gellish English, then you only need to know the few additional rules that are explained below in order to be able to write queries for a [[:Gellish Database]]. As the response to a Gellish Query also consists of Gellish expressions,​ this implifies the creation of Software Agents and Distributed Gellish databases.+Gellish does not require a special query language, because Gellish Queries are nearly identical to ordinary propositions. In a natural language there is no big difference between the structure of sentence that expresses a question and a sentence that expresses a proposition. That same principle is applied in Gellish English. If you know how to express facts in Gellish English, then you only need to know the few additional rules that are explained below in order to be able to write queries for a [[:gellish_databases|Gellish Database]]. As the response to a Gellish Query also consists of Gellish expressions,​ this implifies the creation of Software Agents and Distributed Gellish databases.
  
 There are basically two kinds of questions: There are basically two kinds of questions:
Line 10: Line 10:
 Both kinds of queries and the responses to them are discussed below. Both kinds of queries and the responses to them are discussed below.
  
-===== 2. Questions about unknown objects =====+====== 2. Questions about unknown objects ​======
 A question about things that are unknown has as basic structure: A question about things that are unknown has as basic structure:
   * the basic question: which object(s) have a relation of a particular type with another object?   * the basic question: which object(s) have a relation of a particular type with another object?
Line 30: Line 30:
 The use of any of these terms means that the expression should be interpreted by a computer as a question, whereas the term 'which aspect'​ means that not just a possible name of the aspect should be retrieved, but also it value and if applicable the scale for the value. \\ The use of any of these terms means that the expression should be interpreted by a computer as a question, whereas the term 'which aspect'​ means that not just a possible name of the aspect should be retrieved, but also it value and if applicable the scale for the value. \\
 Full Gellish English expressions use unique identifiers (UID'​s) to identify objects. To identify objects (or collections of objects) that are unknown in full Gellish English the range of unique identifiers 1-100 is reserved. Thus, the use of a UID in that range means that the objects are unknown and are requested. The name of the unknown is then free, although the use of one or more of the above reserved terms is still recommended. Full Gellish English expressions use unique identifiers (UID'​s) to identify objects. To identify objects (or collections of objects) that are unknown in full Gellish English the range of unique identifiers 1-100 is reserved. Thus, the use of a UID in that range means that the objects are unknown and are requested. The name of the unknown is then free, although the use of one or more of the above reserved terms is still recommended.
-== 2.1 Querying results and inheritance ==+==== 2.1 Querying results and inheritance ​====
 The query is in fact a template for the results. So the search engine should find all the facts that fit in the template. Thus, the result of a query will be a list of facts that satisfy the template. \\ The query is in fact a template for the results. So the search engine should find all the facts that fit in the template. Thus, the result of a query will be a list of facts that satisfy the template. \\
 If the query asks for objects that are classified by a concept that is defined in the [[:Gellish English 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. So, the question: \\ If the query asks for objects that are classified by a concept that is defined in the [[:Gellish English 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. So, the question: \\
Line 42: Line 42:
  
 Software that enables Gellish English querying should therefore be able to automatically generate the answer as a list of things that are either classified by a concept or are classified as one of its subtypes (where the software should indicate when objects are classified more than once). Software that enables Gellish English querying should therefore be able to automatically generate the answer as a list of things that are either classified by a concept or are classified as one of its subtypes (where the software should indicate when objects are classified more than once).
-== 2.2 Specification of additional constraints ==+==== 2.2 Specification of additional constraints ​====
 Additional constraints are expressed in a similar way as if it was an expression of the aspects of an individual object that is called ‘what’. For example: \\ Additional constraints are expressed in a similar way as if it was an expression of the aspects of an individual object that is called ‘what’. For example: \\
 ^Name of left hand object^Name of relation type^Name of right hand object^UoM^ ^Name of left hand object^Name of relation type^Name of right hand object^UoM^
Line 52: Line 52:
  
 This example also illustrates that the query expresses a pattern that should be satisfied by the search engine, because if we would replace the term '​what'​ by the name of a pump, such as P-101, then the above expressions would have been a specification of information about pump P-101. This example also illustrates that the query expresses a pattern that should be satisfied by the search engine, because if we would replace the term '​what'​ by the name of a pump, such as P-101, then the above expressions would have been a specification of information about pump P-101.
-== 2.2.1 Denials ==+=== 2.2.1 Denials ​===
 A specification may also include a denial. This means that things are search because they have some aspect, but because they do not have such an aspect. Such a denial can be expressed as a separate qualifier of the expression, called the ‘intention’ of the expression (see the paragraph on ‘Requests and Responses’ below) that indicates whether the statement is for the found things should be the case or not be the case. This is indicated by the intention ‘true’, ‘false’ (or ‘not’) or ‘questionable’ (or ‘maybe’). A specification may also include a denial. This means that things are search because they have some aspect, but because they do not have such an aspect. Such a denial can be expressed as a separate qualifier of the expression, called the ‘intention’ of the expression (see the paragraph on ‘Requests and Responses’ below) that indicates whether the statement is for the found things should be the case or not be the case. This is indicated by the intention ‘true’, ‘false’ (or ‘not’) or ‘questionable’ (or ‘maybe’).
-== 2.2.2 Multiple unknowns ==+=== 2.2.2 Multiple unknowns ​===
 If more than one unknown object is included in a query, then the query should make a distinction between the different unknowns. This can be done by using one of the other reserved terms for unknown objects, but it is essentially done by giving them different unique identifiers (UID’s). The range of UID’s 1 – 100 are reserved for free usage for unknown queried objects in Gellish queries. If more than one unknown object is included in a query, then the query should make a distinction between the different unknowns. This can be done by using one of the other reserved terms for unknown objects, but it is essentially done by giving them different unique identifiers (UID’s). The range of UID’s 1 – 100 are reserved for free usage for unknown queried objects in Gellish queries.
   * Note: Application software may hide the UID’s for users by adopting the convention to allow a dash and a sequence number to distinguish different objects and to translate that to a UID and a standard term.   * Note: Application software may hide the UID’s for users by adopting the convention to allow a dash and a sequence number to distinguish different objects and to translate that to a UID and a standard term.
Line 70: Line 70:
   * cap. of P-1 has on scale a value equal to 45 dm3/s   * cap. of P-1 has on scale a value equal to 45 dm3/s
  
-== 2.2.3 Constraints about different kinds of objects ==+=== 2.2.3 Constraints about different kinds of objects ​===
 Some queries include constraints about different kinds of objects. For example, we may ask for pumps as well as compressors. In such a case the different unknown objects should be distinguished to enable to specify that one constraint is applicable to objects of one kind and the other constraint is applicable to objects of another kind. For example, if we ask for pumps as well as for compressors,​ then the result should be things that are classified either as a pump or as a compressor, and the query is not about objects that are classified both as a pump and as a compressor (such facts should not be present in a database). The distinction between the two objects can be made by giving them a different UID. The example query about pumps and compressors should therefore be expressed as follows (leaving away the other UID'​s):​ \\ Some queries include constraints about different kinds of objects. For example, we may ask for pumps as well as compressors. In such a case the different unknown objects should be distinguished to enable to specify that one constraint is applicable to objects of one kind and the other constraint is applicable to objects of another kind. For example, if we ask for pumps as well as for compressors,​ then the result should be things that are classified either as a pump or as a compressor, and the query is not about objects that are classified both as a pump and as a compressor (such facts should not be present in a database). The distinction between the two objects can be made by giving them a different UID. The example query about pumps and compressors should therefore be expressed as follows (leaving away the other UID'​s):​ \\
 ^UID of left hand object^Name of left hand object^Name of relation type^Name of right hand object^ ^UID of left hand object^Name of left hand object^Name of relation type^Name of right hand object^
Line 76: Line 76:
 |  2 |  what |  is classified as a |  compressor| |  2 |  what |  is classified as a |  compressor|
 //Table 4, Example of a query about different object types// //Table 4, Example of a query about different object types//
-===== 3. Requests and responses =====+====== 3. Requests and responses ​======
 Questions sometimes have a structure that is difficult to distinguish from statements. In spoken language they are usually distinguished by the tone, the melody of the sentence. In written English, a question mark is then added. Gellish English supports such kinds of expressions by enabling the explicit expression of the ‘communication intent’ of the author of the expression. This enables to express various intentions, such as: Questions sometimes have a structure that is difficult to distinguish from statements. In spoken language they are usually distinguished by the tone, the melody of the sentence. In written English, a question mark is then added. Gellish English supports such kinds of expressions by enabling the explicit expression of the ‘communication intent’ of the author of the expression. This enables to express various intentions, such as:
   * a question   * a question
Line 96: Line 96:
 //Table 5, Examples of expressions about intentions of a proposition,​ without unknown objects// \\ //Table 5, Examples of expressions about intentions of a proposition,​ without unknown objects// \\
 This means that basically the same proposition can be used for different purposes in a communication. This implies that the above two lines express two different opinions about the same fact. This means that basically the same proposition can be used for different purposes in a communication. This implies that the above two lines express two different opinions about the same fact.
-===== 4. Author, date and time of propositions =====+====== 4. Author, date and time of propositions ​======
 The ‘author’ and the moment of creation of a proposition such as a question or an answer can be added as auxiliary facts to a Gellish English expression. A Gellish Database table has dedicated columns for that: the date of creation of a fact (a date/time) and the originator (of the latest change). As there are many ways in which a date/time can be expressed, a Gellish Database uses the standard ‘[http://​support.microsoft.com/​kb/​q180162/​ 1900 date system]’ convention to make the date/time computer interpretable. A user interface may present it in any notation. \\ The ‘author’ and the moment of creation of a proposition such as a question or an answer can be added as auxiliary facts to a Gellish English expression. A Gellish Database table has dedicated columns for that: the date of creation of a fact (a date/time) and the originator (of the latest change). As there are many ways in which a date/time can be expressed, a Gellish Database uses the standard ‘[http://​support.microsoft.com/​kb/​q180162/​ 1900 date system]’ convention to make the date/time computer interpretable. A user interface may present it in any notation. \\
 For example: \\ For example: \\
querying_a_gellish_english_database.txt · Last modified: 2018/02/15 12:29 (external edit)