How is Wolfram Language different than regular Mathematica?

Is anyone else working on natural-language programming?

  • The latest version of Mathematica allows a certain amount of "programming" by just typing in English. It then guesses on the formal definition and does its calculations.http://blog.wolfram.com/2010/11/16/programming-with-natural-language-is-actually-going-to-work/ Is anyone else working on this in other areas? For example, to allow a beginner to code in any language by writing "create array", "loop through it", etc..?

  • Answer:

    I'd direct you to my post . Inform 7 uses semantic parsing and while it is a domain-specific language, the technology is still kind of amazing. The design papers are a good read: http://inform7.com/learn/papers/ This, for example, is valid source code: Charlie Cheever is a man in the Quora Office. "One of the founders of Quora is standing here. He has lifetime-channel good looks." Understand "founder", "Charlie", and "man" as Charlie Cheever. Charlie Cheever is carrying an iPhone. The description is "Charlie's iPhone. He seems to have some kind of psychic link with it." Instead of speaking to Charlie Cheever for the first time, say "You are distracted by his good looks and forget what you were going to say."

Anne K. Halsall at Quora Visit the source

Was this solution helpful to you?

Other answers

The problem with natural-language programming isn't anything mechanical, it's that people naturally speak and think in very unclear, muddled ways.  The effort required to structure your ideas into an algorithm is orders of magnitude greater than that to convert this algorithm into any popular programming language, so there's really very little to be gained here.  A successful natural-language programming environment would need not only to understand what you were telling it, but to be able guess what you really meant. Naturally this might become aggravating if you really do know what you mean but the computer disagrees.  In fact, there was famously a system called DWIM ("do what I mean") on some old computer system that was supposed to do this.  You can imagine how people liked that -- one of the most amusing stories was when it interpreted something like, "delete all the files like this" as "delete everything on the computer."

Daniel McLaury

Thirty years ago, as a pre-teen, I attended my first computer conference. Somebody there was advertising a "plain english" programming language. Businesspeople didn't need programmers anymore; they could just write what the wanted! Every couple of years somebody comes up with the same thing and fails the same way. Why? It's like thinking that you can make it easier to play the piano by making one with just 8 large keys. The hard part of programming isn't learning the basic syntax. The only place toy, pseudo-english languages are useful is where novices want to do a tiny amount of computer-ish stuff.

William Pietri

The problem with coding using natural languages is that a command that to the programmer might appear clear and comprehensible, can be ambiguous or incomplete to the parser/interpreter. For example, let's suppose we want to create a simple Contact Form using natural language programming: Create a form containing the fields Name, Address, Phone Number, Message and a checkbox that when checked means that the customer wishes to be contacted via phone. When the user submits the form, make sure that all fields are complete, store all form information in the company database and send me an e-mail. If the user wants to be contacted via phone, send me an SMS including the phone number. First of all, training a parser to understand the above text and all alternatives for all possible types of programs will take a considerable amount of time and even if we manage to do it, we'll still have to ask the user questions such as: How are the form fields mapped to the database? What are the field types? What does "company database" mean? Which table? Using what login credentials? What happens if the fields are incomplete? Do we return an error? How? etc, etc. And this is only a very small code snippet, imagine the difficulty of understanding an entire business application written in a natural language. A second approach will be removing the complexity of natural languages by creating a controlled language. There is an open-source project called iLastic (http://www.ilastic.com) working a controlled english for enterprise data integration, here is a sample code to import an Excel file into an SQL table: create an importer with a type equal to "excel". send the file with a name, that is equal to "customers.xls", under the folder to the excel importer. move the results to the sandbox. create a record with a name equal to the 1st cell under the current item and a telephone equal to the 2nd cell under the current item and move the record to customers under the mysql server for each row under the sheet under the workbook. As you can see there are no ambiguities here, but I doubt that a non-programmer will be able to use such tool since it requires to have some knowledge of computer programming, even though you are writing the instructions in English. Another approach is the one used by the JBoss Drools (http://www.jboss.org/drools) Domain Specific Language that lets you map sentences to actions within a business rule, for example: rule addressNormalizationUSA when There is legacy Address-1 - country is one of "US", "U.S.", "USA", "U.S.A" then for legacy Address-1 set country to USA end But it is also not very effective as they are static sentences which need to be written exactly as defined in the DSL. To sum up, is not mature enough to understand and interpret an arbitrary text written in a natural language. However, if you are willing to sacrifice some flexibility, you can obtain some interesting results by using either controlled languages or DSLs as a programming language.

Mauro DeGennaro

AppleScript attempts to be a "natural language" programming language.  An example script might be:     tell application "iTunes" to play track 1 of playlist "My Favorite Music" It looks clean in short examples, but anything more complex can get pretty stilted.

Steven Frank

For the goal of making a general-intelligence operating-system fully integrated like us humans, where we use one language to do all things. I'm working on a human speakable programming language, that is based on human grammar structures such as sentences and grammatical case with mostly English vocabulary.  In terms of programming language, currently implementing assembly level instruction set, to allow all kinds of programming.  Since it is also designed to be human speakable, implying all human languages, not just English, it currently uses a synthesis of the most popular grammatical structures (post-positional subject-object-verb), and some which are essential for use in a programming language i.e. speakable quotations. Likely by the end of the year will have it capable of translating to and from ordinary English. And within a few years afterward will support the most popular world languages. It is open source, so you can try it out now, though likely will only be able to do real work using it in  2014 and beyond. http://rpoku.sourceforge.net  project is called Rpoku due to a quirk of history, though the current implementation is called sysh for speak-listen i.e. language.

Logan Streondj

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.