Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let's start from the beginning, as you don't say what you have tried.</p> <p>DBpedia is a database of information about so-called <strong>resources</strong>: facts derived from Wikipedia articles stored as RDF triples. Resources are identified by URIs; DBpedia uses the form <code>http://dbpedia.org/resource/*</code> where <code>*</code> is the same as <code>*</code> in <code>http://en.wikipedia.org/wiki/*</code>.</p> <p>So DBpedia has facts about the resource <a href="http://dbpedia.org/resource/France" rel="nofollow">http://dbpedia.org/resource/France</a>. If you look up this resource in your browser, you will be redirected to <a href="http://dbpedia.org/page/France" rel="nofollow">http://dbpedia.org/page/France</a>, because the country France cannot be displayed in your browser but the description of it can.</p> <p>Among the facts DBpedia knows is </p> <pre><code>&lt;http://dbpedia.org/resource/France&gt; &lt;http://dbpedia.org/ontology/language&gt; &lt;http://dbpedia.org/resource/French_language&gt; </code></pre> <p>which basically says "France['s] language [is] the French language."</p> <p>To get this fact via an API, you can use the standard RDF query language and protocol <a href="http://www.w3.org/TR/rdf-sparql-query/" rel="nofollow">SPARQL</a>. The <a href="http://dbpedia.org/sparql" rel="nofollow">DBpedia SPARQL endpoint</a>, which is where you send SPARQL queries to DBpedia, has a web form to let you enter and submit queries. If you just want an HTML table showing what language is spoken in France, leave the form's settings at the defaults and use:</p> <pre><code>select ?language ?languageName where { dbpedia:France dbpedia-owl:language ?language . ?language rdfs:label ?languageName . } </code></pre> <p>which means: "Give me the resource(s) that France uses as a language, and the name(s)."<br> <code>dbpedia:France</code> is short for <code>&lt;http://dbpedia.org/resource/France&gt;</code>, and <code>dbpedia-owl:language</code> is short for <code>&lt;http://dbpedia.org/ontology/language&gt;</code>.</p> <p>If you want countries and the languages that are spoken in those countries, use:</p> <pre><code>select distinct ?country ?language where { ?country a dbpedia-owl:Country . ?country dbpedia-owl:language ?language . } LIMIT 100 </code></pre> <p>which means: "Give me 100 combinations of resources that are countries and the resources that these countries use as language."</p> <p>There are nuances that I left out, but this should get you started.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload