Archive

Posts Tagged ‘ireland’

Using w3c org ontology to describe Ireland’s entry to the EU (i)

November 22, 2014 Comments off

eGovernment EU Institutions working on interoperability (“Joinup”) have commited to the W3C their work on an ontology describing organisations. This follows work by Dave Reynolds.

There are also ontologies and vocabularies for Registered Organisations, EU institutions, job descriptions and do on. All very useful – really ! – but in trying to use them to describe the history of the Irish accession and membership of the EU I have come across a few things that have led to some customisations and extensions – a new ontology in fact. Of course, this is part of the beauty of Linked Data and I hope to have some real data to publish soon for review.

The dataset should include, starting at 1950, the history of Ireland’s interaction with the EU and the events that took place from them, in context. This will include organisations, events, ministries, ministers, locations, dates, and outcomes, and so will require some thought and analysis to avoid duplicating what is there already and to make correct use of the classes and properties already defined.

There are a few things to consider, not least the definition of a “state” for a “government” and a “ministry” or “department”. The Location ontology allows for geometric coordinates and spatial descriptions for instance, but the organisation ontology on the other hand doesn’t cater for a political or economic location to be described. So I am adding that and making use of another ontology (the Agricultural Information Management Standards geopolitical ontology/thesaurus). This will be joined by an object property.

The Joinup vocabulary for EU institutions includes historical names for the economic organisations and treaties – like the European Coal and Steel Community for instance – and is described using SKOS. This gets included as a reference source in my ontology. Treaties are not described as particular things so I’m working on adding that too. Prov-o may or may not help here. The CPSV catalog describes the Public Service but appears incomplete or still in development. It also doesn’t seem to link to the org ontology in any way, so I’ll tackle that as well. There is also a vocab for institutions names and civil service roles that will be useful, as long as I can link it back to foaf properly – still trying to see how for now !

Of course this all highlights a  issues and advantages of open world ontologies

  • your modelling perspective defines what you want to use and how you see other work – I see some gaps and connections that others may not, or that were not important or particular at the time, or that in fact need or can only be defined depending on your perspective
  • its possible to make up for that by joining and linking classes in a new ontology that reflects your vision
  • it can be hard work trying to figure out what exists already and where and how to extend it
  • tool support (in Protege at least) is lacking when it comes to creating individuals as well as new classes and properties – ideally I want to pick a class, then get some completion help to allow me to see the class hierarchy and the available properties (like a programming IDE – Eclipse or Idea for instance). I resort to sparql.
  • How to coin linkable URI and  where to publish  with a content negotiator and sparql endpoint ?

Still, it’s going to take some time, but should be interesting to come up with something that can be reviewed, corrected and evolve – without reinventing the wheel. Success will be measured in how many inbound links it gets !

Advertisements

Java Semantic & Linked Open Data webapps – Part 5.1

January 18, 2011 1 comment

How to Architect ?

Well – what before how  – this is firstly about requirements, and then about treatment

Linked Open Data app

Create a semantic repository for a read only dataset with a sparql endpoint for the linked open data web. Create a web application with Ajax and html (no server side code) that makes use of this data and demonstrates linkage to other datasets. Integrate free text search and query capability. Generate a data driven UI from ontology if possible.

So – a fairly tall order : in summary

  • define ontology
  • extract entites from digital text and transform to rdf defined by ontology
  • create an RDF dataset and host in a repository.
  • provide a sparql endpoint
  • create a URI namespace and resolution capability. ensure persistence and decoupling of possible
  • provide content negotiation for human and machine addressing
  • create a UI with client side code only
  • create a text index for keyword search and possibly faceted search, and integrate into the UI alongside query driven interfaces
  • link to other datasets – geonames, dbpedia, any others meaningful – demonstrate promise and capability of linkage
  • build an ontology driven UI so that a human can navigate data, with appropriate display based on type, and appropriate form to drive exploration

Here’s what we end up

Lewis Topographical Dictionary linked data app - system diagram

  1. UserAgent – a browser navigates to Lewis TDI homepage – http://uoccou.endofinternet.net:8080/resources/sparql – and
  2. the webserver (tomcat in fact) returns html and javascript. This is the “application”.
  3. interactions on the webpage invoke javascript that either makes direct calls to Joseki (6) or makes use or permanent URIs (at purl.org) for subject instances from the ontology
  4. purl.org redirects to dynamic dns which resolves to hosted application – on EC2, or during development to some other server. This means we have permanent URIs with flexible hosting locations, at the expense of some network round trips – YMMV.
  5. dyndns calls EC2 where a 303 filter intersects to resolve to either a sparql (6) call for html, json or rdf. pluggable logic for different URIs and/or accept headers means this can be a select, describe, or construct.
  6. Joseki as a sparql endpoint provides RDF query processing with extensions for freetext search, aggregates, federation, inferencing
  7. TDB provides single semantic repository instance (java, persistent, memory mapped) addressable by joseki. For failover or horizontal scaling with multiple sparql endpoints SDB should probably be used. For vertical scaling at TDB – get a bigger machine ! Consider other repository options where physical partitioning, failover/resilience or concurrent webapp instance access required (ie if youre building a webapp connected to a repository by code rather than a web page that makes use of a sparql endpoint).

