Patent ID: 11934403
Assignee: SALESFORCE, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A computer-implemented method comprising:
generating, by a training data generator, an abstract query representation from a probabilistic context-free grammar (PCFG), the PCFG having a set of rules to which probabilities are assigned, wherein generating the abstract query representation includes performing a top-down expansion of a semantic structure of the PCFG by traversing the PCFG and sampling non-terminals based on the assigned probabilities, wherein generating an abstract query representation includes applying a beam search process;
selecting, by the training data generator, a sample record from a database using the abstract query representation;
generating, by the training data generator, a tagged user query from the abstract query representation and the sample record by replacing tokens of the abstract query representation with one or more values from the sample record;
generating, by the training data generator, one or more structured query language (SQL) statements from the tagged user query and one or more SQL templates;
generating, by the training data generator, the tagged user query by replacing tokens of the abstract query representation with one or more values from the sample record;
incorporating, by the training data generator, variants into the tagged user query, the variants including misspellings; and
performing, by the training data generator, a lookup operation for every token of the abstract query representation against the sample record to find one or more values for each token and assembling the one or more values as the tagged user query.