I have just deployed a new version of SemanticTweet. In this iteration, SemanticTweet supports geolocation. Specifically, it attempts to convert your Twitter location into a semantic web equivalent.
Because Twitter allows your location attribute to be free-form text, SemanticTweet must parse the attribute to turn it into something intelligible. At present, SemanticTweet supports four use cases for the location attribute. The following examples all refer to Dublin, Ireland, and can be correctly parsed by SemanticTweet:
geonames:2964574Some arbitrary text: 53.3330556,-6.2488889(lat/long format, as produced by some iPhone twitter clients)Dublin(or any place name, not just a capital city)Dublin, IE(but not Dublin, Ireland)
If SemanticTweet can correctly parse your location, it will attempt to find it on GeoNames. For those of you who are unfamiliar with GeoNames, it describes itself as the:
geographical database [that] covers all countries and contains over eight million placenames that are available for download free of charge.
I’ll go into the GeoNames integration in a subsequent blog post, but for the moment, take it as read that the GeoNames service is queried, and a geolocation obtained. Based on this, SemanticTweet inserts the two <foaf:based_near> triples into your <foaf:Person> profile:
<foaf:based_near>
<wgs84_pos:Point>
<foaf:name>Guillestre</foaf:name>
<wgs84_pos:lat>44.6594959346223</wgs84_pos:lat>
<wgs84_pos:long>6.64947509765625</wgs84_pos:long>
</wgs84_pos:Point>
</foaf:based_near>
<foaf:based_near rdf:resource="http://sws.geonames.org/6446645/"/>
(This example was taken from @hubject’s profile, who provided his Twitter location as geonames:6446645.)
The first of these <foaf:based_near> triples is pretty obvious: place name, latitude and longitude. The second of them is somewhat more interesting, in that it is the GeoNames URI for that placename, and that that URI redirects to http://sws.geonames.org/6446645/about.rdf, which is an RDF document describing the place.
Hence, your twitter location is now participating in the great Linked Data world.
At present, this geotagging is only being done for the calling screen name, not their friends or followers. This is principally because of the number of external web service calls necessary, and the associated latency if one were to make hundreds or even thousands of such calls for a large set of friends and followers.
There are, of course, many ways in which this could be improved, not least of which would be to parse the place names more intelligently, but for the moment, this does a pretty good job, and will hopefully make the SemanticTweet service somewhat more useful and interesting.
August 6th, 2009 at 2:02 am
Your main site (www) seems to be missing a few HTML files. all i get is a file listing!
August 13th, 2009 at 9:35 am
Nicholas,
thanks for the pointer.
Turns out that my hosting provider had upgraded their Passenger Phusion install, which necessitated a change to the deployment configuration on my end.
Anyway, all back to normal now…