September 19, 2007

Math recognition and search engine answers

The other day I talked about how search engines ought to support more extensive problem type answers. Why? Because they build audience and authority.

One such example is with math problems. Already, your favorite search engine probably is able to calculate the answer to simple math problems. Type "2+2" into one of the leading search engines and it'll probably realize you want to an answer to the problem rather than a literal search and the engine will most likely return "4."

What I'd like to see is this notion taken even further. Of course, entering complicated math problems textually, for instance, can get very painful. One alternative is to support handwritten input of equations as I'm showing here.

I've posted a simple demo app, written with Silverlight and a web service, that can take handwritten math equations, recognize them, format the problems sufficiently for Google, and then passes them off to Google to be solved. Here's a video of the app in action:

And a screenshot for reference:

MathRecoAndSilverlight.png

Of course, you might ask why doesn't the recognizer solve the problem too? Why involve Google or some other "answer engine." Well, it could. But the idea here is to emphasize here in the demo that I don't think it's just any old webservice that is needed--it's one of authority. One that you go to whenever you're looking for an answer--particularly answers that you are occasionally looking for.

I'd like to see the search engines become answer engines for a whole host of problems. Math being one problem type.

Anyway, you can try out the app at http://www.TabletPCPost.com/math.

A few things to note about this demo app. The equation recognizer is based on one that was written by someone else. I don't know the person's name, but I think the original code was called MathInk or something like that. I believe it dates back to the early days of the Tablet PC. (Update: It was called MathsInk.)

The recognizer does have some quirks and can get rather slow with large equations. It's also fairly limited in its grammar. It does support the square root symbol, sin, cos, tan, and log. You can also use a vertically oriented numerator and denominator.

A couple tips:

* If you're having trouble getting "sin" to be recognized, try not dotting the letter "i".
* Don't use parentheses around the values that immediately follow sin, cos, tan, and log. The recognizer will work with parentheses, but it often misrecognizes them. So write "log10" rather than "log(10)".
* The multiplication symbol is an "x" rather than an "*"

I've also noticed a couple performance bugs, but since this is one of those "I threw this together in under a day demos," so I'm afraid I haven't had a chance to clean them up. I hope you don't mind and that it doesn't cloud the idea I'm trying to get across too much.

(Since comments are disabled on this blog, you can post a comment on my other blog here.)

Posted by LCH at September 19, 2007 01:36 PM