@Ian Bicking I was thinking of a solution for natural language programming a while ago. This is what I came up with:
Transform English to code
A simple parser will try to convert English sentences to code with the following steps: The verb of the sentece will be the function that’s going to be called. For the moment, if the sentence has no verb it’s an error. The other words are the parameters of the function. Articles, prepositions, and other words with no meaning will be ignored. TheÂ
parameters are converted to a Hash. The keys are the categories of the words, the values are objects with the words and more information. The hypernyms (
https://en.wikipedia.org/wiki/Hyponymy_and_hypernymy)Â of a word are the candidates for the category (this is IMO the most complex problem to solve for the project, might need some heuristics).
For example the sentence:
Draw a red circle
Would get transformed to the code:
draw(color: 'red', shape: 'circle')
I was thinking about it for a text based language, here is the POC I did
https://github.com/nlpl-lang/nlpl-editor