[iRail] Help needed: stationslist & wikipedia

Pieter Colpaert pieter.colpaert at gmail.com
Mon Aug 15 10:23:57 UTC 2011


Hi,

yes, the problem remains the same.

Pieter

On Mon, 2011-08-15 at 12:28 +0200, Christophe Versieux wrote:
> Hello, 
> 
> I think you misunderstood my request. 
> The station List is good, and I have nothing to complain.
> 
> The only issue is that asking for results in lang=en does not give
> accurate results if you are pinging 'Tournai' or 'Doornik'. (liveboard
> and connection)
> The response should be in english (Doornik or Tournai, I really don't
> care), but the API should undersdand both name, that is not the
> currently the case with all cities (initial request with Sint genesius
> Rhode//Rhoide Saint Genese).
> 
> Hope this clarify my request.
> 
> 
> > 
> > Pieter Colpaert
> > 15 août 2011 11:50
> > 
> > Hi,
> > 
> > To summarize the problem that we're having:
> > 
> > That list you showed us is what we currently have but the matching
> > between railtime ID's, geocoordinates, NMBS ID's (these differ from
> > railtime id's) and English names is really hard and currently a
> > little
> > buggy. 
> > 
> > Since the API also allows people to loosely match a station, such as
> > give in "ghent" for Gent Sint Pieters, sometimes weird results are
> > returned and that's the problem we're trying to fix.
> > 
> > Christophe also wants a better stationslist returned at
> > api.irail.be/stations/. Without parameter this list should not
> > return a
> > list of all stations with their English names (this list is the most
> > buggy of all since there is no official "english" name), but it
> > should,
> > according to Christophe, return a list of all *stationnames* (not
> > unique
> > stations) which are different.
> > 
> > For instance, if we have Charleroi ouest, returning charleroi west
> > as
> > well would be crazy since everyone can understand the stationname
> > and it
> > would be overhead to add it to an autocompletion list since it will
> > only
> > make it dirtier. If however we have Doornik, we also want to return
> > Tournai, since these are 2 totally different names. Even for
> > Oudenaarde
> > this is an issue, since French users will start typing Aude...
> > 
> > To be frank, I have broken my head over this the last year and the
> > implementation we currently have is the best I could do. I think
> > it's
> > cool that now we are arguing about this because we may find a better
> > solution.
> > 
> > Your sincerely, 
> > 
> > Pieter
> > 
> > 
> > 
> > 
> > ____________________________________________________________________
> > 
> > 
> > 
> > Tom Waterbley
> > 15 août 2011 10:36
> > 
> > Why don't you try to parse this:
> > http://www.railtime.be/website/StationDataScript.ashx 
> > 
> > -------------------------------------------------- 
> > From: "Pieter Colpaert" <pieter.colpaert at gmail.com> 
> > Sent: Monday, August 15, 2011 2:06 AM 
> > To: "iRail" <iRail at list.iRail.be> 
> > Subject: [iRail] Help needed: stationslist & wikipedia 
> > 
> > _______________________________________________ 
> > iRail mailing list 
> > iRail at list.irail.be 
> > http://lists.rootspirit.com/mailman/listinfo/irail 
> > 
> > ____________________________________________________________________
> > 
> > 
> > 
> > Pieter Colpaert
> > 15 août 2011 02:06
> > 
> > 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 mailing list
> iRail at list.irail.be
> http://lists.rootspirit.com/mailman/listinfo/irail

-- 
iRail vzw/asbl
+32 (0) 486/747122




More information about the iRail mailing list