Patent ID: 7080004

Claim:
A method of building a learned context free grammar (CFG) for an application, comprising: generating a semantic schema for the application, the semantic schema having associated semantic constraints; generating a template grammar based on the semantic schema such that the template grammar inherits the semantic constraints associated with the semantic schema; and building the learned CFG by parsing training expressions using the template grammar, by: obtaining a training expression; parsing the training expression to produce a parse result; displaying an abstraction of the parse result; and receiving a correction input indicative of a direct user correction to the parse result, wherein the correction input annotates at least one anchor point that is a known correct alignment between the training expression and a preterminal in the template grammar, and wherein receiving the correction input comprises: receiving a selection input selecting an incorrectly aligned portion of the training expression in the parse result; receiving a movement input indicative of a user dragging the incorrectly aligned portion to a correct object in the abstraction of the parse result; and receiving a placement input indicative of a user dropping the incorrectly aligned portion on the correct object in the abstraction of the parse result.