CPC G06F 16/2433 (2019.01) | 18 Claims |
1. A method for automatically generating question and query pairs from a knowledge base and training an artificial intelligence module to translate queries into questions using the question and query pairs comprising the steps of:
electronically accessing a knowledge base, the knowledge base containing one or more entities and one or more predicates;
extracting, via processing module stored in a memory and executed by a processor, one or more entities and one or more predicates from the knowledge base;
generating, via a baseline template generator module, a baseline question template from a context free grammar rule;
inputting the one or more entities and the one or more predicates into the baseline question template to determine a numbering of the one or more predicates;
generating a numbered question template based on the numbering;
generating a typed question template by traversing the numbered question template through a predicate type-graph;
generating a SPARQL query by inputting the one or more entities and the one or more predicates into a SPARQL query template;
generating a question by inputting the one or more entities and the one or more predicates into the typed question template;
constructing a question and query pairs by combining the question and the SPARQL query;
storing the question and query pairs in the memory;
accessing the stored question and query pairs with the artificial intelligence module; and
training the artificial intelligence module to translate queries into questions using the question and query pairs.
|