×

Automatic code generation via natural language processing

  • US 7,765,097 B1
  • Filed: 03/20/2006
  • Issued: 07/27/2010
  • Est. Priority Date: 03/20/2006
  • Status: Active Grant
First Claim
Patent Images

1. A method for automatic code generation comprising:

  • obtaining a parse tree, wherein the parse tree represents at least one instruction and wherein the instruction is in a natural language, and wherein the at least one instruction is free-form;

    identifying a functional word in the parse tree;

    identifying a regular expression matching the functional word, wherein the regular expression matches the functional word when the regular expression comprises at least one selected from a group consisting of a concept with a matching name as the functional word and a concept with a matching type as the functional word, and wherein the regular expression specifies a sentence subpart corresponding to the functional word;

    identifying the sentence subpart from the parse tree according to the regular expression and based on an identifier of the sentence subpart at a same distance from the root as an identifier of the functional word;

    creating, using a processor, a first instantiated concept for the sentence subpart by;

    obtaining a first concept based on the first concept mapping to a first word in the sentence subpart, wherein the first concept assigns a type to the first word, andcreating the first instantiated concept from the first concept;

    inserting the first instantiated concept in an instantiated concept map, wherein the instantiated concept map defines relationships between instantiated concepts in the instantiated concept map;

    identifying, using a processor, a second instantiated concept for the sentence subpart by;

    obtaining a second concept based on the second concept mapping to a second word in the sentence subpart, wherein the second concept is obtained based on the second concept comprising a parameter identifying the first concept, and wherein the second concept maps to a plurality of heterogeneous words, anddetermining that the second instantiated concept representing the second concept is already located in the instantiated concept map;

    inserting, in the second instantiated concept already located in the instantiated concept map, a link to the first instantiated concept based on the second concept comprising the parameter identifying the first concept, wherein inserting the link creates at least two paths between at least two instantiated concepts in the instantiated concept map;

    traversing the instantiated concept map,wherein traversing the instantiated concept map comprises for each instantiated concept in the instantiated concept map;

    obtaining a code output rule according to the instantiated concept; and

    outputting code to memory according to the code output rule.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×