Forgot your password?
typodupeerror
AI Math Programming Software Upgrades News

Free-Form Linguistic Input In Mathematica 8 84

Posted by Soulskill
from the differentiates-concepts-and-integrates-words dept.
vbraga writes "With the release of Mathematica 8, it now allows input through free-form English instead of the Mathematica syntax, just like the Wolfram|Alpha engine. The results are impressive. From the blog post: 'I routinely found myself using free-form linguistics as an integral part of longer computations — randomly interspersing Mathematica syntax and free-form linguistics on different lines in a Mathematica session, and just using whichever was most convenient for a particular input. And here's an exciting part: in Mathematica 8 the free-form linguistics doesn't just operate line-by-line. It knows the context in which it's used in a notebook, so you can use it to build things up.'"
This discussion has been archived. No new comments can be posted.

Free-Form Linguistic Input In Mathematica 8

Comments Filter:
  • 1 up (Score:5, Funny)

    by Anonymous Coward on Monday November 15, 2010 @10:41PM (#34238436)
    So can you can say things like "there exists a post for which the ordinal index is one?"
  • by IICV (652597) on Monday November 15, 2010 @10:43PM (#34238442)

    Judging from the article, this amounts to some fairly rich integration with Wolfram Alpha.

    Now why would it make sense to, in essence, turn Mathematica into a partially cloud-based application? Could it be because of all the millions of college students around the world who have pirate copies? Surely not!

    • by MoonBuggy (611105)

      I don't know, I'd imagine that an awful lot of universities have site licenses for Mathematica. As I said below, I think it's a genuinely useful feature, and thus a selling point - it may not be strictly necessary, but it basically serves as fuzzy matching for syntax that I can't quite remember, which makes my use of the program that much easier and more efficient. If I need to do something particularly complex and/or precise, I can still fall back to the documentation for the rigidly ordered standard synta

      • ...but for general day to day use it'll ... stop me putting such a load on the Wolfram Alpha servers when I have the odd bit of calculus to double check.

        Now, interestingly enough that's the one thing it won't do - if you start with an = sign (indicating the natural language input) then your query is actually sent over the Internet to a Wolfram|Alpha server where it's interpreted and turned into Mathematica language and sent back to Mathematica for you...

    • Perhaps, but compared with Mathematica 3 or 4, 6 and 7 had some pretty nifty stuff that required an internet connection. Graphing data, etc. is, of course, where the money is, but there's a lot you can do with Mathematica that goes beyond making confusing diagrams. The best example I can think of was astronomy. With a wealth of data about the planets, we actually did some hefty gravity modeling. Or analyze the stock market, whatever suits your fancy, but you nicked it from the web. I'm sure you know al

    • by Bill, Shooter of Bul (629286) on Tuesday November 16, 2010 @12:57AM (#34239098) Journal
      That's absurd!! what kind of a low life would steal money out of the mouths of Wolfram developers! I know those guys, they already have to live in Illinois, what more punishment would you inflict upon them you callous brutes!

      Thats why *I* pirated Maple.
    • Re: (Score:3, Informative)

      by thegarbz (1787294)
      I highly doubt going after students who have the choice between two free alternatives is the answer. For the vast majority of us engineering students the options are a) piracy, or b) use it at the university which already licences this kind of software per student. This is non-essential software for most people, and where it is essential it is often provided.

      More likely it makes sense because it ... simply makes sense. Having the data right there at your fingertips inside Mathematica is a logical extens
    • To the cloud, to the cloud. Man the lawyers.

      Wolfram alpha has just updated its TOS: By using this software, you agree you owe Wolfram $200 for each year of usage, and that he owns any findings in Maths that you may come by by using this software.

  • Post First (Score:5, Funny)

    by Hadlock (143607) on Monday November 15, 2010 @10:45PM (#34238448) Homepage Journal

    How is this going to help me find Natalie Portman get all these hot grits out of my pants? Natural language is all good, and this is a huge step forward, but in 2010, I won't be truly impressed with a tech demo until it can grasp antiquated slashdot memes from almost a decade ago. I know you guys at Wolfram are reading this, so I fully expect something unexpected when I calculate the number of surface area of football fields it takes to hold the library of congress printed out on 8.5x11" paper with 1" margins. Natural language is one thing for mathematicians, it's another for the average 4chan user. Now that's bleeding edge.

  • by presidenteloco (659168) on Monday November 15, 2010 @10:46PM (#34238450)

    There is an inherent problem with free-form linguistic input to computer systems.
    If it doesn't have near-perfect comprehension of a wide range of topics, it's
    frustrating as hell. It's like talking to a person that is mostly there, but has
    brain lesions that wiped out part of their memory or frontal lobe, making them
    oblivious to some common concepts and ways of speaking.

    It's directly analogous to the "uncanny gulf" between a near-perfect computer-graphics person
    and a real person. It freaks the hell out of people.

    I'm not saying that natural language interfaces are always going to be a bad idea, but
    the system underneath needs true comprehension of the world and the motives of speakers,
    and of many ways of expressing the same thing. The bar is very, very high.

    • by _merlin (160982) on Monday November 15, 2010 @10:56PM (#34238508) Homepage Journal

      Yeah, like AppleScript, the perfect read-only language. Anyone can read it because it just looks like English with a limited vocabulary. But trying to write it, and work out exactly what the tokeniser will accept, can be incredibly frustrating.

      • I think AppleScript is a great way to get an unexperienced someone some experience. It's easy enough to sit in front of your mac, open and screw around with a random script from your computer, and actually get some meaningful results, while introducing you to basic concepts that would make learning something else much easier. A gateway language, if you will. Automator defeats the purpose in my mind - it's easier and is kind of like AppleScript for dummies, but takes out a lot of the growthful learning re

    • Re: (Score:3, Interesting)

      by MoonBuggy (611105)

      I disagree, in this case at least. I was actually thinking about this a week or so ago - I noticed that I more often than not use Wolfram Alpha even though I've got a (site licensed) copy of Mathematica on my machine.

      What it comes down to is that while Alpha might not be 'natural language input', it does use something probably best described as 'fuzzy syntax'. If I'm not doing industrial strength quantities of calculation, it's quicker to use Alpha, where I know I can just type "integrate foo from bar to in

    • by pavon (30274) on Monday November 15, 2010 @11:24PM (#34238676)

      When you are programming think about how often you use code completion because you can't remember parameter order, and how often you google stuff because you can't remember the exact class/function name. This lets you "google" without leaving the page, and cuts down on the amount of typing necessary. The fact that they allow you to refine the interpretation is what really makes this the difference between a frustrating and smooth experience.

    • by Radtoo (1646729)
      I don't think there's a terrible problem with Wolfram Alpha in this regard. It's pretty good at guessing what you meant.

      And more importantly, even if it gets your query wrong, you can write the precise one based on the (usually at least partially correct) query it generated from natural language. This is very often more efficient than doing help/google queries for appropriate commands and their syntax...
      • Re: (Score:3, Informative)

        by gman003 (1693318)
        Except it's inconsistent about things. Type in "tensile strength of steel", it gives you a table of mechanical properties for steel. Type in "tensile strength of aluminum", and it ignores the "tensile strength" and just gives you chemical info on Aluminum. Tried a few variations in syntax, and tried spelling it the British way, no luck. It's a useful tool, but the parser seems inconsistent, probably the worst thing a program can be.
        • by Tacvek (948259)

          That is very true. The worst part of Wolfram|Alpha is that sometimes you know it has the data you want, but you cannot get it to spit out what you want. The fact that it was explicitly designed to not have a an optional strict syntax drives me crazy.

          In Mathematica you can try the freeform syntax, and if it fails, fall back on the strict syntax. Hopefully the Wolfram|Alpha API it uses also permits a strict form of accessing the data-sets Alpha uses, so you can query them strictly too if desired. (Some of Alp

        • by IICV (652597) on Tuesday November 16, 2010 @12:43AM (#34239038)

          There's a really good blog post here [blogspot.com] about why Wolfram Alpha is really hard to use. Fundamentally, the Alpha control interface tries to be intelligent; when it works, it's nice, but when it doesn't its output is not consistent. Unfortunately, because of this, you can't form a mapping between input -> output - in your example, for instance, you thought that "tensile strength of [whatever]" would give consistent results, so you formed a mapping in your head ("tensile strength of [whatever] results in the tensile strength of a material"). Then it turns out that this control mapping doesn't actually exist, which is incredibly frustrating.

          Google, on the other hand, doesn't do any of that shit. You just get something that's kinda sorta like what you wanted. You don't expect anything beyond a certain probabilistic accuracy, so you don't form any control mappings beyond a general "if I search for [whatever] I'll get results related to [whatever]". When they do provide a control, it's very well defined; for instance searching for "site:[some site] [whatever]", which always work the way you expect it to.

          Fundamentally, Google lets you build a model in your head of how their tool works, even if there's a gray unknown area where the results are; as an example, when you throw a ball, you have a mental model of how Newtonian physics works, so you have a general idea of where the ball is going to end up.

          Alpha makes you think you're building a model, and then the model breaks somehow - like if when you threw a ball, it occasionally turned into a dove and crapped on you.

          People don't like it when you break their models or crap on them.

        • by vlm (69642)

          Type in "tensile strength of steel", it gives you a table of mechanical properties for steel. Type in "tensile strength of aluminum", and it ignores the "tensile strength" and just gives you chemical info on Aluminum. Tried a few variations in syntax, and tried spelling it the British way, no luck. It's a useful tool, but the parser seems inconsistent, probably the worst thing a program can be.

          Because its a bad question.

          If you've got the cash, exotic alloys are available with exotic properties, but for the design purposes of someone whom doesn't know any better, HSLA steel is probably what they're talking about, without even knowing it. HSLA structural steels all specify a minimum of 50 ksi and most don't go a whole heck of a lot higher since they're made to be as cheap as possible while meeting the spec. So asking "the tensile strength of steel" a sloppy but mostly correct answer would be abou

          • by gman003 (1693318)
            But you're missing the point. It's not being consistent about it. I fully understand that there's thousands of alloys for both steel and aluminum, but the problem is that if WolframAlpha can parse one of them, it should be able to parse the other.

            Ideally, it would ask "what alloy are you asking about", but just giving an "average" result while having a little "this information is for alloy 113811742, click for more options" box in the corner, would be fine.
            • by Guignol (159087)
              I'm not you' parent poster, but I respectfuly (because I really see your point but I think it's wrong) disagree
              I think what is being "inconsistent" here is the data itself on which the "consistent" program relies to give the meaningful answer.
              That being said , I completely understand that the end perception is the one you describe.
            • As it turns out, asking for the tensile strength of aluminum alloy does work. I guess "aluminum" is just too vague. It even gives the option to take it as a class of materials, allowing you to skirt around the problem of multiple alloys in order to make general calculations. It only provides the data in pascals unless you tell it otherwise, but it's trivial to convert from pascals to ksi. This link shows what I mean. [wolframalpha.com] I had to click once or twice, but it didn't exactly put me out of my way.
      • by Carnildo (712617)

        It's pretty good, except when it isn't.

        I recently wanted to know when the sun would set in Yellowstone on a certain date. It took me four tries to figure out how to get sunset for a day other than today (hint: "sun set" always refers to today, "sunset" can refer to any day), and three tries to figure out how to get a location other than what my IP address geolocates to. It then took another five tries to find a location near Yellowstone that was in WolframAlpha's database (there are some remarkable incons

    • by noidentity (188756) on Monday November 15, 2010 @11:50PM (#34238824)
      Put another way, a natural language system has to do better than I can do with a dumb system. The dumb system is predictable, so I can use my intelligence in best formulating my commands to it. A natural language system is not nearly as predictable, so I either have to learn its much more complex behavior, or just give up and hope it does what I want, but have little recourse if it doesn't. I know which type of system I'd want (and Google's unhelpful "hey, I think you were really searching for this, so I changed your query" is a perfect example of why I hate clever systems).
    • Re: (Score:3, Funny)

      by khallow (566160)

      It's directly analogous to the "uncanny gulf" between a near-perfect computer-graphics person and a real person. It freaks the hell out of people.

      I can sympathize. I've seen the same reaction when people are exposed to a mathematics person (near-perfect or not doesn't really seem to matter).

    • by swillden (191260) <shawn-ds@willden.org> on Tuesday November 16, 2010 @12:41AM (#34239020) Homepage Journal

      Did you read the article?

      I think that they've hit on an excellent way of making imperfect freeform linguistics very useful. Basically, it's provided as an alternative to a more precise input language, one that works a lot of the time and when it does requires less effort by the user. When the computer can work out what you mean, it does. But it also always translates what it thought you meant into the precise, formal language and displays that so that you can tell whether it got it right. Further, if there are a few competing interpretations of the vague, freeform input, the tool makes it easy for you to pick the one that you meant.

      As long as it gets what you mean right enough of the time, while allowing you to be vague enough that using the freeform input really is saving you mental effort, I can see tremendous value in this approach. And over time it will continue to get better.

      I have no doubt that you'll quickly learn that there are some kinds of things which are just better-expressed in formal notation. Heck, we sometimes find that to be the case even when we're communicating with other humans. But there are also a LOT of cases where informal language works just as well and is a lot easier. I'm sure that set will be smaller when working with Mathematica than another person -- but it looks to me based on the article like the set is large enough to be useful.

      In particular, I can definitely see using this as an easier route to a lot of the more obscure commands and options, such as the options to tweak graphs in various ways. And if it turns out that using the natural language didn't work, well, your next step was going to be to dig through the manual to figure out the formal notation anyway, so it didn't cost you much time.

      I can see this freeform linguistics approach being quite valuable, even though it's quite imperfect.

    • Its not difficult at all with modern megacorps.
      Based on current average programmer production, and the size of Apples new facility, I am sure it would only take few hundred dedicated programmers 8.3 years to build the comprehensive Eliza you speak of.

    • I don't think a perfect comprehension is what one is looking for here.

      I see it as being extremely useful in scripting, and it will work wonders for me if the program can only remember the last line I wrote:

      p = plot(something)
      p.add_title(title)
      p.add_legend(x,y,z)
      p.remove_grid()
      p.add_grid()
      p.make_grid_minor()
      p.make_x_axis(0,100)
      p.make_x_axis(0,500)
      p.make_y_axis_log()
      ...
      to:

      plot(something)
      make the title 'title'
      make the legend x,y,z
      remove the grid
      undo
      make th

    • by martas (1439879)
      Surely you mean the "uncanny valley?" /pedant
  • by spagthorpe (111133) on Monday November 15, 2010 @11:13PM (#34238614)

    I've actually found myself always needing to look up the exact syntax for Alpha, sometimes for even what I would think common tasks are, "solve for", "graph f and g", etc, because Alpha rarely seems to accept my "freeform" input.

    This headline and "article" is another effing Slashdot sponsored advertisement.

    • Re: (Score:2, Insightful)

      by FrootLoops (1817694)

      This headline and "article" is another effing Slashdot sponsored advertisement.

      I find it more interesting than the other current headlines. Slashvertisement and news aren't necessarily distinct, depending on the crowd.

    • by thegarbz (1787294)

      I've actually found myself always needing to look up the exact syntax for Alpha,

      If you think that then you're just going to break down in a teary mess if you ever try to do something with Mathematica. Maybe this is news because it's actually news. "Science company with hard to use program which is the bane of every college student's existence responds by attempting to understand what students want." Given how complicated the syntax in many of these programs are it is actually genuinely refreshing to see a company make an effort even if it doesn't meet your stringent requirements. I lik

  • by e**(i pi)-1 (462311) on Monday November 15, 2010 @11:57PM (#34238866) Homepage Journal
    I could not yet try Mathematica 8 out, but I hope one will be able to turn the feature on and off. A switch like in "perl -w" should be built in. Mathematica is first of all also a programming language, especially for Mathematics and colloquial language is not precise. It could be be frustrating if wrong syntax still produces reasonable results. Incorrect, but working code might become the standard if one does not notice. Its like with memory allocation errors in C produced by incorrect code which still compiles. It will haunt the programmer in the long term.
    • Re: (Score:3, Informative)

      by Tacvek (948259)

      To use freeform syntax, you prepend your command with an equals sign. So even if you cannot turn it off, you can very easily just ignore it as a feature. The idea is to use it where convenient, like tell it to graph a function, and let it take a guess at an appropriate range to graph it over. If you don't like the results, you can edit the displayed Mathematica syntax command it displays, and you still saved yourself a bit of work.

      It emphatically is not intended for being used in scripts, but is only intend

    • by swillden (191260)

      I could not yet try Mathematica 8 out, but I hope one will be able to turn the feature on and off.

      It's only used when you explicitly invoke it by beginning your input with "=" or "==".

    • Mod parent up.

      The problem with making software try to guess what you are thinking is that even humans are bad at guessing what you are thinking. That's why mathematics itself has a formal language and notation, so that unambiguous communication of ideas can take place. My worry is that this sort of "feature" will fool people into thinking they've accomplished something when all they have is gibberish that runs and makes pretty pictures.

      I remember in college I took a philosophy course, and one of the r
    • I could not yet try Mathematica 8 out, but I hope one will be able to turn the feature on and off. A switch like in "perl -w" should be built in. Mathematica is first of all also a programming language, especially for Mathematics and colloquial language is not precise. It could be be frustrating if wrong syntax still produces reasonable results. Incorrect, but working code might become the standard if one does not notice. Its like with memory allocation errors in C produced by incorrect code which still compiles. It will haunt the programmer in the long term.

      I'm not in the field, so I've never seen anyone use Mathematica. But math is a continuum from colloquial to formal. Any tool that allows folks to play around with math in an informal, yet computationally sound way is a good thing. There is nothing wrong with VB and C coexisting -- it is a good thing to have different tools and abstractions available to the laymen and the experts.

      • I'm not in the field, so I've never seen anyone use Mathematica. But math is a continuum from colloquial to formal. Any tool that allows folks to play around with math in an informal, yet computationally sound way is a good thing. There is nothing wrong with VB and C coexisting -- it is a good thing to have different tools and abstractions available to the laymen and the experts.

        I don't think that analogy quite holds up. The free-form language allowed is effectively a shorthand for programming language-style use of Mathematica. I think a more accurate analogy is VB.NET to C#.NET. The VB syntax is friendlier (eg. "MustInherit" for "abstract") but the differences are only skin deep since they compile to the same thing anyway.

        "Colloquial" math to me means "non-rigorous", like high school calculus, which is not at all a direct translation away from formal math. The free-form syntax, o

  • This is awesome. I have (Well the Uni does) Mathematica installed, but I cant remember the last time I used it instead of Alpha. For heavy lifting I usually use MATLAB anyway.
  • MATLAB, anyone? (Score:2, Interesting)

    by Dogbertius (1333565)
    You could always learn the language, and excel at it. I've tried Maple, MATLAB, and Mathematica.

    Maple was used primarily by undergrads to compute simple indefinite integrals and derivatives, and display them all "pretty" (insert MATLAB pun here) in a Tex-like format. Mathematica was almost on-par with MATLAB. Meanwhile, MATLAB seems to be the only math package used in all the physics and engineering labs I've visited, runs several orders of magnitude faster, and is excellent for algorithm testing. GNU
    • I always think of Matlab as numeric and Mathematica as symbolic. Sure Mathematica can do some numeric things, but that never seemed to be its real purpose.
    • by T Murphy (1054674)

      You could always learn the language

      If you don't know the syntax, you have to go look it up in the documentation. The trouble with the documentation is that it is often hard to find exactly what you are looking for, or the examples might not be clear enough. So to improve the documentation search, it would help if you could type what you want in plain english, and it tells you the syntax for you on the spot. Which, of course, is what this feature does, plus it doesn't require you open up the documentation and it even executes the command for

    • I don't think that elegant syntax and reasonably straightforward function names are incompatible with a high-level computational language. Mathematica's syntax really is very nice and your first guess at a function name tends to be correct which can save some time. I don't think that the syntax of Mathematica generally gets in the way of writing scripts.

      It's too bad that it falls behind MATLAB for numeric data and behind Maple for symbolic mathematics but in some cases cases (many cases) it's still handy to

      • It's too bad that it falls behind MATLAB for numeric data and behind Maple for symbolic mathematics but in some cases cases (many cases) it's still handy to have a single piece of software that does a decent job at both symbolic and numeric computations.

        I think you may be relying on dated experience with Mathematica. Mathematica has been pretty comparable to MATLAB in terms of speed since version 6. Look up scientificweb's ncrunch comparison.

  • Mathematica syntax is actually quite easy once you get used to it. This is enhanced enormously by the excellent help/reference/tutorial database. Can't remember the syntax for a certain command? Curious about options? Need a similar command but can't remember/don't know it? Highlight your command and hit F1. Takes all of about 2 seconds, and you have all the requisite knowledge to construct some pretty sophisticated functions. I'm a physics student, and I've used Mathematica extensively for both quick and d
    • Mathematica syntax is actually quite easy once you get used to it.

      Since "getting used to [something]" is pretty much defined as reaching the point where [something] becomes quite easy for you, that's basically tautologically true and, for the same reason, essentially devoid of substantive meaning.

  • Very good for beginners, potentially useful for more experienced users, but something that's not really critical for serious development. Honestly though, I'd see this as useful for something like formatting TeX input. For something numerical though where innocent errors can turn out pretty serious, this could cause a lot of headaches. Use with caution....

  • This is so awesome! (Score:3, Interesting)

    by Y-Crate (540566) on Tuesday November 16, 2010 @03:03AM (#34239528)

    It makes me really wish that I knew enough math for the program to have any use.

    I once tried to apologize to the developers for pirating Mathematica. The just laughed at me and said that was impossible. :(

  • While not completely free-form, writing interactive fiction in Inform 7 [inform7.com] is done mostly in natural (if somewhat simplified) English. So it's not like these things are new.

Real Users find the one combination of bizarre input values that shuts down the system for days.

Working...