25 May 2006

First Time with Google-coop

Google Co-op is a platform which enables you to use your expertise to help other users find information(...). With the Google Subscribed Links API, you can add your services directly into Google search. This can help make those services more accessible, giving your users another entry-point to them when they're making a related search on Google.

Today I tested the services from Google Co-op and created a "Subscribed Link" linking my library on connotea. Once a user registers my Subscribed Link, and a connotea tag is requested on google, a link to my library will be displayed.

Using the Connotea web API I downloaded my bookmarks:

wget -O tags.xml "http://login:password@www.connotea.org/data/tags/user/lindenb?num=10000


and the result was transformed with the following xslt stylesheet:
<?xml version='1.0' ?>
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:connotea="http://www.connotea.org/2005/01/schema#"
version='1.0'
>
<xsl:output
method='xml'
version="1.0"
encoding="iso-8859-1"
indent="yes"/>

<xsl:param name="username">Name</xsl:param>
<xsl:param name="user">connotea-user</xsl:param>

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="rdf:RDF">
<Results>
<xsl:apply-templates/>
</Results>
</xsl:template>


<xsl:template match="connotea:TagList">
<xsl:for-each select="connotea:item/connotea:Tag">
<xsl:sort select="connotea:postCount"
data-type="number"
order="descending"
/>
<!-- just keep the 100 first tags with postCount greater than 10 -->
<xsl:if test="position() &lt;= 100 and connotea:postCount &gt;=10">
<xsl:element name="ResultSpec">
<xsl:attribute name="id"><xsl:value-of
select="generate-id()"/></xsl:attribute>
<Query><xsl:value-of select="rdf:value"/></Query>
<Response>
<Output name="title"><xsl:value-of
select="$username"/>&apos;s Connotea Bookmarks</Output>
<Output name="more_url">www.connotea.org/user/<xsl:value-of
select="$user"/>/tag/<xsl:value-of
select="rdf:value"/></Output>
<Output name="text1"><xsl:value-of
select="connotea:postCount"/> bookmarks on www.connotea.org</Output>
</Response>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>


xsltproc tags2coop.xsl tags.xml > coop.xml


The coop.xml looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<Results
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:connotea="http://www.connotea.org/2005/01/schema#">
<ResultSpec id="id2263072">
<Query>Bioinformatics</Query>
<Response>
<Output name="title">Pierre 's Connotea Bookmarks</Output>
<Output name="more_url">www.connotea.org/user/lindenb/tag/Bioinformatics</Output>
<Output name="text1">334 bookmarks on www.connotea.org</Output>
</Response>
</ResultSpec>
(...)


The file was uploaded at http://www.urbigene.com/coop/coop.xml and registered from http://www.google.com/coop/manage/subscribedlinks.





No when someone register my file and ask google about, say bioinformatics, a link to my library on connotea will appear on the top of the page:



Would be nice if connotea could automaticaly export this xml file for google co-op. I also requested this on the connotea wiki.

I also played with Annotations but I still don't have a clear idea of what it can be used for...

4 comments:

Timo Hannay said...

This is very cool, Pierre. We'll certainly think hard about making coop.xml a native output format for Connotea. Keep up the good work!

Pedro Beltrão said...

I have a feeling this co-op thing might be useful but they could make it more obvious to people on how to use it. I was thinking it could be useful for example to somehow unify tag spaces. Say there are several different services that currently have their own tag space. Quick example would be connotea and citeulike. If both provided the correct output that google likes you could then unify tag space between them when you search for something.

Annotation looks very cool but I am not sure how to use them. If I get it right you can upload up to 1000 annotations. Meaning you can upload 1000 tagged links. The problem is in how you can then use the tags. This is where the facet comes in. For each facet you have to define before all the labels of this facet. For papers you could have a facet called year with all the possible years as labels, or you could add a facet called tags and have all the tags in your connotea library as the labels.
The facets allow users to navigate the labeled links. Here is the health example. Instead of Condition Info it would be connotea tag and a list of tags. This looks ok to navigate a small set of tags, but would not work at all for a big tag space. They should have something like this instead.

This is all theory :) I have to get my hands into it to have a go too.

Rafael said...

Pierre, this is great.

Coop CSE said...

A lot of people create their own coop cse but its hard for others to find them. We have created www.coopdir.com which allows you to subit for free your CSE in topics so that other may find it. It can also bring traffic back to your site.

Please take a look at it and submit any CSE you have created.
Thank you