user971956
user971956

Reputation: 3208

How to resolve disambiguation in Yago/DBpedia?

Assuming I am searching for an entity such as "Wizard of Oz" and know I am specifically interested in the book rather then movie or musical. Which query/method will return correct results on most cases?

Upvotes: 3

Views: 469

Answers (3)

yuka_mustang
yuka_mustang

Reputation: 100

As every book, and only books, have an ISBN, I guess you can take Steve Harris' query and, instead of asking if it is a book, you can ask if it has an ISBN.

SELECT * WHERE {
  ?s <http://dbpedia.org/property/name> ?name .
  ?s <http://dbpedia.org/ontology/isbn> ?isbn .
  FILTER(regex(STR(?name), "wizard of oz", "i"))
}

Upvotes: 0

Steve Harris
Steve Harris

Reputation: 3660

You can do that with a query like:

SELECT * WHERE {
  ?s <http://dbpedia.org/property/name> ?name .
  ?s a <http://dbpedia.org/ontology/Book> .
  FILTER(regex(STR(?name), "wizard of oz", "i"))
}

Upvotes: 1

Related Questions