Structured natural language query and knowledge system
Abstract
A structured natural language query and knowledge system is provided to allow a user who lacks programming skills to enter a database query or a rule in the form of a structured natural language sentence. The scope of the sentence is preferably defined by an improved object relational query language, an object relational algebra, or both. Command and conditions that appear in natural language form are defined with corresponding formal query texts. A user is prompted to compose a structured natural language sentence using the defined commands and conditions. The user-selected command and its arguments appear as the verb phrase of a structured natural language sentence. The user-selected conditions and their parameters appear as the adjective phrases of the sentence. The sentence is parsed and changed into a translated formal query text for formal database query and rule processing.
Claims
exact text as granted — not AI-modified1 . A computer-implemented method of creating a query in an object-relational query language, the method comprising:
prompting, via a user interface provided by a computer system, a user to define one or more constants or variables comprising a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable; and the domains of the one or more constants or variables are chosen from a list of defined object-relational data source elements; prompting, via the user interface, a user to choose one or more previously defined object-relational methods; prompting, via the user interface, the user to choose from a list of defined object oriented variables and constants as one or more arguments to the one or more object-relational methods selected; prompting, via the user interface, the user to choose an optional one or more conditions from at least a set of defined conditions, and prompting the user to choose from a list of defined object oriented variables and constants as one or more parameters for the one or more selected conditions; and using the responses received from the user and an object-relational query language to create an object-relational compatible query.
2 . The method of claim 1 , further comprising receiving from the user, via the user interface, in response to a prompt for an argument of one of the one or more object-relational methods or a parameter of one of the one or more conditions, a constant or a variable that is declared to be a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable.
3 . The method of claim 1 , further comprising receiving from the user, via the user interface, in response to a prompt for an argument of one of the one or more object-relational methods or a parameter of one of the one or more conditions, a previously created constant or variable.
4 . The method of claim 1 , further comprising receiving from the user, via the user interface, in response to a prompt for an object-relational data source element, an object-relational query created recursively.
5 . A computer system for creating a query in an object-relational query language, the system comprising:
a database comprising previously defined object-relational methods, object-relational algebra operators, defined object-relational data source elements, and defined conditions; a user interface, provided by the computer system, adapted to prompt a user to choose one or more constants or variables comprising a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable; and the domains of the one or more constants or variables are chosen from a list of defined object-relational data source elements; the user interface further adapted to prompt a user to choose one or more previously defined object-relational methods; the user interface further adapted to prompt the user to choose from a list of defined variables and constants as one or more arguments to the one or more object-relational methods selected or the one or more object-relational algebra operators; the user interface further adapted to prompt the user to choose an optional one or more conditions from at least a set of defined conditions, and adapted to prompt the user to specify one or more defined variables and constants as one or more parameters for the one or more selected conditions; and a query translation module of executable program code running on the computer system configured to use an object-relational language to create an object-relational query with the responses received from the user.
6 . The system of claim 5 , further comprising a formal query processing module in communication with the database, the formal query process module configured to search the object-relational database for data entries that satisfy a formal query text of the object-relational query.
7 . The system of claim 6 , wherein the user interface is further adapted to convey to the user the data entries from the object-relational database found by the formal query processing module to satisfy a formal query text of the object-relational query.
8 . The system of claim 5 , wherein the parameters of at least one of the one or more object-relational conditions comprise a constant or a variable that is declared to be a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable.
9 . The system of claim 5 , wherein the object-relational data source elements comprise a previously created constant or variable.
10 . The system of claim 5 , wherein the parameters of at least one of the one or more object-relational conditions comprise a previously created constant or variable.
11 . The system of claim 5 , wherein the object-relational data source elements comprise an object-relational query created recursively.
12 . A computer-implemented method of creating an object-relational rule, the method comprising:
prompting, via a user interface provided by a computer system, a user to define one or more constants or variables comprising a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable; and the domains of the one or more constants or variables are chosen from a list of defined object-relational data source elements; prompting, via the user interface, the user to choose an optional one or more conditions from at least a set of defined conditions, and prompting the user to choose from a list of defined object oriented variables and constants as one or more parameters for the one or more selected conditions; prompting, via the user interface, the user to choose one or more previously defined object-relational methods; prompting, via the user interface, the user to choose from a list of defined object oriented variables and constants as one or more arguments to the one or more methods selected; and using the responses received from the user to create an object-relational rule comprising one or more variables, with the one or more conditions as a premise of the object-relational rule and the one or more object-relational methods as a consequence of the object-relational rule.
13 . The method of claim 12 , further comprising receiving from the user, via the user interface, in response to a prompt for an argument of one of the one or more object-relational methods or a parameter of one of the one or more conditions, a constant or a variable that is declared to be a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable.
14 . The method of claim 12 , further comprising receiving from the user, via the user interface, in response to a prompt for an argument of one of the one or more object-relational methods or a parameter of one of the one or more conditions, a previously created constant or variable.
15 . The method of claim 12 , further comprising receiving from the user, via the user interface, in response to a prompt for an object-relational data source element, an object-relational query created recursively.
16 . A computer system for creating an object-relational rule, the system comprising:
a database comprising previously defined object-relational methods, object-relational algebra operators, defined object-relational data source elements, and defined conditions; a user interface, provided by the computer system, adapted to prompt a user to choose one or more constants or variables comprising a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable; and the domains of the one or more constants or variables are chosen from a list of defined objected relational data source elements; the user interface further adapted to prompt the user to choose an optional one or more conditions from at least a set of defined conditions, and prompting the user to specify one or more defined variables and constants as one or more parameters for the one or more selected conditions; the user interface further adapted to prompt the user to choose one or more previously defined object-relational methods; the user interface further adapted to prompt the user to choose from a list of defined variables and constants as one or more arguments to the one or more object-relational methods selected or the one or more object-relational algebra operators; and a rule translation module of executable program code running on the computer system configured to use an object-relational language to create an object-relational rule with the responses received from the user.
17 . The system of claim 16 , further comprising a formal rule processing module in communication with the database, the formal rule processing module configured to search the object-relational database for data entries that satisfy a formal rule text of the object-relational rule.
18 . The system of claim 17 , wherein the user interface is further adapted to convey to the user the data entries from the object-relational database found by the formal rule processing module to satisfy the premise of the formal rule text of the object-relational rule.
19 . The system of claim 17 , wherein the formal rule processing module is further adapted to execute the one or more object-relational methods in a consequence part of the object-relational rule based on the data entries from the object-relational database found by the formal rule processing module that satisfy the premise of the object-relational rule.
20 . The system of claim 16 , wherein the parameters of at least one of the one or more object-relational conditions comprise a constant or a variable that is declared to be a range variable, a bag variable, a set variable, a temporary variable, a temporary bag variable, or a temporary set variable.
21 . The system of claim 16 , wherein the object-relational data source elements comprise a previously created constant or variable.
22 . The system of claim 16 , wherein the parameters of at least one of the one or more object-relational conditions comprise a previously created constant or variable.
23 . The system of claim 16 , wherein the object-relational data source elements comprise an object-relational query created recursively.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.