{
  "templates" : {
    "predicates" : "SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p",
    "num_predicates" : "{SELECT (COUNT(DISTINCT ?p) as ?count) WHERE {?s ?p ?o}} BIND (1 as ?num_predicates) BIND(0 as ?prop) BIND (0 as ?truthy) BIND (0 as ?label) BIND(0 as ?type) BIND(0 as ?description) BIND(0 as ?meta) BIND (0 as ?num_triples) BIND(0 as ?num_subjects)",
    "num_subjects" : "{SELECT (COUNT(DISTINCT ?s) as ?count) WHERE {?s ?p ?o}} BIND (1 as ?num_subjects) BIND(0 as ?prop) BIND (0 as ?truthy) BIND (0 as ?label) BIND(0 as ?type) BIND(0 as ?description) BIND(0 as ?meta) BIND (0 as ?num_triples) BIND(0 as ?num_predicates)",
    "num_triples" : "{SELECT (COUNT(?p) as ?count) WHERE {?s ?p ?o}} BIND(1 as ?num_triples) BIND(0 as ?prop) BIND (0 as ?truthy) BIND (0 as ?label) BIND(0 as ?type) BIND(0 as ?description) BIND(0 as ?meta) BIND (0 as ?num_predicates) BIND(0 as ?num_subjects)",
    "category_names" : "VALUES (?prop ?truthy ?label ?type ?description ?meta ?num_predicates ?num_subjects ?num_triples ?category) {\r\n    (0 0 0 0 0 0 0 0 0 \"other\") (1 0 0 0 0 0 0 0 0 \"reified\") (0 1 0 0 0 0 0 0 0 \"normal\") \r\n\t(0 0 1 0 0 0 0 0 0 \"label\") (0 0 0 1 0 0 0 0 0 \"type\") (0 0 0 0 1 0 0 0 0 \"description\") \r\n\t(0 0 0 0 0 1 0 0 0 \"meta\") (0 0 0 0 0 0 1 0 0 \"num predicates\") (0 0 0 0 0 0 0 1 0 \"num subjects\") \r\n\t(0 0 0 0 0 0 0 0 1 \"num triples\") }",
    "statistics" : "%PREFIXES%\nSELECT ?category (SUM(?count) as ?num_total) (100 * SUM(?count) / MAX(?total) as ?percent) WHERE { {{%CONTENT% } BIND(SUM(?count) AS ?total)\r\nBIND (0 as ?num_predicates).\n BIND (0 as ?num_subjects).\nBIND (0 as ?num_triples)\n} UNION {\n %NUM_PREDICATES%\n} UNION {\n %NUM_SUBJECTS% \n} UNION {\n%NUM_TRIPLES%\n}\n %CATEGORY_NAMES% \n} GROUP BY ?category"
  },
  "statistics" : {
    "wikidata" : {
      "kg-name": "Wikidata",
      "order" : 0,
      "prefixes" : "PREFIX wikibase: <http:\/\/wikiba.se\/ontology#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX p: <http:\/\/www.wikidata.org\/prop\/>\r\nPREFIX ps: <http:\/\/www.wikidata.org\/prop\/statement\/>\r\nPREFIX pq: <http:\/\/www.wikidata.org\/prop\/qualifier\/>\r\nPREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX schema: <http:\/\/schema.org\/>\r\nPREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX prov: <http:\/\/www.w3.org\/ns\/prov#>\r\nPREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>",
      "content" : "SELECT * WHERE {\r\n  {%PREDICATES%}\r\n  BIND (REGEX (?p, \"<http:\/\/wikiba.se\/ontology#quantity\") || REGEX (?p, \"<http:\/\/wikiba.se\/ontology#geo\") || (REGEX(?p, \"<http:\/\/www.wikidata.org\/prop\/\") && !REGEX(?p, \"<http:\/\/www.wikidata.org\/prop\/direct\")) as ?prop)\r\n  BIND (REGEX(?p, \"<http:\/\/www.wikidata.org\/prop\/direct\") && ?p != wdt:P31 && ?p != wdt:P279 || ?p = wikibase:grammaticalFeature as ?truthy)\r\n  BIND (?p = rdfs:label || ?p = schema:name || ?p = skos:prefLabel || ?p = skos:altLabel AS ?label)\r\n  BIND (?p = schema:description AS ?description)\r\n  BIND (?p = rdf:type || ?p = wdt:P31 || ?p = wdt:P279 AS ?type)\r\n  BIND((REGEX (?p, \"<http:\/\/schema.org\/\") || ?p = wikibase:rank || ?p = prov:wasDerivedFrom || ?p = wikibase:statements || ?p = wikibase:identifiers || ?p = wikibase:sitelinks) && !?label && !?description AS ?meta)\r\n    }"
    },
    "uniprot" : {
      "order" : 4,
      "kg-name": "Uniprot",
      "prefixes" : "PREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX up: <http:\/\/purl.uniprot.org\/core\/>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>\r\nPREFIX faldo: <http:\/\/biohackathon.org\/resource\/faldo#>",
      "content" : "SELECT * WHERE {\r\n  { %PREDICATES% }\r\n  BIND (?p = rdf:predicate || ?p = rdf:object || ?p = rdf:subject || ?p = rdf:value || ?p = up:annotation as ?prop)\r\n  BIND (?p = up:organism || ?p = up:sequenceFor || ?p = up:encodedBy || ?p = up:proteome || ?p = faldo:position || ?p = rdfs:seeAlso || ?p = up:signatureSequenceMatch || ?p = up:member as ?truthyIn)\r\n  BIND (?p = up:structuredName || ?p = skos:prefLabel || ?p = rdfs:label || ?p = up:structuredNameType || ?p = up:fullName AS ?label)\r\n  BIND (?p = rdf:comment || ?p = rdfs:comment AS ?description)\r\n  BIND (?p = rdf:type AS ?type)\r\n  BIND (?p = up:attribution || ?p = up:modified || ?p = up:version || ?p = up:created || ?p = up:reportedVersion || ?p = up:obsolete || ?p = faldo:reference || ?p = up:evidence || ?p = up:source || ?p = up:md5Checksum AS ?meta)\r\n  BIND (!?prop && !?label && !?description && !?type && !?meta || ?truthyIn AS ?truthy)\r\n }"
    },
    "dblp" : {
      "kg-name": "DBLP",
      "order" : 6,
      "prefixes" : "PREFIX owl: <http:\/\/www.w3.org\/2002\/07\/owl#>\r\nPREFIX dblp: <https:\/\/dblp.org\/rdf\/schema#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX datacite: <http:\/\/purl.org\/spar\/datacite\/>\r\nPREFIX literal: <http:\/\/purl.org\/spar\/literal\/>",
      "content" : "SELECT * WHERE {{\r\n  %PREDICATES%}\r\n  BIND (?p = datacite:hasIdentifier || ?p = datacite:hasLiteralValue || ?p = datacite:usesIdentifierScheme || ?p = literal:hasLiteralValue || ?p = dblp:hasSignature || REGEX(?p, \"<https:\/\/dblp.org\/rdf\/schema#signature\") as ?prop)\r\n  BIND (?p = rdfs:label || ?p = dblp:title AS ?label)\r\n  BIND (REGEX(?p, \"<https:\/\/dblp.org\/rdf\/schema#\") && !?label && !?prop as ?truthy)\r\n  BIND (0 AS ?description)\r\n  BIND (?p = rdf:type AS ?type)\r\n  BIND (?p = owl:sameAs AS ?meta)\r\n  }"
    },
    "pubchem" : {
      "kg-name": "PubChem",
      "order" : 5,
      "prefixes" : "PREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX sio: <http:\/\/semanticscience.org\/resource\/>\r\nPREFIX cito: <http:\/\/purl.org\/spar\/cito\/>\r\nPREFIX dcterms: <http:\/\/purl.org\/dc\/terms\/>\r\nPREFIX fabio: <http:\/\/purl.org\/spar\/fabio\/>\r\nPREFIX vocab: <http:\/\/rdf.ncbi.nlm.nih.gov\/pubchem\/vocabulary#>\r\nPREFIX obo: <http:\/\/purl.obolibrary.org\/obo\/>",
      "content" : "SELECT * WHERE {{ %PREDICATES% }\r\n  BIND (?p = fabio:hasSubjectTerm || ?p = fabio:hasPrimarySubjectTerm || ?p = sio:SIO_000008 || ?p = sio:SIO_000011 || ?p = sio:SIO_000221 || ?p = cito:discusses || ?p = dcterms:date || ?p = dcterms:bibliographicCitation\r\n         || ?p = cito:isDiscussedBy || ?p = dcterms:source || ?p = cito:isCitedBy as ?prop) \r\n  BIND ( ?p = dcterms:modified || ?p = dcterms:available as ?meta)\r\n  BIND (?p = rdf:type AS ?type)\r\n  BIND (?p = sio:SIO_000300 AS ?label)\r\n  BIND (REGEX(?p, \"<http:\/\/semanticscience.org\/resource\/CHEMINF\") || ?p = vocab:PubChemAssayOutcome ||\r\n        ?p = obo:RO_0000056 || ?p = obo:IAO_0000136 || ?p = obo:OBI_0000299 as ?truthy) BIND(0 AS ?description) }"
    },
    "osm-planet" : {
      "kg-name": "OSM",
      "order" : 7,
      "prefixes" : "PREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX osm: <https:\/\/www.openstreetmap.org\/>\r\nPREFIX osmkey: <https:\/\/www.openstreetmap.org\/wiki\/Key:>\r\nPREFIX osm2rdf: <https:\/\/osm2rdf.cs.uni-freiburg.de\/rdf#>",
      "content" : "SELECT * WHERE {{ %PREDICATES% } BIND (?p = osmkey:name AS ?label)\r\n  BIND (?p = osm2rdf:intersects_nonarea || ?p = osm2rdf:contains_nonarea || ?p = osm2rdf:intersects_area || ?p = osm2rdf:intersects_area as ?prop)\r\n  BIND (?p = rdf:type AS ?type)\r\n  BIND (!?label && !?prop && !?type AS ?truthy)\r\n  BIND (0 AS ?description)\r\n  BIND (0 AS ?meta) } "
    },
    "yago-3" : {
      "kg-name": "YAGO 3",
      "order" : 3,
      "prefixes" : "PREFIX owl: <http:\/\/www.w3.org\/2002\/07\/owl#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX yago: <http:\/\/yago-knowledge.org\/resource\/>\r\nPREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>",
      "content" : "SELECT * WHERE {{ %PREDICATES% }  BIND (0 as ?prop)\r\n  BIND (?p = rdfs:label || ?p = yago:redirectedFrom || ?p = skos:prefLabel AS ?label)\r\n  BIND (0 AS ?description)\r\n  BIND (?p = rdf:type || ?p = rdfs:subClassOf AS ?type)\r\n  BIND (?p = owl:sameAs AS ?meta)\r\n  BIND (!?label && !?type && !?meta as ?truthy) }"
    },
    "dbpedia" : {
      "order" : 2,
      "kg-name": "DBpedia",
      "prefixes" : "PREFIX owl: <http:\/\/www.w3.org\/2002\/07\/owl#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX yago: <http:\/\/yago-knowledge.org\/resource\/>\r\nPREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>\r\nPREFIX dbo: <http:\/\/dbpedia.org\/ontology\/>\r\nPREFIX dc: <http:\/\/purl.org\/dc\/terms\/>\r\nPREFIX prov: <http:\/\/www.w3.org\/ns\/prov#>",
      "content" : "SELECT * WHERE {{ %PREDICATES% }  BIND (0 as ?prop)\r\n  BIND (?p = rdfs:label || ?p = yago:redirectedFrom || ?p = skos:prefLabel AS ?label)\r\n  BIND (?p = rdfs:comment || ?p = dbo:abstract AS ?description)\r\n  BIND (?p = rdf:type || ?p = rdfs:subClassOf || ?p = dc:subject AS ?type)\r\n  BIND (?p = owl:sameAs || ?p = prov:wasDerivedFrom AS ?meta)\r\n  BIND (!?label && !?description && !?type && !?meta AS ?truthy) }"
    }
  },
  "queries" : {
    "statistics-freebase": {
      "kg": "freebase",
      "order" : 1,
      "kg-name" : "Freebase",
      "query": "PREFIX fb: <http:\/\/rdf.freebase.com\/ns\/>\r\nPREFIX rdf: <http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nSELECT (?label as ?category) (?count as ?num_total) ?percent WHERE {\r\n{SELECT ?categoryLabel ?count ?percent WHERE {\r\n{SELECT (SUM(?count_total) as ?sum_count_total) ?category (SUM(?actualReified) as ?sum_actualReified) (SUM(?actualDirect) as ?sum_actualDirect) WHERE {\r\n{SELECT ?p (COUNT(?p) AS ?count_total) WHERE {\r\n  { SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p }\r\n  ?x ?p ?y .\r\n  }\r\nGROUP BY ?p\r\nORDER BY DESC(?count_total)}\r\nBIND (?p = fb:common.notable_for.display_name || ?p = fb:type.object.name || ?p = rdfs:label || ?p = fb:common.topic.alias AS ?label)\r\n  BIND (?p = fb:type.object.type || ?p = rdf:type || ?p = fb:type.type.instance || ?p = fb:common.notable_for.notable_object || ?p = fb:common.notable_for.object || ?p = fb:common.notable_for.predicate || ?p = fb:common.topic.notable_types || ?p = fb:common.topic.notable_for || ?p = fb:kg.object_profile.prominent_type || ?p = fb:common.topic.article AS ?type)\r\n  BIND (?p = fb:type.object.key || ?p = fb:common.topic.topic_equivalent_webpage || REGEX(?p, \"<http:\/\/rdf.freebase.com\/key\/\") || ?p = fb:type.object.permission || ?p = fb:type.permission.controls || ?p = fb:common.document.source_uri || ?p = fb:dataworld.gardening_hint.last_referenced_by || ?p = fb:dataworld.gardening_hint.replaced_by AS ?meta)\r\n  BIND (?p = fb:common.topic.description || ?p = fb:common.document.text || ?p = fb:common.topic.description || ?p = fb:common.document.text AS ?description)\r\n  VALUES (?label ?type ?description ?meta ?category) {\r\n    ( 0 0 0 0 50) ( 1 0 0 0 51)\r\n\t( 0 1 0 0 52) ( 0 0 1 0 53) ( 0 0 0 1 54) }\r\nOPTIONAL{\r\nSELECT ?p (COUNT(?p) - 1 AS ?count_direct) WHERE {\r\n  {\r\n  { {SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p} FILTER (?count < 10000000) }\r\n  ?x ?p ?y .\r\n  ?x @en@fb:type.object.name ?name_x .\r\n  ?y @en@fb:type.object.name ?name_y .\r\n  } UNION {\r\n  { SELECT ?p (COUNT(?p) AS ?count) WHERE { ?s ?p ?o } GROUP BY ?p }\r\n  }\r\n} \r\nGROUP BY ?p\r\nORDER BY DESC(?count_direct)\r\n}\r\nBIND (?count_total - ?count_direct AS ?count_reified)\r\nBIND (?count_reified * (?category = 50) AS ?actualReified)\r\nBIND (?count_direct * (?category = 50) AS ?actualDirect)\r\n} GROUP BY ?category }\r\nBIND(?category = 50 AS ?isOther)\r\nVALUES (?isOther ?useReified ?useDirect) { (0 0 0) (1 1 0) (1 0 1) }\r\nBIND ((!?isOther) * ?sum_count_total + ?useReified * ?sum_actualReified + ?useDirect * ?sum_actualDirect AS ?count)\r\n#VALUES (?category ?useReified ?categoryLabel) {\r\n# (50 1 \"reified\") (50 0 \"direct\") (51 0 \"label\") (52 0 \"type\") (53 0 \"description\") (54 0 \"meta\")\r\n#}\r\nVALUES (?category ?useReified ?categoryLabel) {\r\n (50 1 100) (50 0 101) (51 0 102) (52 0 103) (53 0 104) (54 0 105)\r\n}\r\nBIND (SUM(?count) AS ?total)\r\nBIND (100.0 * ?count \/ ?total as ?percent)\r\n}\r\n} UNION {\r\n {SELECT (COUNT(DISTINCT ?p) as ?count) WHERE {?s ?p ?o}} BIND (200 as ?categoryLabel)\r\n} UNION {\r\n {SELECT (COUNT(DISTINCT ?s) as ?count) WHERE {?s ?p ?o}} BIND (201 as ?categoryLabel) \r\n} UNION {\r\n{SELECT (COUNT(?p) as ?count) WHERE {?s ?p ?o}} BIND (202 as ?categoryLabel) \r\n}\r\nVALUES (?categoryLabel ?label) {\r\n (100 \"reified\") (101 \"normal\") (102 \"label\") (103 \"type\") (104 \"description\") (105 \"meta\") (200 \"num predicates\") (201 \"num subjects\") (202 \"num triples\")\r\n}\r\n}"
    },
    "oscars-meryl-streep": {
      "kg": "wikidata",
      "query": "PREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX ps: <http:\/\/www.wikidata.org\/prop\/statement\/>\r\nPREFIX pq: <http:\/\/www.wikidata.org\/prop\/qualifier\/>\r\nPREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX p: <http:\/\/www.wikidata.org\/prop\/>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nSELECT ?award_name ?film_name WHERE {\r\n  wd:Q873 p:P166 ?m .\r\n  ?m pq:P1686 ?film_id .\r\n  ?m ps:P166 ?award_id .\r\n  ?award_id wdt:P31 wd:Q19020 .\r\n  ?film_id rdfs:label ?film_name .\r\n  ?award_id rdfs:label ?award_name .\r\n  FILTER (LANG(?film_name) = \"en\") .\r\n  FILTER (LANG(?award_name) = \"en\") .\r\n}"
    },
    "oscar-winners": {
      "kg": "wikidata",
      "query": "PREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX p: <http:\/\/www.wikidata.org\/prop\/>\r\nPREFIX ps: <http:\/\/www.wikidata.org\/prop\/statement\/>\r\nSELECT ?winner_id \r\n       (SAMPLE(?winner_name) AS ?winner)\r\n       (COUNT(?award_id) AS ?count)\r\nWHERE {\r\n  ?winner_id wdt:P31 wd:Q5 .\r\n  ?winner_id p:P166\/ps:P166 ?award_id .\r\n  ?award_id wdt:P31 wd:Q19020 .\r\n  ?winner_id rdfs:label ?winner_name .\r\n  FILTER (LANG(?winner_name) = \"en\") .\r\n}\r\nGROUP BY ?winner_id\r\nORDER BY DESC(?count) ?winner"
    },
    "canadian-astronauts": {
      "kg": "wikidata",
      "query": "PREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nSELECT ?astronaut ?name WHERE {\r\n  ?astronaut wdt:P106 wd:Q11631 .\r\n  ?astronaut wdt:P27 wd:Q16 .\r\n  OPTIONAL { ?astronaut rdfs:label ?name . FILTER (LANG(?name) = \"hi\") . }\r\n  OPTIONAL { ?astronaut rdfs:label ?name . FILTER (LANG(?name) = \"ar\") . }\r\n}"
    },
    "autocompletion-example-1": {
      "kg": "fbeasy",
      "query": "SELECT ?entity ?name (COUNT(?x) AS ?score) WHERE {\r\n?x <is-a> ?entity . \r\nBIND (?entity AS ?name)\r\nFILTER REGEX(STR(?name), \"^P\")\r\n} GROUP BY ?entity ?name ORDER BY DESC(?score)"
    },
    "autocompletion-example-2": {
      "kg": "fbeasy",
      "query": "SELECT ?entity ?name (SAMPLE(?count) as ?score) WHERE {\r\n  { SELECT ?entity (COUNT(DISTINCT ?x) as ?count) WHERE {\r\n    ?x <is-a> <Person> .\r\n    ?x ?entity ?object .\r\n   } GROUP BY ?entity }\r\n  BIND (?entity AS ?name) .\r\n} GROUP BY ?entity ?name ORDER BY DESC(?score)"
    },
    "autocompletion-example-3": {
      "kg": "wikidata",
      "query": "PREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX p: <http:\/\/www.wikidata.org\/prop\/>\r\nPREFIX schema: <http:\/\/schema.org\/>\r\nPREFIX wikibase: <http:\/\/wikiba.se\/ontology#>\r\nSELECT ?entity ?name (COUNT(DISTINCT ?m) AS ?score) WHERE {\r\n  wd:Q873 p:P166 ?m .\r\n  ?m ?entity ?predicate .\r\n  ?entity_normalized ?tmp ?entity.\r\n  ?entity_normalized rdfs:label ?name FILTER (LANG(?name) = \"en\")\r\n} GROUP BY ?entity ?name ORDER BY DESC(?score)"
    },
    "movies-joel-coen": {
      "kg": "wikidata",
      "query": "PREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX schema: <http:\/\/schema.org\/>\r\nPREFIX imdb: <https:\/\/www.imdb.com\/>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nSELECT ?movie ?title ?imdb_votes WHERE {\r\n  ?movie wdt:P31 wd:Q11424 .\r\n  ?movie wdt:P345 ?imdb_id .\r\n  ?movie wdt:P57 wd:Q13595311 .\r\n  ?movie rdfs:label ?title FILTER (LANG(?title) = \"en\") .\r\n  SERVICE <https:\/\/qlever.cs.uni-freiburg.de\/api\/imdb> {\r\n\t?movie_imdb imdb:id ?imdb_id .\r\n    ?movie_imdb imdb:type \"movie\" .\r\n    ?movie_imdb imdb:numVotes ?imdb_votes .\r\n  }\r\n}\r\nORDER BY DESC(?imdb_votes)"
    },
    "persons-name-einstein": {
      "kg": "wikidata",
      "query": "PREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX schema: <http:\/\/schema.org\/>\r\nSELECT ?person_name WHERE {\r\n  ?person wdt:P31 wd:Q5 .\r\n  ?person rdfs:label ?person_name\r\n  FILTER (LANG(?person_name) = \"en\") \r\n  FILTER (REGEX(STR(?person_name), \" Einstein$\"))\r\n}"
    },
    "astronauts-walk-moon-with-regex-filter": {
      "kg": "wikidata",
      "query": "PREFIX wd: <http:\/\/www.wikidata.org\/entity\/>\r\nPREFIX wdt: <http:\/\/www.wikidata.org\/prop\/direct\/>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX schema: <http:\/\/schema.org\/>\r\nSELECT ?astronaut_label ?wikipedia_abstract WHERE {\r\n  ?astronaut wdt:P106 wd:Q11631 .\r\n  ?astronaut rdfs:label ?astronaut_label .\r\n  ?wikipedia schema:about ?astronaut .\r\n  ?wikipedia schema:description ?wikipedia_abstract .\r\n  FILTER (LANG(?astronaut_label) = \"en\")\r\n  FILTER (LANG(?wikipedia_abstract) = \"en\")\r\n  FILTER REGEX(STR(?wikipedia_abstract), \"\\\\bmoon\\\\b\", \"i\")\r\n  FILTER REGEX(STR(?wikipedia_abstract), \"\\\\bwalk\", \"i\")\r\n}"
    },
    "astronauts-walk-moon-with-keyword-matching": {
      "kg": "wikidata",
      "query": "PREFIX wd: <http://www.wikidata.org/entity/>\r\nPREFIX wdt: <http://www.wikidata.org/prop/direct/>\r\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\r\nPREFIX schema: <http://schema.org/>\r\nSELECT ?astronaut_label ?wikipedia_abstract WHERE {\r\n  ?astronaut wdt:P106 wd:Q11631 .\r\n  ?astronaut rdfs:label ?astronaut_label .\r\n  ?wikipedia schema:about ?astronaut .\r\n  ?wikipedia schema:description ?wikipedia_abstract .\r\n  FILTER (LANG(?astronaut_label) = \"en\")\r\n  FILTER (LANG(?wikipedia_abstract) = \"en\")\r\n  ?text ql:contains-entity ?wikipedia_abstract .\r\n  ?text ql:contains-word \"walk* moon\" .\r\n}"
    },
    "astronauts-walk-moon-with-entity-linking": {
      "kg": "wikidata",
      "query": "PREFIX wd: <http://www.wikidata.org/entity/>\r\nPREFIX wdt: <http://www.wikidata.org/prop/direct/>\r\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\r\nPREFIX schema: <http://schema.org/>\r\nSELECT ?astronaut ?astronaut_name (COUNT(?text) AS ?count) (SAMPLE(?text) AS ?example_text) WHERE {\r\n  ?astronaut wdt:P106 wd:Q11631 .\r\n  ?astronaut rdfs:label ?astronaut_name .\r\n  FILTER (LANG(?astronaut_name) = \"en\")\r\n  ?text ql:contains-entity ?astronaut .\r\n  ?text ql:contains-word \"moon walk*\" .\r\n}\r\nGROUP BY ?astronaut ?astronaut_name\r\nORDER BY DESC(?count)"
    }
  }
 }
