CPC G06F 40/30 (2020.01) [G06F 8/42 (2013.01); G06F 40/205 (2020.01); G06F 40/253 (2020.01); G10L 15/1822 (2013.01); G10L 15/197 (2013.01)] | 20 Claims |
1. A computer-implemented method for transforming modified Extended Backus-Naur Form (MEBNF) phrase grammars, the computer-implemented method comprising:
obtaining, from a software developer, a MEBNF grammar whose rules contain at least one instance of an agglutination metasymbol distinct from standard EBNF metasymbols;
storing a plurality of agglutination rewrite rules, each agglutination rewrite rule when applied to a MEBNF expression producing a transformed MEBNF expression while preserving the language generated by the MEBNF grammar;
transforming the MEBNF grammar to an equivalent EBNF grammar by applying the agglutination rewrite rules iteratively to remove instances of the agglutination metasymbol, such that the equivalent EBNF grammar does not contain an instance of the agglutination metasymbol;
receiving a natural language query of a user;
parsing the natural language query using the equivalent EBNF grammar; and
performing an action on behalf of the user based on a result of the parsing.
|