Updated: I see blogs doing evaluations of the Q&A engine. I have to admit, that wasn’t my focus here. The service is merely 50 lines of code … just to demonstrate the integration of BMF and GAE.
Updated: Direct link to the example Question-Answering Service
Today I finally plugged-in the Yahoo Boss Mashup Framework into the Google App Engine environment. Google App Engine (GAE) provides a pretty sweet yet simple platform for executing Python applications on Google’s infrastructure. The Boss Mashup Framework (BMF) provides Python API’s for accessing Yahoo’s Search API’s as well remixing data a la SQL constructs. Running BMF on top of GAE is a seemingly natural progression, and quite arguably the easiest way to deploy Boss – so I spent today porting BMF to the GAE platform.
Here’s the full BMF-GAE integrated project source download.
There’s a README file included. Just unzip, put your appid’s in the config files, and you’re done. No setup or dependencies (easier than installing BMF standalone!). It’s a complete GAE project directory which includes a directory called yos which holds all the ported BMF code. Also made a number of improvements to the BMF code (SQL ‘where’ support, stopwords, yql.db refactoring, util & templates in yos namespace, yos.crawl.rest refactored & optimized, etc.).
The next natural thing to do is to develop a test application on top of this united framework. In the original BMF package, there’s an examples directory. In particular, ex6.py was able to answer some ‘when’ style questions. I simply wrapped that code as a function and referenced it as a GAE handler in main.py.
Here’s the ‘when’ q&a source code as a webpage (less than 25 lines).
The algorithm is quite easy – use the question as the search query and fetch 50 results via the Boss API. Count the dates that occur in the results’ abstracts, and simply return the most popular one.
For fun, following a similar pattern to the ‘when’ code, I developed another handler to answer ‘who’ or ‘what’ or ‘where’ style questions (finding the most popular capitalized phrase).
Here’s the complete example (just ~50 lines of code – bundled in project download):
Keep in mind that this is just a quick proof of concept to hopefully showcase the power of BMF and the idea of Open Web Search.
If you’re interested in learning more about this Q&A system (or how to improve it), check out AskMSR – the original inspiration behind this example.
Also, shoutout to Sam for his very popular Yuil example, which is powered by BMF + GAE. The project download linked above is aimed to make it hopefully easier for people to build these types of web services.
Tags: App Engine, BMF, Boss, GAE, Google, Mashup, Python, Search, Yahoo
August 4, 2008 at 8:11 am |
I cant help but comment on this.
who invented the internet ? returns
al gore
August 4, 2008 at 8:26 am |
haha.
al gore seems to be behind a lot of things …
who invented global warming ? returns
al gore
August 4, 2008 at 9:36 am |
[...] View post:Yahoo Boss Google App Engine Integrated [...]
August 4, 2008 at 3:03 pm |
[...] explains in his blog that he was able to create this demo with just 50 lines of code. This is not the first time a Yahoo [...]
August 4, 2008 at 4:56 pm |
hahaha
cool }:)
August 4, 2008 at 6:26 pm |
[...] Singhがブログに書いた説明によると、このデモはコードたった50行で実現したものらしい。GoogleのApp Engineで動作するYahoo BOSS対応アプリはこれが初めてというわけではない(CuilのコピーのYuilもあるし、今は4hoursearchも両サービスのマッシュアップ)が、これなんか見るとYahooが自らのオープンサーチ戦略にどれだけ本腰で取り組んでいるかがよく分かる。 [...]
August 4, 2008 at 7:01 pm |
who is president?
August 4, 2008 at 8:12 pm |
Why is this better than just using the google search api to do queries on instead of BOSS (sorry not that technical, trying to understand).
August 4, 2008 at 11:19 pm |
it’s a good question
basically 5 things
(1) unlimited queries
(2) no restrictions on the use of the results (blend, re-rank, remove, put it on a map)
(3) control attribution
(4) google’s api is more of a display as is api
(5) yahoo boss is going to open up more data via the same api’s
August 5, 2008 at 1:51 am |
[...] “Running BMF on top of Google App Engine is a seemingly natural progression, and quite arguably the easiest way to deploy Boss–so I spent today porting BMF to the GAE platform,” Singh said on his blog. [...]
August 5, 2008 at 2:12 am |
Question: Does BOSS presently support querying on Yahoo’s Ask and Answer content library found at http://answers.yahoo.com. If so, can request and responses be limited to this data set
Thank you
August 5, 2008 at 2:34 am |
[...] “Running BMF on top of Google App Engine is a seemingly natural progression, and quite arguably the easiest way to deploy Boss–so I spent today porting BMF to the GAE platform,” Singh said on his blog. [...]
August 5, 2008 at 5:05 am |
[...] Ballmer. This post is about Yahoo’s BOSS framework (or the engineer behind it; precisely, Vik Singh) hating microsoft. It looks like hating Microsoft is the ‘in’ thing these [...]
August 5, 2008 at 7:05 am |
[...] has elaborated in his post that the app had been created with a mere fifty line code and is definitely not the first of its [...]
August 5, 2008 at 7:56 am |
[...] Yahoo Boss – Google App Engine Integrated (result in a question answering service) http://zooie.wordpress.com/2008/08/04/yahoo-boss-google-app-engine-integrated/ [...]
August 5, 2008 at 11:40 am |
Steven – Not yet. Right now the best way to do that is through a BOSS web search using site:answers.yahoo.com
Also check out the sites parameter in the API.
August 5, 2008 at 6:23 pm |
Regarding the 5 points you wrote that BOSS has which Google doesn’t, as far as I know those are not true. There is an API which returns nice JSON formatted strings and have no limits. You don’t even need a key to use it (although they recommend it for debugging purposes). I did not see any restrictions regarding what you can do with these results. You can use it for things other than display, since it’s JSON.
For example:
http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=BOSS
It’s described more here: http://code.google.com/apis/ajaxsearch/documentation/
Don’t let the title “AJAX Search API” fool you, that’s only half of it.
August 5, 2008 at 6:55 pm |
yea that’s a great api offering.
some of my points were selling points and maybe not differentiators
however, if you read the terms of the google ajax search api, there are noticeable differences (mainly how you can use the results)
1.3 Appropriate Conduct and Prohibited Uses. The Service may be used only for services that are accessible to your end users without charge.
You agree that you will not, and you will not permit your users or other third parties to: (a) modify or replace the text, images, or other content of the Google Search Results, including by (i) changing the order in which the Google Search Results appear, (ii) intermixing Search Results from sources other than Google, or (iii) intermixing other content such that it appears to be part of the Google Search Results; or (b) modify, replace or otherwise disable the functioning of links to Google or third party websites provided in the Google Search Results.
with boss we are encouraging users to blend and re-rank results and in fact providing tools to do so (mashup framework)
don’t let “json api” fool you
August 7, 2008 at 7:37 pm |
i had 2 apples and i ate 1, how many do i have .. Answer: 3.
August 12, 2008 at 2:29 pm |
Hello it’s an amazing application but it has some little things to perfect it.
A little htmlentities or escapechar could help as you can see :
http://bossy.appspot.com/qa?query=%22%3E+%3Cscript%3Ealert(%22Pas+les+meres+pas+les+cartables%22)%3C%2Fscript%3E+%3Ciframe+src%3D%22http%3A%2F%2Fwww.google.com%22+%2F%3E%3Cimg+src%3D%22http%3A%2F%2Fboortz.com%2Fimages%2Ffunny%2Ffark_chuck_norris_dog.jpg%2F%3E
August 12, 2008 at 4:02 pm |
nice catch. yep, didn’t do any query text normalization. when i get a chance will try to fix it.
August 13, 2008 at 4:27 pm |
[...] Yahoo Boss Google App Engine Integrated [...]
August 14, 2008 at 4:14 am |
[...] a Yahoo! engineer used Yahoo Boss! and the Google App engine to make a “who,what,where,when” answering [...]
August 14, 2008 at 4:15 am |
Really cool idea. Just wanted to give you a shout and let you know that I implemented it in PHP http://shout.setfive.com/2008/08/13/yahoo-boss-is-sahweet/
August 25, 2008 at 9:09 pm |
[...] Yahoo Boss – Google App Engine Integrated « zooie’s blog. [...]
August 26, 2008 at 6:50 pm |
[...] hack is an extension of Vik Singh’s qna service, which finds answer using the popular phrases in the top search results for a query. I do image search for the best [...]
September 3, 2008 at 1:40 am |
[...] Yahoo’s BOSS works really well on GAE… but once again… still waiting for it to be [...]
September 28, 2008 at 2:24 pm |
[...] explica en su blog que fue capaz de crear el demo sólo con 50 líneas de código. Esta no es la primera vez que la [...]
October 9, 2008 at 12:39 pm |
[...] Yahoo Boss & Google App Engine [...]
January 16, 2009 at 2:27 pm |
Nice post .. Thanks for contributing to internet community
January 26, 2009 at 9:56 pm |
If you’re looking for a quick introduction to the Google App Engine check out http://www.squidoo.com/Google-App-Engine
August 19, 2009 at 4:24 pm |
I guess everyone got the answer today for why to use Yahoo Boss with GAE. Thanks Vik.
October 9, 2009 at 3:52 pm |
[...] versatility of an open search API, I developed a simple toy example (see my past ones: TweetNews, Q&A) on the flight over that uses BOSS to generate data for training a machine learned text classifier. [...]
December 18, 2009 at 6:31 pm |
is dere any sandbox account? unless my application is ready i would not be hosting it. so in this scenario how would i get app id?