Archive

Posts Tagged ‘Resource Description Framework’

Mash-ups are so last year…

June 14, 2009 3 comments

Mash-ups are cool – ever since Ordnance Survey, Google, Yahoo! and Microsoft launched there various mapping APIs we’ve seen quite a few of them. This weekend I’ve been experimenting with creating a map mesh-up. I’m not sure if there is any strict definition of a mesh-up, but Kinglsey Idehen gave a pretty good account of mesh-up versus mash-up in this blog entry. I’ll leave it up to you the reader to decide if what I have done is truly a mesh-up, but I like to think I did the best I could given the current semantic web infrastructure.

Given my day job I thought it would be cool to do some kind of map mesh-up around regions in the UK (however being a typical researcher I’ve only done four locations so far just to prove the concept). The new version of Ordnance Survey’s mapping API (OS OpenSpace) provides easy API calls to let you display the boundaries of administrative regions in Great Britain (except for civil parishes and communities). This made OS OpenSpace a no brainer for this mesh-up (and of course the superior cartography is an added bonus :)). In order to process the RDF I used the ARC PHP library.

I’ll now explain how I did each of the various mesh-ups starting with the most straightforward one – the basic map with region information (e.g Southampton). This basic map mesh-up was made using the Ordnance Survey RDF for administrative units in Great Britain. This is hosted as linked data on the rkbexplorer site and has a SPARQL endpoint. This RDF data contains topological relations and name information for the administrative regions in Great Britain. For example, take a look at Southampton. For a given region the ARC library was used to issue a SPARQL query to find the bordering regions, contained regions and containing regions along with the area of the region. The result of these queries was then displayed in the map information pop-out. So to find the bordering regions for Southampton the query is very straightforward:

SELECT ?border
WHERE
{
<http://os.rkbexplorer.com/id/osr7000000000037256&gt; admingeo:borders ?border .
}

The family tree mesh-up was done in a similar way. I documented in a previous blog entry how I had started converting my family tree into RDF. In fact since my last blog entry I now have that data available as linked data (this was done using Paget, for example: http://www.johngoodwin.me.uk/family/I0002). The data was stored on the Talis Platform and again ARC was used to do a SPARQL query. You may notice for the Birmingham family tree map I list members of my family that were born in Birmingham and died in Birmingham. I also list relatives that were born in areas bordering Birmingham. I was able to do this because my family tree data was connected to the Ordnance Survey boundaries RDF. So from the OS data I could find all areas bordering Birmingham, and then return all family members born in these areas from my family tree data. Because the data was linked over the web is was easy to do this in a very simple SPARQL query:

SELECT ?s ?name
WHERE
{

?place admingeo:borders <http://os.rkbexplorer.com/id/osr7000000000000018&gt;.

?s dbpedia-owl:birthplace ?place .

?s foaf:name ?name
}

The BBC mesh-ups are arguably more interesting. The BBC recently announced a SPARQL endpoint for its RDF data. An example of the queries you can do are given here. The observant amongst you will notice that the BBC data does provide location information, but the URIs for the location are currently taken from DBpedia and not from the Ordnance Survey data. To get round this I used a new service called sameas.org. The sameas.org service offers a service that helps you to find co-references between different data sets. You can use this to look up other sources that represent your chosen URI. For example http://os.rkbexplorer.com/id/osr7000000000037256 has the equivalent URIs given here.

However, I didn’t want to hard code the equivalent URIs in my code. I’ll explain what I did using the Southampton example. First I issued a call to sameas.org to look up coreferences for the Ordnance Survey Southampton URI. I returned the URIs as an RDF file and used the ARC library to parse the RDF file for equivalent resources from dbpedia. I then issued a SPARQL query using the dbpedia URIs to return the artist/programme information from the BBC SPARQL endpoint.  So in a nutshell:

  1. take Ordnance Survey URI
  2. issue a look-up for that URI to sameas.org
  3. return URIs in an RDF file
  4. parse the RDF file using ARC for dbpedia URIs
  5. issue query to BBC endpoint using the dbpedia URIs.

The revyu mesh-up was done in a similar way.

I hope this all made sense. Comments and questions welcome – though please no comments on my HTML/web design being very 1995. It’s all about the RDF for me  :)

The mesh-up is here http://www.johngoodwin.me.uk/boundaries/meshup.html

Reblog this post [with Zemanta]

Linked Ontology Web

April 1, 2009 1 comment

I’ve been thinking a bit at work about how we should publish OWL ontologies on the semantic web, and if this can be done in a way analagous to the linked data web. I want to quickly blog my thoughts before I head to the pub :)

There are currently a number of great tutorials on how to publish RDF as linked data. Without going into too much detail every URI in the published RDF is dereferencable, which very roughly speaking means that it returns some information when your visit it. A URI such as http://os.rkbexplorer.com/id/osr7000000000037256 will return some RDF/XML if they client requests RDF or some HTML if you are visiting from, say, a web browser. There are a number of ways to modularise the data, but typically the information returned on a URI will be the result of a SPARQL describe query or will be the triples where the URI appears as either the subject or object of that triple.  Apologies for the quick and dirty description of linked data, but more information can be found in the previous linked tutorials.

RDF vocabularies and ontologies are typically just published on the web as dumps of RDF/XML and only in some cases are the classes and properties dereferencable. In other words the whole file is simply uploaded in bulk. There are guidelines for publishing RDF vocabularies here.

It seems to me that this will be inadequate for publishing larger and more complex ontologies on the web. Do we need a way to publish large ontologies on the web in a linked data stylee? I think it would certainly be useful.

The dereferencable URI bit is easy enough and can be done as per linked data. For example,  the HTML page for the URI http://www.ontology.com/River could provide a description of the class River using some controlled natural language. The question then is what to put in the OWL/RDF file that is retrieved for the class River  from that URI? What is the class or OWL equivalent of a “SPARQL describe”?

The problem to me seems to be similar to the problem of ontology modularisation discussws here. Suppose I am building an ontology about animals and I need to use the concept Farm and Zoo from a building ontology. When I import the class Zoo how am I sure that I include all the relevant axioms to describe a Zoo, and only the relevant axioms to describe a Zoo? I’ll not describe the how’s here as it has been discussed in this tutorial (and numerous supporting papers). The point is that there are tools (try one online) for extracting the correct axioms from an ontology for describing a given class. Should these tools be used in the linked data community as a means to enable us to publish detailed ontologies on the linked data web? So to be clear:

1) We publish the full OWL file on the web (in an analagous way to a dump of RDF data in the linked data web) – this would be, say, the complete buildings ontology.

2) We make URI derefencable and use content negotiation to retrieve either RDF/XML or HTML as required as we do for linked data.

3) When we deference a class URI (e.g. http://www.ontology.com/Zoo) the axioms contained in the RDF file returned for “Zoo” are determined by the ontology modularisation tools described here rather than some perhaps more naive approach (where as for linked data this would be, say, a SPARQL describe on the URI).

I’d love to know if there are any links to similar work and to know what people think about this proposal.

Reblog this post [with Zemanta]
Follow

Get every new post delivered to your Inbox.

Join 2,189 other followers