Saturday, March 21, 2009

My Semantic Experience

Over the past few months I've been focused on learning and developing my knowledge of the wiki-language. This has led to me discovering a rather interesting add-on for Mediawiki called Semantic Mediawiki. This extension is not currently used on Wikipedia as the database resources needed to support it would be rather substantial. Of course the benefits of having access to semantic data on the scale of Wikipedia would be immense, as many have made the case to the Wikipedia founder. One of the interesting things about the Semantic Mediawiki is that when a breadth of information is entered into a semantic wiki, the information can become an integral part in creating new aggregate data, all without duplication of the original data.

So, after that quick intro to the world of semantic mediawiki, I figured I would tell you what I've been looking forward to doing with the data.  I run an old school pen-and-paper role playing game, adapted for an online environment with a couple of friends. If you aren't familiar with how a role playing game works, just look it up on Google, there's plenty of explanations. In my game, I needed pretty detailed character sheets, to keep track of all the stats and skills of all the players in the game. In order to make sure they weren't cheating, I needed method that would facilitate change history on each document. The wiki format worked great, but then, as many technophile programmers do, I decided I wanted to take advantage of all that data in my wiki, on the character sheet. This has led to a wiki page unlike many I've seen, with auto-completion, drop-downs of sets of pages from certain categories, templates that compute the correct values to be displayed to the user on their page and even some properties used as decorators to give a page multiple values of the same property.

Now, all of that was great, and it made me very happy to have a character sheet that could be filled out in 5 minutes, and contain lots of meta-information. The problem I have, is that I now need something to let me extract properties from that character sheet outside of Mediawiki, and put into my own external app to show random numbers to the users (in other worlds, rolling dice) for the purposes of the game. After working with PHP and XML for a couple days, I was able to pull down all the data I needed from my wiki, and pop it into my dice rolling page. While it wasn't as easy as I thought it would be, I was able to pull down some of the defined semantic properties from the page. However, I'm still working on that dice page though, hopefully there will be easier ways to extract wiki data in the future.

My take away from the experience so far, has been that once you've setup Mediawiki with the Semantic Mediawiki & Semantic Forms extensions, you can really make data entry into your wiki very easy and even have a level of type-safety in your wiki, insuring data integrity, which anyone can appreciate.

2 comments:

denny said...

Should be trivial to get the data -- every wiki page provides an RDF export of all annotations. You're programming language of choice will most likely have an RDF library. Did you try that?

Brendan Crosser-McGay said...

My experience with RDF-parsing libraries has left a bit of bad taste in my mouth, but I am still trying it. It's very interesting how these things work. It's easy to see why there isn't more semantic data on the web when you look at the barriers-to-entry from an implementation perspective on a lot of these technologies.