[iRail] Help needed: stationslist & wikipedia
Pieter Colpaert
pieter.colpaert at gmail.com
Mon Aug 15 00:06:25 UTC 2011
Dear List,
As Christophe brought to our attention earlier today we need a better
stationslist @ http://api.iRail.be/stations/ . It really would be a
shame if we would do double work or if we would keep all our efforts
inside the NPO. I started thinking and now I came up with this solution:
Wikipedia is pretty awesome. We got all (really, ALL) information that
one could imagine about any (really, ANY) station on it! Check this out:
http://fr.wikipedia.org/wiki/Cat%C3%A9gorie:Gare_de_Belgique
or
http://nl.wikipedia.org/wiki/Categorie:Spoorwegstation_in_Belgi%C3%AB
The English version however is not sufficient at all
http://en.wikipedia.org/wiki/Category:Railway_stations_in_Belgium
DBPedia
-------
DBPedia is a system where you can query wikipedia as if it was a
relational database. This means that we can just generate a stationslist
by asking the right thing. I made a query:
select *
where {
?station a yago:RailwayStationsInBelgium
OPTIONAL { ?station dbpprop:code ?code }
OPTIONAL { ?station geo:lat ?lat }
OPTIONAL { ?station geo:long ?long }
}
And put it into http://dbpedia.org/sparql
Which gave this result: http://dbpedia.org/sparql?default-graph-uri=http
%3A%2F%2Fdbpedia.org&query=select+*%0D%0Awhere+{%0D%0A%3Fstation+a+yago%
3ARailwayStationsInBelgium%0D%0AOPTIONAL+{+%3Fstation+dbpprop%3Acode+%
3Fcode+}%0D%0AOPTIONAL+{+%3Fstation+geo%3Alat+%3Flat+}%0D%0AOPTIONAL+{+%
3Fstation+geo%3Along+%3Flong+}%0D%0A}&debug=on&timeout=&format=text%
2Fhtml&save=display&fname=
This would give us a HUGE amount of flexibility. By adding different
parameters such as "?station dbpprop:abstract ?abstract" you can even
get the history of a station.
PROBLEM:
---------
The data which dbpedia returns can only be retrieved from the English
wikipedia. This means we will not have the great extended pages like on
the Dutch or French version.
However, if we, the iRail community, would just translate the Dutch or
French pages into English, we solved our problem: we'd have a very good
stationlist in our API. On top of that, we will also have made a lot of
other people happy who would be trying to look up a wikipedia in English
about a certain station.
MISSION:
--------
Let's make this an iRail issue! Let's translate all pages into English!
This would be a great achievement for our community.
What do you think? Who's in?
Yours sincerely,
Pieter
--
iRail vzw/asbl
+32 (0) 486/747122
More information about the iRail
mailing list