Though I’ve never used it, Soulver looks like an interesting calculator for the Mac and iPhone. Essentially, it detects a limited set of English phrases to make calculations look like natural language. For example, “5 as a % of 50” returns 10. I want to do something similar, but I don’t want to write a lot of code. Prolog supports definite clause grammars (DCG), which is a convenient way to write limited parsers in Prolog. I stole someone’s tokenizer, borrowed someone’s chunk parser, and am now adding rules to generate ASTs from natural language math phrases. The only thing slowing me down is the complete lack of documentation for everything. I haven’t used Prolog in 20 years, but it’s slowly coming back to me.