Next article will provide similar description or architecture used for the Java web application with code that is directly connected to a repository rather than one that talks to a sparql endpoint.

Politicans per capita in EU member states

December 8, 2010 3 comments

I was looking for an interesting query to use as the basis for a quick SPARQL in Drupal7 page, and given Ireland’s “austerity” (aka hairshirt) budget yesterday and our glorious IMF bailout,  I was minded to create a query ranking number of members of houses of legislature in each country against population.

The query took a long time because its very difficult to ascertain the field names from the dbpedia infobox fields, the dbpedia properties and ontology, and the variations in field usage per country, the apparent disconnect (for a human) between a topic and what might be exected as property. I for instance was expecting to be able see a reference to the house of parliament on each country’s page, but its in fact a little more organised than that 🙂

In the end the easiest way to do this is to open up the SPARQL endpoint [1], for example a wiki page about a country, then find an URI for a dbpedia resource for a country. I ended up using the Czech Republic URI [2].

After much tooing-and-froing the query I came up with the query below. Strangely, some countries have recorded populations that this query doesnt find (eg Germany – simplify the query and take a look).  It’s a bit rough around the edges but the evidence is clear [1] : Ireland is over-represented in legislature.

  • Anyone have any opinions why Ireland is over-represented ?
  • Is the situation similar at local level ?
  • Why doe the query not pick up dbpprop:populationEstimate for Germany ?
SELECT ?s ?t ?estPop ?estPopYear ?cenPop ?cenPopYear ?house ?n (?estPop/?n) as ?estPerCapita (?cenPop/?n) as ?cenPerCapita
WHERE { 
?s ?p <http://dbpedia.org/resource/Category:European_Union_member_states> .
?t skos:subject ?s .
?t rdf:type dbpedia-owl:Country .

optional{
?b skos:broader ?s .
?house skos:subject ?b .
?house dbpedia-owl:numberOfMembers ?n .

?t dbpprop:populationEstimate ?estPop .
?t dbpprop:populationCensus ?cenPop .
?t dbpprop:populationEstimateYear ?estPopYear .
?t dbpprop:populationCensusYear ?cenPopYear .
}

}
order by ?t

[1] http://dbpedia.org/sparql

[2] http://dbpedia.org/resource/Czech_Republic

[3] http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&should-sponge=soft&query=SELECT+%3Fs+%3Ft+%3FestPop+%3FestPopYear+%3FcenPop+%3FcenPopYear+%3Fhouse+%3Fn+%28%3FestPop%2F%3Fn%29+as+%3FestPerCapita+%28%3FcenPop%2F%3Fn%29+as+%3FcenPerCapitaWHERE+{+%0D%0A%3Fs+%3Fp+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FCategory%3AEuropean_Union_member_states%3E+.%0D%0A%3Ft+skos%3Asubject+%3Fs+.%0D%0A%3Ft+rdf%3Atype+dbpedia-owl%3ACountry+.%0D%0A%0D%0Aoptional{%0D%0A%3Fb+skos%3Abroader+%3Fs+.%0D%0A%3Fhouse+skos%3Asubject+%3Fb+.%0D%0A%3Fhouse+dbpedia-owl%3AnumberOfMembers+%3Fn+.%0D%0A%0D%0A%3Ft+dbpprop%3ApopulationEstimate+%3FestPop+.%0D%0A%3Ft+dbpprop%3ApopulationCensus+%3FcenPop+.%0D%0A%3Ft+dbpprop%3ApopulationEstimateYear+%3FestPopYear+.%0D%0A%3Ft+dbpprop%3ApopulationCensusYear+%3FcenPopYear+.%0D%0A}%0D%0A%0D%0A}%0D%0Aorder+by+%3Ft%0D%0A&debug=on&timeout=&format=text%2Fhtml&save=display&fname=fname=

Mobile Device Apps Ranking Sep ’10

September 14, 2010 Comments off

Number of apps in mobile app stores in selected categories, as of Sep 2010

Category iTunes Ovi Android
History 2015 242 1102
Heritage 123 2 18
Tourism 158 14 20
Ireland 51 64 73
Genealogy 43 0 9
Veterans 17 0 20
Archive 81 3 199

Time to defect ?

April 23, 2010 Comments off

Now that Ireland is officially a financial basketcase, I thought again about emigrating like I did in the 80’s when Charlie Haughey had the country in a midden. But where to go, and how to register dissatisfaction ?  Could I change my emigrate and change my nationality ? Or perhaps a more headline grabbing, petulant and downright in-your-face solution would be to defect. Where to ?


How unpatriotic is it to leave a county thats been murdered by politicians,  greed and “I’m alright jack” ? Would I be better to stay and fix it, even when my taxes go to bail out the criminals who got us into the mess, and who by connection to the government are acting treasonably ? Is this seditious ?

Categories: history, politics Tags: , ,