- answering queries across topics ranging from potential new cancer drugs to today’s birthdays to subway stations in Paris.
Friday, June 16, 2017
Building communities of knowledge with Wikidata
Posted by Benjamin Good at 2:01 PM 0 comments
Labels: crowdsourcing, gene wiki, semantic wikipedia, sulab, wiki, wikidata, wikipedia
Wednesday, October 21, 2015
Poof it works - using wikidata to build Wikipedia articles about genes
![]() |
| Infobox for ARF6, rendered entirely from content Wikidata |
The Gene Wiki project has programmatically created and maintained the infoboxes to the right of all the articles in Wikipedia about human genes since about 2008 [Huss 2008]. This process has entailed the construction of a unique template containing all of the relevant data for each gene. For example, here is the code for the template for the ARF6 gene. As Wikipedia previously had no database, that is where the data was stored. Altering that content programmatically involves parsing that template as a string. Its ugly (sorry Jon) and there are more than 11,000 of these templates to maintain (one per gene in Wikipedia).
Now, the same data can be represented in Wikidata, a queriable, open graph of claims about the world backed by references and specified by qualifiers [Vrandečić 2014]. Now that the content needed to render the infobox is all there, we can convert 11,000+ complex templates that require string parsing to maintain to a single, re-usable template for all of them.
The first cut at the new template is {{infobox gene}}. If you put that on any article about a human gene, you ought to get the complete infobox for the article without any further ado. Poof! You can view it in action on this revision for ARF6. We haven't rolled out the new template across all the articles yet, but hope to see that happen in the coming months. Remaining issues include: better error-handling in the template code, better ways to give users the ability to edit the associated data in wikidata, and updates to all of the code that produces gene wiki articles. If you want to help, chime in on the module:wikidata thread.
Saturday, October 8, 2011
Stepping towards a Semantic Wikipedia
![]() |
| Semantic markup now live in Wikipedia |
- Editor inserts a SWL into a Wikipedia article with this syntax:
- {{SWL | target=protein kinase S | label=PKA | type =substrate_for}}
- This means "the concept where you see this link is related to protein kinase A (labeled PKA) with the relationship type "substrate for". So, in the example above, it says: "Phospholamban is a substrate for PKA".
- The {{}} denotes a Wikipedia template. Templates can take parameters (here parameters are separated by |'s) and use them to produce new WikiText dynamically which, in turn, is rendered as HTML when a page is loaded.
- When the page is rendered, the template generates the following semi-semantic HTML markup (with some formatting omitted for clarity):
- Programs, like the script that generated that infobox and added the green highlighting, can look for the SWL class attribute can then extract the meaning of the SWL links based on the class of its first child element - here "substrate_for".
- In addition, when the template is processed it adds a category to the article it is placed on that corresponds to the relationship type. (See for example, the category for substrate.) This category provides a logical grouping (e.g. all things that serve as a biochemical substrate) but, perhaps more importantly, it provides a place to record the meaning of the relationship. This meaning can be defined as text, but can also be defined through reference to external sources such as ontologies on the semantic web.
- Using the template to enhance articles.
- Writing code that makes use of the added meaning such as user scripts, aggregators, or scripts that import the relationships into other structured repositories like FreeBase or DBpedia.
- Helping define the nature of the semantic links (at their associated category pages) and mapping them to properties defined in ontologies.
- Discussing (and voting for) the idea on the various 'talk pages' on Wikipedia.
- Create a Wikipedia user account if you don't have one already
- Go to/create your user page. (e.g. my user name there is i9606 and my user page is located at http://en.wikipedia.org/wiki/User:I9606 )
- Edit your user page add this to it -
- Visit your new common.js add this to it -
- When that is saved, you should be all set. Now go visit an enhanced page like Phospholamban and look for the green box at the upper right corner.
Posted by Benjamin Good at 12:00 AM 12 comments
Labels: gene wiki, microformats, semantic links, semantic web, sulab, SWL, wikipedia
Thursday, May 27, 2010
Gene Wiki Hairball 1
Here is a view of the hyperlink network in the Gene Wiki.
Generated as follows:
Sunday, May 20, 2007
Linked Data - a new name for RDF..
Aside from the collaborative construction of knowledge workshop that I discussed in my last post, no particular session or presentation from WWW2007 really stands out in my mind. That being said, the various sessions organized under the rather loose term "linked data" seemed to me to offer the most exciting new developments. Whether this was because Tim Berners-Lee was at most of these sessions or whether he was at these sessions because this was where the action was, I can't be sure.
The concept of "linked data" as far as I can tell, is essentially the same as web-based data integration which, IMO, is essentially the applied (non-theoretical/"actually useful") version of the semantic web. The basic ideas (described here) are basically that data should be represented in RDF and should be exposed on the Web such that the URIs can be "linked to" by other RDF statements in a similar way to how HTML pages can be linked to from other pages (but with the additional semantics provided by the RDF language). As I thought this was the basic idea of RDF all along, I'm a little uncertain why the new name came into being - perhaps its just easier to get across to people.
Anyway, the point is that, all of a sudden, there seems to be a whole lot of linked data/resolvable RDF out on the Web (finally!). One of the most exciting academic projects under this umbrella is DBpedia. DBpedia has converted the structured information present in Wikipedia into a resolvable RDF representation. This means that you can query it like a database and you can link to it in the data that you publish in as RDF - enriching both your own content and the semantic web as a whole. Cool.. Another project along similar lines but from the commercial side is called FreeBase.
Within the bioinformatics domain, we will shortly be seeing the public announcement of the new, fully RDFized version of UniProt and we already have an RDF wrapper around a large portion of the world's major bioinformatics databases in the form of Francois Belleau's Bio2RDF.
The semantic web is there - time to start writing those agents and browsers that can actually make use of it!
Posted by Benjamin Good at 12:54 PM 0 comments
Labels: DBpedia, linked data, RDF, semantic web, wikipedia, WWW2007


