Hi all,

I am very new to SPARQL and DBPedia type properties. I like to get a persons nationality or all asoociated countries , job titles of that person and companies associated with.

Please help me to create a SPARQL query for above. I tried the SPARQL end point and create a CONSTRUCT query using examples like

CONSTRUCT { http://dbpedia.org/resource/Steve_Jobs ?p ?o } WHERE { http://dbpedia.org/resource/Steve_Jobs ?p ?o . }

And i got output in N-Triples format , there i can find birthPlace,Occupation etc..But its not specifically pointed what is nationality , what is the company and what is the job title. Is there any such properties / types in DBPedia ?

Sorry if i am missing anything.

Thanks,

asked 03 Jan '13, 01:06

sreejiths's gravatar image

sreejiths
112
accept rate: 0%


http://dbpedia.org/property/nationality is intended to indicate his nationality,

http://dbpedia.org/property/boards should indicate the boards he sat on, while http://dbpedia.org/property/occupation will indicate a mix of titles and companies (its dissappointing that we don't have the title at a specific company - but much of that is down to weaknesses of extracting wikipedia infoboxes)

There is also classes such as http://dbpedia.org/class/yago/DisneyPeople which might or might not be useful for you (the class doesnt explicitly define that these people worked for Disney - it relies on us figuring it out from the label)

To explicitly extract these properties we need to add them in to our query

CONSTRUCT {
<http://dbpedia.org/resource/Steve_Jobs> <http://dbpedia.org/property/nationality> ?nationality.
<http://dbpedia.org/resource/Steve_Jobs> <http://dbpedia.org/property/boards> ?boards.
<http://dbpedia.org/resource/Steve_Jobs> <http://dbpedia.org/property/occupation> ?occupation.
}
WHERE{ 
<http://dbpedia.org/resource/Steve_Jobs> <http://dbpedia.org/property/nationality> ?nationality.
<http://dbpedia.org/resource/Steve_Jobs> <http://dbpedia.org/property/boards> ?boards.
<http://dbpedia.org/resource/Steve_Jobs> <http://dbpedia.org/property/occupation> ?occupation.
}

There is a CONSTRUCT WHERE shortcut in SPARQL 1.1 - http://www.w3.org/TR/sparql11-query/#constructWhere but it doesnt seem to be supported at present in dbpedia

Also consider a SELECT query

permanent link

answered 03 Jan '13, 05:57

Sweet%20Burlap's gravatar image

Sweet Burlap
2.7k38
accept rate: 18%

Thank you @Sweet Burlap for answering. I may face a problem to find appropriate properties for a particular type entity. I have a raw person list and i dont know the category of person like Politician,Entrepreneur,Author etc.

What i found from a simple querying of Steve Jobs and Barack Obama is that the properties are not same.

Hence i can not look for a fixed defined properties. Is not DBPedia offers a common property mapping point for different properties ?

(03 Jan '13, 07:07) sreejiths sreejiths's gravatar image

The data can be a bit dirty alright - there can be several different properties that indicate similar/same points. Sometimes to make a query more general, you will need to expand the query to include properties such as http://dbpedia.org/property/profession use OPTIONAL liberally so the query doesnt require that people have all of the properties that you specify. In an ideal world, the ontology should be able to confer the equivalence of the properties and perform this automatically, unfortunately dbpedia needs manual tuning

(03 Jan '13, 07:32) Sweet Burlap Sweet%20Burlap's gravatar image

Thanks for the pointer @Sweet Burlap. That OPTIONAL may help me. Can i get a list of which all categories of persons currently included in DBPedia ? So that i can make a manual verification of the needed categories , its properties and i can configure my SPARQL query.Is there any other Knowledge bases which infers information from DBPedia and make a concise or common type/property which is useful for my requirement ? My requirement is , i have a list of person and i like to create a "valid" relation ship like , Person to Company , Person to Country and Person to Job Titles.

(04 Jan '13, 01:35) sreejiths sreejiths's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,299
×275

question asked: 03 Jan '13, 01:06

question was seen: 1,408 times

last updated: 04 Jan '13, 01:35