Slashdot Mirror


Free-Form Linguistic Input In Mathematica 8

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.'"

23 of 84 comments (clear)

  1. 1 up by Anonymous Coward · · Score: 5, Funny

    So can you can say things like "there exists a post for which the ordinal index is one?"

    1. Re:1 up by RevWaldo · · Score: 4, Funny

      Yes, and it can now handle classical written equations previously resistant to artificial intelligence.

      .

  2. Basically just Wolfram Alpha integration by IICV · · Score: 4, Interesting

    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!

    1. Re:Basically just Wolfram Alpha integration by Bill,+Shooter+of+Bul · · Score: 3, Funny

      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.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    2. Re:Basically just Wolfram Alpha integration by thegarbz · · Score: 2, Informative

      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 extension of Wolfram Alpha, much like the default action in Google Chrome to handle a non-url input in the address bar is to do a Google search.

  3. Post First by Hadlock · · Score: 4, Funny

    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.

    --
    moox. for a new generation.
  4. Freeform linguistics no good unless perfect by presidenteloco · · Score: 5, Interesting

    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.

    --

    Where are we going and why are we in a handbasket?
    1. Re:Freeform linguistics no good unless perfect by _merlin · · Score: 3, Interesting

      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.

    2. Re:Freeform linguistics no good unless perfect by MoonBuggy · · Score: 2, Interesting

      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 infinity" than it is to check the Mathematica documentation to remind myself if the syntax is Integrate[function, variable, {upper, lower}], or whatever (I have no idea if that's right or not, and that's kind of my point!).

    3. Re:Freeform linguistics no good unless perfect by MoonBuggy · · Score: 2, Informative

      That's actually exactly how it does work! If you look at the images in the article, you'll see that each has a line of natural language, followed by a line showing how it was parsed into Mathematica syntax, and then the output below that.

    4. Re:Freeform linguistics no good unless perfect by noidentity · · Score: 3, Insightful

      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).

    5. Re:Freeform linguistics no good unless perfect by gman003 · · Score: 2, Informative

      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.

    6. Re:Freeform linguistics no good unless perfect by Amorymeltzer · · Score: 3, Insightful

      That probably makes it much easier to teach. Learning mathematica was wonderful but you gotta buy the book or deal with the (truly excellent at times but always boring) help. If you can just say "Hey, do this" and be told what the proper command is, that goes a long way toward being able to learn the language. If there's a negative about most programming languages, it's that if you haven't had any formal training it can be a real pain to figure out the quirks.

      --
      I live in constant fear of the Coming of the Red Spiders.
    7. Re:Freeform linguistics no good unless perfect by khallow · · Score: 2, Funny

      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).

    8. Re:Freeform linguistics no good unless perfect by swillden · · Score: 4, Interesting

      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.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    9. Re:Freeform linguistics no good unless perfect by IICV · · Score: 3, Interesting

      There's a really good blog post here 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.

  5. The same as Alpha? Not impressed.... by spagthorpe · · Score: 3, Interesting

    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.

    --

    WWJD -- What Would Jimi Do?
    (Smash amp, burn guitar, take home the groupies)

  6. Actually this looks pretty good by pavon · · Score: 4, Insightful

    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.

  7. ability to turn it off by e**(i+pi)-1 · · Score: 4, Interesting

    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.

    1. Re:ability to turn it off by Tacvek · · Score: 2, Informative

      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 intended for use in an interactive session, so you will notice the errors. Indeed using it in scripts is a very bad idea, since Alpha will continue to be updated, and may interpret the same phrase differently at a later date.

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
  8. MATLAB, anyone? by Dogbertius · · Score: 2, Interesting

    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 Octave also mimics it decently enough.

    The equivalent of code completion or syntax interpretation/correction is nice, but I've never had any use for it W.R.T. standard or built-in library functions. Maybe for learning a random third-party library, at most. Even them, being a Vi user, it takes just as much time to look up a function prototype in FVWM + Vi as it does to wait on MS Visual Studio's code completion.

    This looks like a nice feature for new users, but I can see it being useful for new users or people for whom math is not a strong subject. Sadly, this seems to fill a void: people who can't do math, thinking they now can thanks to the "magic" of technology.The examples demonstrated in TFA are trivial (ie: grade 8 level). Can it, say, determine the conditional variance based on a series of PDFs?

  9. Re:The same as Alpha? Not impressed.... by FrootLoops · · Score: 2, Insightful

    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.

  10. This is so awesome! by Y-Crate · · Score: 2, Interesting

    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. :(