6

I found this article about converting english sentences to Scheme, but can't seem to find any efforts to do the inverse (i.e. Scheme to english sentences): ftp://ftp.cs.utexas.edu/.snapshot/hourly.2/pub/AI-Lab/tech-reports/UT-AI-TR-87-48.pdf Plus, I don't think the article mentioned how to obtain even the code referred to.

Does anyone know of such a project, or am I going to have to try to roll my own?

I'd also be interested in such a translator for Java/Groovy and/or Ruby.

Basically, I would like to use a program that, given a string of code, outputs the algorithm in english sentences.

Edit: Actually, the article mentioned above does have its corresponding code at the bottom of it.

  • I have never heard of anything like this. – le3th4x0rbot Feb 12 '13 at 19:21
  • 3
    i think you could do this with certain symbols (such as saying equals instead of =) but to make it grammatically accurate i think would be nearly impossible – Jeff Hawthorne Feb 12 '13 at 19:23
  • I would want it mostly for small segments of code. – Andrew Ulrich Feb 12 '13 at 19:31
  • 1
    I wonder how you would describe something like nested for loops in English, without making a run-on sentence. – le3th4x0rbot Feb 12 '13 at 19:43
  • I would imagine run-on sentences would be a necessary evil. I would think that it should output something more akin to spoken english than the stricter confines of written english. – Andrew Ulrich Feb 12 '13 at 19:54
  • 3
    if you're real good, the code will read like english without a converter – AJcodez Feb 12 '13 at 20:09
  • 1
    You might be interested in literate programming . – BeniBela Feb 12 '13 at 21:34
  • The ambiguity in spoken language is going to be the main obstacle to overcome, and it's the main reason programming languages look the way they do. It's a simpler problem to go from a highly regular, computer readable language to an irregular one, rather than go the other way. – robbyphillips Feb 13 '13 at 19:46
  • There are a few English-like programming languages that are listed here: http://stackoverflow.com/questions/3067377/what-programming-language-is-the-most-english-like – Anderson Green Dec 17 '13 at 19:58

1 Answers1

3

You want a pseudocode converter. There are several pseudocode converters out there which will converter either pseudocode into programming language code or vice versa. Understand that these converters are far from perfect. But they should at least get you to a decent starting point.

mightyrick
  • 910
  • 4
  • 6
  • Recently, I wrote a pseudocode converter in Python called [EngScript](https://github.com/jarble/EngScript/blob/master/main.py). It automatically translates some kinds of English sentences into the Python programming language. – Anderson Green Feb 03 '14 at 00:05