The following two links won’t do much if you click them now, but if you drag them to your bookmarks toolbar, clicking the first one there while viewing a Wikipedia page will take you to the corresponding DBpedia page, and clicking the second while viewing the Freebase page for a particular topic will take you to the page full of RDF for that topic.

wp -> dbpedia

freebase rdf

They’re both scriptlets, or little bits of Javascript code embedded in links. Each reads the URL of the currently displayed page, does a bit of string manipulation on it, and sends your browser to the resulting URL. I’ve had the DBpedia one for a while, but I recently found that DBpedia URLs escape parentheses when Wikipedia URLs don’t, so I fixed the scriptlet to account for this. While I was at it, I created the Freebase one, which is much simpler.

If anyone’s interested, I also have scriptlets to go to a site’s home page, an “up” button (cd ..), and a backlink button that searches Google for webpages linking to the currently displayed one.


By Tom Morris on March 27, 2011 12:43 PM

Your Freebase script doesn’t look like it’s using the proper namespace. There’s no guarantee that there will be a key in the /en namespace and, if there is, it may only be loosely related to the name of the Wikipedia article. You should reference the /wikipedia/en namespace and make sure the key is properly quoted.

See my WTF (Wikipedia-to-Freebase) Chrome extension or Zak Dweil’s Greasemonkey script for a way to do this.

By Bob DuCharmeAuthor Profile Page{.commenter-profile} on March 27, 2011 12:49 PM

it may only be loosely related to the name of the Wikipedia article

The idea was to go from the Freebase article to the Freebase page, not from the Wikipedia article to the Freebase page. I was just taking advantage of the commonality I found in URIs when I clicked the RDF links at the bottom of Freebase pages.

By Amit on April 10, 2011 11:50 AM

This is very useful for creating SPARQL queries. I created a site several months ago where users can learn, create and share the SPARQL queries.

This conversion tool will help many to create more SPARQL queries easily.

Thanks for awesome tool.


By Bob DuCharmeAuthor Profile Page{.commenter-profile} on April 21, 2011 12:32 PM

Thanks Amit, looks pretty cool.