Trying to resolve place names to URIs via the dbpedia lookup web-service. What
I'm seeing is that less-specific results are showing up earlier in the order of
results than exact ones. e.g...
sands$ ./dbpedia_lookup_place.rb "Massachusetts"
Boston http://dbpedia.org/resource/Boston *
Massachusetts http://dbpedia.org/resource/Massachusetts
Cambridge, Massachusetts http://dbpedia.org/resource/Cambridge,_Massachusetts
Worcester, Massachusetts http://dbpedia.org/resource/Worcester,_Massachusetts
Springfield, Massachusetts
http://dbpedia.org/resource/Springfield,_Massachusetts
I of course want the most general of these, which is typically the one with the
exact name, though Boston comes up before Massachusetts. It appears that
instead, the results are ordered based on refCount, which seems an odd choice
for a lookup service.
I can of course write code to iterate through the labels and pick the one
that's exact, but it seems like unnecessary work for the consumer of the data.
What is the best recourse here?
Another example:
sands$ ./dbpedia_lookup_place.rb "Alberta"
Calgary http://dbpedia.org/resource/Calgary
Edmonton http://dbpedia.org/resource/Edmonton
Lethbridge http://dbpedia.org/resource/Lethbridge
Red Deer, Alberta http://dbpedia.org/resource/Red_Deer,_Alberta
Moose Jaw http://dbpedia.org/resource/Moose_Jaw
This is even more unfortunate because this URI (the exact resource) doesn't
even appear:
http://en.wikipedia.org/wiki/Alberta
Cheers,
- Sands Fish
- MIT Libraries
- Data Scientist / Software Engineer
- sa...@mit.edu / @sandsfish
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion