0

I have a CSV file with a list of names in English and Hebrew, I need to get some information on.

The data I need is "name-Hebrew name-English DBpedia-URL date birth place birth dateDeath placeDeath entry_where_found"

for each person, the "entry_where_found" should return if I found the information on DBpedia or wiki data.

I thought of something like this:

PREFIX wd: <http://www.wikidata.org/entity/> 
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX dbo: <http://dbpedia.org/ontology/> 

SELECT ?person WHERE { 
  SERVICE <http://dbpedia.org/sparql> {?person a dbo:Person }
  SERVICE <https://query.wikidata.org/sparql> { ?person wdt:P31 wd:Q5 }
}

to query both DBpedia and wikidata, and something like this:

SELECT ?instance_of ?label_he ?label_en ?place_of_birthLabel ?date_of_birth ?place_of_death ?place_of_deathLabel ?date_of_death ?URL WHERE {
  ?instance_of rdfs:label ?label_he.
  ?instance_of rdfs:label ?label_en.
  ?instance_of wdt:P31 wd:Q5.
  ?instance_of wdt:P19 ?place_of_birth.
  ?instance_of wdt:P569 ?date_of_birth.
  ?instance_of wdt:P20 ?place_of_death.
  ?instance_of wdt:P570 ?date_of_death.
  OPTIONAL { ?instance_of wdt:P31 ?record_label. }
  OPTIONAL { ?instance_of wdt:P31 ?instance_of. }
  OPTIONAL { ?instance_of wdt:P2699 ?URL. }
  FILTER(((LANG(?label_he)) = "he") && ((LANG(?label_en)) = "en"))
}

But I don't know how to add a specific name to find each time, and how to combine the query with the first code.

Can someone help? Thank You!

4

0 回答 0