Commit 609014b6 authored by Daniel Suarez Souto's avatar Daniel Suarez Souto
Browse files

Fixed problems with sparql queries

parent 01e2132a
ES_ENDPOINT_EXTERNAL=http://sefarad-elasticsearch.cluster.gsi.dit.upm.es
ENDPOINT_EXTERNAL=dashboard-trivalent.cluster.gsi.dit.upm.es
FUSEKI_ENDPOINT_EXTERNAL=http://sefarad-fuseki.cluster.gsi.dit.upm.es
[{"name":"Show news about ISIS", "val":"PREFIX schema: <http://schema.org/> \nPREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \nPREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \nPREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \nPREFIX wnaffect: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX dbr: <http://dbpedia.org/resource/>\n\nSELECT DISTINCT ?headline ?author ?article \nWHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article schema:author ?author . \n ?article me:hasEntities ?entity . \n ?entity schema:name 'ISIL' \n }\nLIMIT 25"},{"name":"Which topics are mentioned in the news about Syria", "val":"PREFIX schema: <http://schema.org/> \n PREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \n Prefix me: <http://www.mixedemotions-project.eu/ns/model#> \n Prefix onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \n PREFIX wnaffect: <http://gsi.dit.upm.es/ontologies/wnaffect/ns#> \n PREFIX sc: <http://purl.org/science/owl/sciencecommons/> \n PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n PREFIX sioc: <http://rdfs.org/sioc/ns#> \n PREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> \n PREFIX schema: <http://schema.org/> \n PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> \n PREFIX emoml: <http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns#> \n PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> \n PREFIX dbpedia: <http://dbpedia.org/resource/> \n PREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> \n prefix onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \n prefix dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#> \n prefix dbo: <http://dbpedia.org/ontology/> \n prefix dbr: <http://dbpedia.org/resource/> \n prefix me: <http://www.mixedemotions-project.eu/ns/model#> \n prefix marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \n prefix prov: <http://www.w3.org/ns/prov#> \n prefix dc: <http://dublincore.org/2012/06/14/dcelements#> \n prefix wna: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#> \n SELECT ?about ?headline ?article \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article schema:about ?about . \n ?article me:hasEntities ?entity . \n ?entity schema:name 'Syria' \n }"}, {"name":"How many news are allocated in Syria?", "val": "PREFIX schema: <http://schema.org/> \n PREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \n SELECT (COUNT(DISTINCT ?article) AS ?count) WHERE { \n ?article a schema:NewsArticle . \n ?article me:hasEntities ?entity . \n ?entity schema:name 'Syria' \n}"}, {"name": "In which articles are mentioned populated places?", "val": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \nPREFIX schema: <http://schema.org/> \nPREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \nPREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \nPREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \nPREFIX wnaffect: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>\nPREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX db: <http://dbpedia.org/> \nPREFIX prov: <http://www.w3.org/ns/prov#> \n\n SELECT DISTINCT ?headline ?place ?article \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?entity . \n ?entity a schema:Place . \n ?entity prov:wasDerivedFrom ?place . \n SERVICE <http://dbpedia.org/sparql> { \n ?place rdf:type dbo:PopulatedPlace \n} \n} \n LIMIT 100"},{"name": "Show me news located in Europe", "val": "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \nPREFIX schema: <http://schema.org/> \nPREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \nPREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \nPREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \nPREFIX wnaffect: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#> \nPREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#> \nPREFIX dbr: <http://dbpedia.org/resource/> \nPREFIX dbo: <http://dbpedia.org/ontology/> \nPREFIX dbc: <http://dbpedia.org/category/> \nPREFIX db: <http://dbpedia.org/> \nPREFIX dct: <http://purl.org/dc/terms/> \nPREFIX prov: <http://www.w3.org/ns/prov#> \n\n SELECT DISTINCT ?headline ?place ?article \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?entity . \n ?entity a schema:Place . \n ?entity prov:wasDerivedFrom ?place . \n SERVICE <http://dbpedia.org/sparql> { \n {?place dbo:country ?country . \n ?country dct:subject dbr:Category:Countries_in_Europe .} \n UNION \n {?place dct:subject dbr:Category:Countries_in_Europe .} \n } \n} \n LIMIT 100 \n"}] [{"name":"Select your query","val":""},{"name":"Show news about ISIS", "val":"PREFIX schema: <http://schema.org/> \nPREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \nPREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \nPREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \nPREFIX wnaffect: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX dbr: <http://dbpedia.org/resource/>\n\nSELECT DISTINCT ?headline ?author ?article \nWHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article schema:author ?author . \n ?article me:hasEntities ?entity . \n ?entity schema:name 'ISIL' \n }\nLIMIT 25"},{"name":"Which topics are mentioned in the news about Syria", "val":"PREFIX schema: <http://schema.org/> \n PREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \n Prefix me: <http://www.mixedemotions-project.eu/ns/model#> \n Prefix onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \n PREFIX wnaffect: <http://gsi.dit.upm.es/ontologies/wnaffect/ns#> \n PREFIX sc: <http://purl.org/science/owl/sciencecommons/> \n PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n PREFIX sioc: <http://rdfs.org/sioc/ns#> \n PREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> \n PREFIX schema: <http://schema.org/> \n PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> \n PREFIX emoml: <http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns#> \n PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> \n PREFIX dbpedia: <http://dbpedia.org/resource/> \n PREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> \n prefix onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \n prefix dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#> \n prefix dbo: <http://dbpedia.org/ontology/> \n prefix dbr: <http://dbpedia.org/resource/> \n prefix me: <http://www.mixedemotions-project.eu/ns/model#> \n prefix marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \n prefix prov: <http://www.w3.org/ns/prov#> \n prefix dc: <http://dublincore.org/2012/06/14/dcelements#> \n prefix wna: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#> \n SELECT ?about ?headline ?article \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article schema:about ?about . \n ?article me:hasEntities ?entity . \n ?entity schema:name 'Syria' \n }"}, {"name":"How many news are allocated in Syria?", "val": "PREFIX schema: <http://schema.org/> \n PREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \n SELECT (COUNT(DISTINCT ?article) AS ?count) WHERE { \n ?article a schema:NewsArticle . \n ?article me:hasEntities ?entity . \n ?entity schema:name 'Syria' \n}"}, {"name": "In which articles are mentioned populated places?", "val": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \nPREFIX schema: <http://schema.org/> \nPREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \nPREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \nPREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \nPREFIX wnaffect: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>\nPREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>\nPREFIX dbr: <http://dbpedia.org/resource/>\nPREFIX dbo: <http://dbpedia.org/ontology/>\nPREFIX db: <http://dbpedia.org/> \nPREFIX prov: <http://www.w3.org/ns/prov#> \n\n SELECT DISTINCT ?headline ?place ?article \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?entity . \n ?entity a schema:Place . \n ?entity prov:wasDerivedFrom ?place . \n SERVICE <http://dbpedia.org/sparql> { \n ?place rdf:type dbo:PopulatedPlace \n} \n} \n LIMIT 100"},{"name": "Show me news located in Europe", "val": "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \nPREFIX schema: <http://schema.org/> \nPREFIX marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> \nPREFIX me: <http://www.mixedemotions-project.eu/ns/model#> \nPREFIX onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> \nPREFIX wnaffect: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#> \nPREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#> \nPREFIX dbr: <http://dbpedia.org/resource/> \nPREFIX dbo: <http://dbpedia.org/ontology/> \nPREFIX dbc: <http://dbpedia.org/category/> \nPREFIX db: <http://dbpedia.org/> \nPREFIX dct: <http://purl.org/dc/terms/> \nPREFIX prov: <http://www.w3.org/ns/prov#> \n\n SELECT DISTINCT ?headline ?place ?article \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?entity . \n ?entity a schema:Place . \n ?entity prov:wasDerivedFrom ?place . \n SERVICE <http://dbpedia.org/sparql> { \n {?place dbo:country ?country . \n ?country dct:subject dbr:Category:Countries_in_Europe .} \n UNION \n {?place dct:subject dbr:Category:Countries_in_Europe .} \n } \n} \n LIMIT 100 \n"}]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment