How to get all organizations from DBPedia?

How can I get a list of all organizations from DBpedia? By "organization" I mean an object of any type that is either an organization or any subclass of an organization.

I found a question. How to get all companies from DBPedia? , but this does not work in the current web version of DBpedia SPARQL, and I could not adapt the query.

+4
source share
2 answers

To simply get all the resources that are an instance dbo:Organizationor its subclass:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?org { ?org a/rdfs:subClassOf* dbo:Organisation . }

, , DBpedia . , , LIMIT OFFSET, :

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?org {
  SELECT DISTINCT ?org {
    ?org a/rdfs:subClassOf* dbo:Organisation .
 } ORDER BY ?org
}
LIMIT 10000 OFFSET 0

10000 . 10000, 10000 : LIMIT 10000 OFFSET 10000. , 10000 OFFSET 20000 ..

+3

, , :

PREFIX  rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX    o: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT DISTINCT   ?orgURI ?orgName ?Wikipedia_page

WHERE {
           ?orgURI  a                  o:Organisation .

OPTIONAL { ?orgURI  rdfs:label         ?orgName . 
                    FILTER (lang(?orgName) = "en") }

OPTIONAL { ?orgURI  ^foaf:primaryTopic ?Wikipedia_page }

}

ORDER BY ?orgName

350033 , http://dbpedia.org/ontology/Organisation.

http://dbpedia.org/ontology/Organisation, , , rdfs:subClassOf:

?orgURI  a/rdfs:subClassOf*  o:Organisation
+3

All Articles