Commit d3bf0b26 authored by Alberto Pascual's avatar Alberto Pascual
Browse files

queries json format fixes

parent 8346b8dc
Pipeline #408 passed with stages
in 14 seconds
......@@ -208,7 +208,6 @@
</yasgui-ui>
</div>
<div>
<br>
This demo shows GSI-Crawler functionalities in the context of the project Trivalent. The system is aimed at crawling from a variety of data sources including news web sites such as CNN and New York Times, as well as social media platforms, like Twitter. The presented demo is the result of the ingest of the crawled online data and posterior analysis and semantic augmentation of said data. The resulting information is stored in both ElastiSearch and Fuseki databases, which allows the user to consult the data is a variety of forms, as showed.
<br><br>
For a quick overview of the funtionalities of the demo, please watch the following video:
......
[{"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 dcterms: <http://purl.org/dc/terms/> \n \nSELECT DISTINCT ?headline ?entity \nWHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?entities . \n ?entities rdfs:subClassOf ?entity . \n ?entities rdfs:subClassOf ?country . \n SERVICE <http://dbpedia.org/sparql> { \n ?country dcterms:subject dbr:Category:Countries_in_Europe . \n} \n \n} \nLIMIT 100\n "},{"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 ?entityURI \nWHERE { \n ?article a schema:NewsArticle .\n ?article schema:headline ?headline . \n ?article me:hasEntities ?entity .\n ?entity rdfs:subClassOf ?entityURI .\n ?entity rdfs:subClassOf dbr:Islamic_State_of_Iraq_and_the_Levant\n \n}\nLIMIT 25"},{"name":"Show the sentiment of articles", "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#>\n\nSELECT ?headline ?sentiment \n WHERE { \n?article a schema:NewsArticle .\n?article schema:headline ?headline . \n?article marl:hasOpinion ?opinion . \n?opinion marl:hasPolarity ?sentiment . \n}\nLIMIT 25\n"},{"name":"How many opinions are positive, neutral or neutral on each news?","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://gsi.dit.upm.es/ontologies/wnaffect/ns#>\nPREFIX sc: <http://purl.org/science/owl/sciencecommons/>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX sioc: <http://rdfs.org/sioc/ns#>\nPREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#>\n SELECT ?article\n (COUNT(DISTINCT ?opinionTextPositive) AS ?positives) \n (COUNT(DISTINCT ?opinionTextNegative) AS ?negatives) \n (COUNT(DISTINCT ?opinionTextNeutral) AS ?neutral) \n WHERE {\n{\n ?blogpost a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity marl:Positive .\n ?opinion nif:anchorOf ?opinionTextPositive .\n}\n UNION \n {\n ?article a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity marl:Negative .\n ?opinion nif:anchorOf ?opinionTextNegative .\n\n}\n UNION \n {\n ?article a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity marl:Neutral .\n ?opinion nif:anchorOf ?opinionTextNeutral .\n}\n} GROUP BY ?article"}, {"name":"Which topics are mentioned in the news allocated in 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 <https://www.w3.org/TR/rdf-schema/#ch_subClassOf> dbr:Syria \n }"}, {"name":"How many news are allocated in 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 wna: <http://www.gsi.dit.upm.es/ontologies/wnaffect/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 \n SELECT (COUNT(DISTINCT ?article) AS ?count) WHERE { \n ?article a schema:NewsArticle . \n ?article me:hasEntities ?entity . \n ?entity rdfs:subClassOf dbr:Syria . \n }"}, {"name": "In which articles and tweets 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/>\n\nSELECT DISTINCT ?text ?location \nWHERE { \n {\n ?tweet a schema:BlogPosting .\n ?tweet schema:articleBody ?text .\n ?tweet me:hasEntities ?entity .\n }\n UNION {\n ?article a schema:NewsArticle .\n ?article schema:headline ?text .\n ?article me:hasEntities ?entity .\n }\n ?entity rdfs:subClassOf ?location . \n SERVICE <http://dbpedia.org/sparql> {\n ?location rdf:type dbo:PopulatedPlace\n }\n}\nLIMIT 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 dcterms: <http://purl.org/dc/terms/> \n \nSELECT DISTINCT ?headline ?entity \nWHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?entities . \n ?entities rdfs:subClassOf ?entity . \n ?entities rdfs:subClassOf ?country . \n SERVICE <http://dbpedia.org/sparql> { \n ?country dcterms:subject dbr:Category:Countries_in_Europe . \n} \n \n} \nLIMIT 100\n"},{"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 ?entityURI \nWHERE { \n ?article a schema:NewsArticle .\n ?article schema:headline ?headline . \n ?article me:hasEntities ?entity .\n ?entity rdfs:subClassOf ?entityURI .\n ?entity rdfs:subClassOf dbr:Islamic_State_of_Iraq_and_the_Levant\n \n}\nLIMIT 25"},{"name":"Show the sentiment of articles", "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#>\n\nSELECT ?headline ?sentiment \n WHERE { \n?article a schema:NewsArticle .\n?article schema:headline ?headline . \n?article marl:hasOpinion ?opinion . \n?opinion marl:hasPolarity ?sentiment . \n}\nLIMIT 25\n"},{"name":"How many opinions are positive, neutral or neutral on each news?","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://gsi.dit.upm.es/ontologies/wnaffect/ns#>\nPREFIX sc: <http://purl.org/science/owl/sciencecommons/>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX sioc: <http://rdfs.org/sioc/ns#>\nPREFIX nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#>\n SELECT ?article\n (COUNT(DISTINCT ?opinionTextPositive) AS ?positives) \n (COUNT(DISTINCT ?opinionTextNegative) AS ?negatives) \n (COUNT(DISTINCT ?opinionTextNeutral) AS ?neutral) \n WHERE {\n{\n ?blogpost a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity marl:Positive .\n ?opinion nif:anchorOf ?opinionTextPositive .\n}\n UNION \n {\n ?article a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity marl:Negative .\n ?opinion nif:anchorOf ?opinionTextNegative .\n\n}\n UNION \n {\n ?article a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity marl:Neutral .\n ?opinion nif:anchorOf ?opinionTextNeutral .\n}\n} GROUP BY ?article"}, {"name":"Which topics are mentioned in the news allocated in 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 <https://www.w3.org/TR/rdf-schema/#ch_subClassOf> dbr:Syria \n }"}, {"name":"How many news are allocated in 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 wna: <http://www.gsi.dit.upm.es/ontologies/wnaffect/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 \n SELECT (COUNT(DISTINCT ?article) AS ?count) WHERE { \n ?article a schema:NewsArticle . \n ?article me:hasEntities ?entity . \n ?entity rdfs:subClassOf dbr:Syria . \n }"}, {"name": "In which articles and tweets 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/>\n\nSELECT DISTINCT ?text ?location \nWHERE { \n {\n ?tweet a schema:BlogPosting .\n ?tweet schema:articleBody ?text .\n ?tweet me:hasEntities ?entity .\n }\n UNION {\n ?article a schema:NewsArticle .\n ?article schema:headline ?text .\n ?article me:hasEntities ?entity .\n }\n ?entity rdfs:subClassOf ?location . \n SERVICE <http://dbpedia.org/sparql> {\n ?location rdf:type dbo:PopulatedPlace\n }\n}\nLIMIT 100"}]
Markdown is supported
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