Udit Gupta
Udit Gupta

Reputation: 3272

Get list of all wikipedia person entries

Q: I am trying to get list of all persons on wikipedia along with their age, birth_date, death_date(if present) and country.

I am using this dbpedia query which seems to return only 50,000 results which is definitely not true. A lot of entries are missing from here, for e.g. - Mick Jagger, etc.

SELECT ?person ?birthDate ?birthName ?occupation WHERE 
{
 ?person a <http://dbpedia.org/ontology/Person> .
 ?person dbpedia-owl:birthDate ?birthDate .
 ?person dbpedia-owl:birthName ?birthName .
 ?person dbpedia-owl:occupation ?occupation 
}

I also tried some of its variations -

  select ?Person 
  where {
  ?Person a dbpedia-owl:Person 
  }

Can someone provide me some direction on how to achieve the task ? I am first time using DBPedia so It may be the case that I am missing out something trivial.

I need as much data as I can get about persons on earth. (may be millions of person with their age, country and birth_date)and 50k is very less number and it is also missing out some names which are mandatory for me to get.

Upvotes: 1

Views: 267

Answers (1)

Joshua Taylor
Joshua Taylor

Reputation: 85853

It's relatively easy to get all the triples about persons:

select ?s ?p ?o { ?s a dbpedia-owl:Person ; ?p ?o }

Alternatively, you could get the results back as an RDF graph with a construct query:

construct where { ?s a dbpedia-owl:Person ; ?p ?o }

That said, you're going to hit some reasonable limits imposed by the public DBpedia endpoint. After all, your local library might make free photocopies of specific pages of books, but if you blindly ask for a photocopy of every autobiography in the building, they'd be right to refuse you on the grounds that that wouldn't be fair to other patrons. You'll need to download the data and query it locally if you want this sort of data.

Upvotes: 2

Related Questions