Wednesday, December 12, 2012

From english natural language text to java code

It seems that the easiest way to convert/transform/translate an english natural language text to java code is as it is said, i.e. we do not need to use uml, xml, xmi or what ever.

We have to create a java program that parses the natural language text (using opennlp for example), extract subject-verb-object sentences and transform text into java code lines, for example :

Franck goes to the mosk every day five time.

Class Person {

 ///bla bla :)
}

void public main() {

Person Franck;
int day;
int time;

for day  in 1..7 {
for time in 1 .. 5 {
Franck.go(mosk);
}
}

}


of course, there are many errors, but it just to gives an idea of how we could create a Natural Langage Translator to Java.

No comments:

Post a Comment

Popular Posts