Advertisement
Guest User

Untitled

a guest
Feb 26th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARQL 1.30 KB | None | 0 0
  1.         PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  2.         PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  3.         PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
  4.         PREFIX schema: <http://schema.org/>
  5.    
  6.         SELECT DISTINCT ( MIN( ?lc ) AS ?l ) ( MIN( ?dc ) AS ?d ) ?s
  7.         WHERE {
  8.             ?pLabel rdfs:subPropertyOf* rdfs:label .
  9.             {
  10.                 ?s ?pLabel ?lc .
  11.                 ?lc bif:CONTAINS '''"Barack Obama"''' .
  12.                 FILTER ( LCASE( STR( ?lc ) ) = "barack obama"@en || LCASE( STR( ?lc ) ) = "barack obama" )
  13.             }
  14.             {
  15.                 ?s rdf:type ?someType .
  16.                 FILTER NOT EXISTS {
  17.                     ?s rdf:type <http://www.w3.org/2002/07/owl#Class> .
  18.                 }
  19.                 FILTER NOT EXISTS {
  20.                     ?someSubClass rdfs:subClassOf ?s .
  21.                 }
  22.                 FILTER NOT EXISTS {
  23.                     ?s rdfs:subClassOf ?someSuperClass .
  24.                     }
  25.             }
  26.             OPTIONAL {
  27.                 ?s <schema:description> ?dc .
  28.                 FILTER ( LANGMATCHES( LANG( ?dc ), "en" ) )
  29.             }
  30.             OPTIONAL {
  31.                 ?s schema:description ?dc .
  32.             }
  33.         }
  34.         GROUP BY ?s LIMIT 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement