Flags and Lollipops

Monday, October 09, 2006

News@Nature / Postgenomic mashup

When Sphere launched a while back they were supposed to have cut deals with certain news providers - you give us cash, we'll give you links to relevant blog posts. I don't know if any science news outlets took them up on the offer but in any case here's something that does the same thing - in very rough form - using free APIs instead (namely those from Yahoo! and Postgenomic).

pgrelevant.user.js installs a command under "User Script Commands" in the Tools menu called "Find relevant blog content" which is available on pages from News@Nature. If you click on this command a bar will appear at the top of the current page and you'll see a list of key terms found followed by a list of relevant blog posts (that's the theory, anyway).



The script:

1) Extracts what it thinks is the main body of the page
2) Sends it to the Yahoo! term extraction API
3) Sends those terms to the Postgenomic API
4) Displays the resulting blog posts

All using the magic of JSON and Javascript.

The script's main limitation (and the reason that it's currently restricted somewhat arbitrarily to news@nature pages) is step 1: extracting content from a web page is, er, remarkably difficult. Noise from elements like scripts, navigation bars and adverts render the term extraction API useless. Perhaps somebody with better Javascript skills could help with that...

Comments and trackbacks Feel free to post your comments . This post has trackbacks.

Wednesday, October 04, 2006

Go Go Google Gadgets

If you sign in to Google you get access to a personalized homepage (personalized in that you can change what's displayed on it). Developers can create "gadgets" which any user can add to their Google homepage. Gadgets list the latest headlines, or the weather, or display the time in New York, whatever.

You probably knew all that already. This week, though, Google decided to let gadgets be syndicated - i.e. you can use them on any web page, not just your personalized homepage. This makes investing the effort in reading the Gadget documentation slightly more worthwhile.

I figured I'd have a go at crafting a gadget that displays terms that are currently cropping up more often than expected in science blogs (the "Top Terms Today" part of the Postgenomic frontpage, basically): this turned out to be very easy.

Screenshot of Postgenomic gadget

Add to Google

Clicking on the button above adds the Postgenomic gadget to your Google homepage. By default all blogs in the Postgenomic index are included but you can filter by category, too - just click on the "edit" link in the title bar.

Syndicating the gadget is pretty simple, too: it involves sending site owners to a page where they can customize colours and settings: the page then displays the necessary javascript. I can't say that I'm a big fan of Google's default colour and border schemes, but apparently you can override them manually if you prefer.

Comments and trackbacks Feel free to post your comments Anonymous Deepak Blogger Amrinder . This post has trackbacks.


See all posts from: July 2005 August 2005 September 2005 October 2005 November 2005 December 2005 January 2006 February 2006 March 2006 April 2006 May 2006 June 2006 July 2006 September 2006 October 2006 November 2006 December 2006 January 2007 February 2007 March 2007 April 2007 May 2007 June 2007 July 2007 August 2007 October 2007 November 2007 December 2007 January 2008 February 2008 March 2008