Patent ID: 11971886
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 15:
16. A system comprising:
a memory configured to store program instructions; and
a processor operatively coupled to the memory to execute the program instructions to:
obtain a first natural language query for retrieving data from one or more databases;

generate a semantic signature for the first natural language query by matching text of the first natural language query to a set of entities based on a vocabulary corresponding to one or more schema elements of the one or more databases and one or more values stored in the one or more databases;
generate a database query signature for a first database query corresponding to the first natural language query;
maintain a set of mappings, wherein each mapping in the set is between a given one of a plurality of other semantic signatures and a corresponding database query signature representing a class of database queries corresponding to the given semantic signature;
determine whether the semantic signature generated for the first natural language query matches one of the plurality of other semantic signatures, wherein the determining comprises comparing the set of the semantic signature generated for the first natural language query to sets of entities of the plurality of other semantic signatures;
in response to determining that the generated semantic signature does not match one of the plurality of other semantic signatures, add a mapping between the generated semantic signature and the generated database query signature to the set of mappings;
obtain a second natural language query; and
automatically generate a database query for the second natural language query based at least in part on the added mapping.