getting correct names for Dbpedia sparqlwrapper queries

54 views Asked by At

I am querying DBpedia for information about organizations and I am using "dbpedia.org/page/[organization]" to find what name is used for those organizations. It will usually fix the inputted name to the name it uses. eg dbpedia.org/page/Tmobile will be redirected to T-Mobile.

When making a query using SPARQLwrapper to 'http://dbpedia.org/sparql' these names usually work but not always (such as the previous T-Mobile example. How can I find the specific name to use when querying DBpedia using SPARQLwrapper?

1

There are 1 answers

0
TallTed On

My first thought is that you're using the wrong URIs for your SPARQL queries -- .../page/... are HTML representations of the descriptions of the entities. .../resource/... are the identifiers of the entities (which get redirected to the .../page/... when you use a web browser, which requests HTML, to dereference the .../resource/... URIs).

In other words, instead of, for instance (results here) --

DESCRIBE <http://dbpedia.org/page/Tmobile>

-- try (results here) --

DESCRIBE <http://dbpedia.org/resource/Tmobile>