Commit dac97121 authored by Daniel Suarez Souto's avatar Daniel Suarez Souto
Browse files

Minimal changes

parents cd1dc8d1 ba0c8463
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</div> </div>
<br> <br>
<div class="row"> <!-- <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<number-chart <number-chart
icon="/images/news.ico" icon="/images/news.ico"
...@@ -133,10 +133,49 @@ ...@@ -133,10 +133,49 @@
stylebg="bg-purple"> stylebg="bg-purple">
</number-chart> </number-chart>
</div> </div>
</div> -->
<div class="row">
<div class="col-md-6">
<number-chart
data="{{data}}"
object="http://dbpedia.org/resource/CNN"
aggKey="schema:author"
title="CNN"
icon="/images/cnn_blanco.svg"
stylebg="bg-red">
</number-chart>
<number-chart
data="{{data}}"
object="http://dbpedia.org/resource/The_New_York_Times"
aggKey="schema:author"
title="The New York Times"
icon="/images/times1.png"
stylebg="bg-green">
</number-chart>
</div>
<div class="col-md-6">
<number-chart
data="{{data}}"
object="http://dbpedia.org/resource/Al_Jazeera"
aggKey="schema:author"
title="Al Jazeera"
icon="/images/Aljazeera_blanco.svg"
subtitle="Total"
stylebg="bg-yellow">
</number-chart>
<number-chart
data="{{data}}"
aggKey="type"
object="schema:Article"
title="Magazines"
icon="/images/magazine.svg"
subtitle="Total"
stylebg="bg-purple">
</number-chart>
</div>
</div> </div>
<br> <br>
<div class="row"> <!-- <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<google-chart <google-chart
field="schema:author" field="schema:author"
...@@ -166,7 +205,7 @@ ...@@ -166,7 +205,7 @@
</google-chart> </google-chart>
</div> </div>
</div> </div>
<br> <br> -->
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<entities-chart <entities-chart
...@@ -192,7 +231,21 @@ ...@@ -192,7 +231,21 @@
</div> </div>
<br> <br>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-6">
<google-chart
field="schema:author"
data="{{data}}"
sources="{{sources}}"
id='pie-chart3'
extra-id='pie-chart3'
type='pie'
filters="{{filters}}"
icon='icons:reorder'
options='{"title": "Source"}'
cols='[{"label": "type", "type": "string"},{"label": "Count", "type": "number"}]'>
</google-chart>
</div>
<div class="col-md-6">
<google-chart <google-chart
field="schema:datePublished" field="schema:datePublished"
data="{{data}}" data="{{data}}"
...@@ -212,8 +265,8 @@ ...@@ -212,8 +265,8 @@
<div class="col-md-6"> <div class="col-md-6">
<paper-tabs selected="{{selectedpage}}" style="height: 38px"> <paper-tabs selected="{{selectedpage}}" style="height: 38px">
<paper-tab><iron-icon icon="icons:receipt"></iron-icon> List of news</paper-tab> <paper-tab><iron-icon icon="icons:receipt"></iron-icon> List of news</paper-tab>
<paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Social Media</paper-tab> <!-- <paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Social Media</paper-tab>
<paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Magazines</paper-tab> --> <paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Magazines</paper-tab>
</paper-tabs> </paper-tabs>
<iron-pages class="lists" selected="{{selectedpage}}"> <iron-pages class="lists" selected="{{selectedpage}}">
<div> <div>
...@@ -224,14 +277,14 @@ ...@@ -224,14 +277,14 @@
icon='icons:receipt'> icon='icons:receipt'>
</news-chart> </news-chart>
</div> </div>
<div> <!-- <div>
<tweet-chart <tweet-chart
datos = "{{data}}" datos = "{{data}}"
title="List of tweets" title="List of tweets"
filters="{{filters}}" filters="{{filters}}"
icon='communication:comment'> icon='communication:comment'>
</tweet-chart> </tweet-chart>
</div> </div> -->
<div> <div>
<propaganda-chart <propaganda-chart
...@@ -247,7 +300,7 @@ ...@@ -247,7 +300,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="top-bar"> <div class="top-bar">
<iron-icon icon="maps:my-location"></iron-icon> <iron-icon icon="maps:my-location"></iron-icon>
<span>Geolocated News and Social Media</span> <span>Geolocated News</span>
</div> </div>
<!-- <!--
<leaflet-map fit-to-markers> <leaflet-map fit-to-markers>
...@@ -412,13 +465,13 @@ H2020 RIA Action Grant No. 740934 under the call SEC-06-FCT-2016 — Developing ...@@ -412,13 +465,13 @@ H2020 RIA Action Grant No. 740934 under the call SEC-06-FCT-2016 — Developing
if (this.query.length == 0){ if (this.query.length == 0){
//console.log("default search fired") //console.log("default search fired")
this.search = {} this.filters = []
this._query() this._query()
} }
else { else {
console.log("Filter") console.log("Filter")
//this.push('filters', {terms: {'schema:articleBody': [this.query]}}); this.push('filters', {terms: {'schema:articleBody': [this.query]}});
this.search={"schema:articleBody":{"query":this.query,"operator":"and"}} //this.search={"schema:articleBody":{"query":this.query,"operator":"and"}}
this._query() this._query()
} }
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</div> </div>
<br> <br>
<div class="row"> <!-- <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<number-chart <number-chart
icon="/images/news.ico" icon="/images/news.ico"
...@@ -133,10 +133,49 @@ ...@@ -133,10 +133,49 @@
stylebg="bg-purple"> stylebg="bg-purple">
</number-chart> </number-chart>
</div> </div>
</div> -->
<div class="row">
<div class="col-md-6">
<number-chart
data="{{data}}"
object="http://dbpedia.org/resource/CNN"
aggKey="schema:author"
title="CNN"
icon="/images/cnn_blanco.svg"
stylebg="bg-red">
</number-chart>
<number-chart
data="{{data}}"
object="http://dbpedia.org/resource/The_New_York_Times"
aggKey="schema:author"
title="The New York Times"
icon="/images/times1.png"
stylebg="bg-green">
</number-chart>
</div>
<div class="col-md-6">
<number-chart
data="{{data}}"
object="http://dbpedia.org/resource/Al_Jazeera"
aggKey="schema:author"
title="Al Jazeera"
icon="/images/Aljazeera_blanco.svg"
subtitle="Total"
stylebg="bg-yellow">
</number-chart>
<number-chart
data="{{data}}"
aggKey="type"
object="schema:Article"
title="Magazines"
icon="/images/magazine.svg"
subtitle="Total"
stylebg="bg-purple">
</number-chart>
</div>
</div> </div>
<br> <br>
<div class="row"> <!-- <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<google-chart <google-chart
field="schema:author" field="schema:author"
...@@ -166,7 +205,7 @@ ...@@ -166,7 +205,7 @@
</google-chart> </google-chart>
</div> </div>
</div> </div>
<br> <br> -->
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<entities-chart <entities-chart
...@@ -192,7 +231,21 @@ ...@@ -192,7 +231,21 @@
</div> </div>
<br> <br>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-6">
<google-chart
field="schema:author"
data="{{data}}"
sources="{{sources}}"
id='pie-chart3'
extra-id='pie-chart3'
type='pie'
filters="{{filters}}"
icon='icons:reorder'
options='{"title": "Source"}'
cols='[{"label": "type", "type": "string"},{"label": "Count", "type": "number"}]'>
</google-chart>
</div>
<div class="col-md-6">
<google-chart <google-chart
field="schema:datePublished" field="schema:datePublished"
data="{{data}}" data="{{data}}"
...@@ -212,8 +265,8 @@ ...@@ -212,8 +265,8 @@
<div class="col-md-6"> <div class="col-md-6">
<paper-tabs selected="{{selectedpage}}" style="height: 38px"> <paper-tabs selected="{{selectedpage}}" style="height: 38px">
<paper-tab><iron-icon icon="icons:receipt"></iron-icon> List of news</paper-tab> <paper-tab><iron-icon icon="icons:receipt"></iron-icon> List of news</paper-tab>
<paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Social Media</paper-tab> <!-- <paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Social Media</paper-tab>
<paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Magazines</paper-tab> --> <paper-tab><iron-icon icon="icons:speaker-notes"></iron-icon> Magazines</paper-tab>
</paper-tabs> </paper-tabs>
<iron-pages class="lists" selected="{{selectedpage}}"> <iron-pages class="lists" selected="{{selectedpage}}">
<div> <div>
...@@ -224,14 +277,14 @@ ...@@ -224,14 +277,14 @@
icon='icons:receipt'> icon='icons:receipt'>
</news-chart> </news-chart>
</div> </div>
<div> <!-- <div>
<tweet-chart <tweet-chart
datos = "{{data}}" datos = "{{data}}"
title="List of tweets" title="List of tweets"
filters="{{filters}}" filters="{{filters}}"
icon='communication:comment'> icon='communication:comment'>
</tweet-chart> </tweet-chart>
</div> </div> -->
<div> <div>
<propaganda-chart <propaganda-chart
...@@ -247,7 +300,7 @@ ...@@ -247,7 +300,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="top-bar"> <div class="top-bar">
<iron-icon icon="maps:my-location"></iron-icon> <iron-icon icon="maps:my-location"></iron-icon>
<span>Geolocated News and Social Media</span> <span>Geolocated News</span>
</div> </div>
<!-- <!--
<leaflet-map fit-to-markers> <leaflet-map fit-to-markers>
...@@ -412,13 +465,13 @@ H2020 RIA Action Grant No. 740934 under the call SEC-06-FCT-2016 — Developing ...@@ -412,13 +465,13 @@ H2020 RIA Action Grant No. 740934 under the call SEC-06-FCT-2016 — Developing
if (this.query.length == 0){ if (this.query.length == 0){
//console.log("default search fired") //console.log("default search fired")
this.search = {} this.filters = []
this._query() this._query()
} }
else { else {
console.log("Filter") console.log("Filter")
//this.push('filters', {terms: {'schema:articleBody': [this.query]}}); this.push('filters', {terms: {'schema:articleBody': [this.query]}});
this.search={"schema:articleBody":{"query":this.query,"operator":"and"}} //this.search={"schema:articleBody":{"query":this.query,"operator":"and"}}
this._query() this._query()
} }
......
...@@ -65,6 +65,10 @@ ...@@ -65,6 +65,10 @@
<div style="width: 7px;height: 7px;background-color: #00c0ef; float: left; margin-top: 7px;margin-right: 3px; margin-left: 6px" class="style-scope news-chart"></div> <div style="width: 7px;height: 7px;background-color: #00c0ef; float: left; margin-top: 7px;margin-right: 3px; margin-left: 6px" class="style-scope news-chart"></div>
Person Person
</div> </div>
<div class="leyend_person" style="display: flex; flex-direction: row;">
<div style="width: 7px;height: 7px;background-color: #9b009b; float: left; margin-top: 7px;margin-right: 3px; margin-left: 6px" class="style-scope news-chart"></div>
Category
</div>
</div> </div>
...@@ -73,6 +77,11 @@ ...@@ -73,6 +77,11 @@
<span class="badge badge-secondary" on-tap="highlightEntity" data-id$= "{{getID(news)}}" data-text$="{{getNew(news)}}" style$="{{getBg(entity)}} cursor:pointer;">{{entity.schema:name}}</span> <span class="badge badge-secondary" on-tap="highlightEntity" data-id$= "{{getID(news)}}" data-text$="{{getNew(news)}}" style$="{{getBg(entity)}} cursor:pointer;">{{entity.schema:name}}</span>
</template> </template>
<template is="dom-repeat" items="{{news.taxonomies}}" as="category">
<span class="badge badge-secondary" on-tap="highlightCategory" data-id$= "{{getID(news)}}" data-text$="{{getNew(news)}}" style="background-color: #9b009b;margin-bottom:5px; cursor:pointer;">{{getCategory(category)}}</span>
</template>
</div> </div>
</div> </div>
<div class="col-md-7" style="overflow: hidden; height: 100%;"> <div class="col-md-7" style="overflow: hidden; height: 100%;">
...@@ -189,7 +198,7 @@ ...@@ -189,7 +198,7 @@
var that = this var that = this
var hits = this.datos.hits.hits; var hits = this.datos.hits.hits;
var results = [] var results = []
//console.log(hits) console.log(hits)
hits.forEach(function(entry) { hits.forEach(function(entry) {
//console.log(entry._source) //console.log(entry._source)
if(entry._source['@type']=='schema:NewsArticle') results.push(entry._source); if(entry._source['@type']=='schema:NewsArticle') results.push(entry._source);
...@@ -309,6 +318,11 @@ ...@@ -309,6 +318,11 @@
return "background-color:blue" return "background-color:blue"
} }
}, },
getCategory: function(category){
var arr=category["rdfs:label"].split("/")
//console.log(arr[arr.length-1])
return arr[arr.length-1]
},
highlightEntity: function(e) { highlightEntity: function(e) {
var id = e.target.dataset.id var id = e.target.dataset.id
...@@ -341,6 +355,51 @@ ...@@ -341,6 +355,51 @@
$('#'+element.parentElement.id).animate({scrollTop: $('#'+element.parentElement.id).scrollTop() + $('#'+element.parentElement.id + ' span').position().top - 200}, 400) $('#'+element.parentElement.id).animate({scrollTop: $('#'+element.parentElement.id).scrollTop() + $('#'+element.parentElement.id + ' span').position().top - 200}, 400)
} }
}, },
highlightCategory: function(e) {
console.log(e)
var id = e.target.dataset.id
var element = document.getElementById(id)
var text = e.target.dataset.text
var text_highlighted= ""
var beginIndex = e.model.__data__.category["nif:beginIndex"]
var endIndex = e.model.__data__.category["nif:endIndex"]+1
var cnt=0
console.log(beginIndex)
console.log(endIndex)
var subtext = text.substring(0,beginIndex)
if (beginIndex >= 0) {
text = text.substring(0,beginIndex) + "<span class='highlight' style='background-color:yellow'>" + text.substring(beginIndex,endIndex) + "</span>" + text.substring(endIndex)
element.innerHTML = text
//console.log(text)
//console.log($('#'+element.parentElement.id+' span').position().top)
$('#'+element.parentElement.id).animate({scrollTop: $('#'+element.parentElement.id).scrollTop() + $('#'+element.parentElement.id + ' span').position().top - 200}, 400)
}
//var subtext = text.substring(0,beginIndex)
/*if (beginIndex[0] >= 0) {
if(text[beginIndex[0]]===' ') cnt+=1
text_highlighted = text.substring(0,beginIndex[0]+cnt) + "<span class='highlight' style='background-color:yellow'>" + text.substring(beginIndex[0]+cnt,endIndex[0]+1+cnt) + "</span>"
for(var i =1 ; i<beginIndex.length;i++){
if(text[beginIndex[i]+cnt]===' ') cnt+=1
text_highlighted+=text.substring(endIndex[i-1]+1+cnt,beginIndex[i]+cnt)
text_highlighted+="<span class='highlight' style='background-color:yellow'>"
text_highlighted+=text.substring(beginIndex[i]+cnt,endIndex[i]+1+cnt)
text_highlighted+="</span>"
}
text_highlighted+= text.substring(endIndex[endIndex.length-1]+1+cnt)
element.innerHTML = text_highlighted*/
//console.log(text_highlighted)
//console.log(cnt)
//console.log($('#'+element.parentElement.id+' span').position().top)
$('#'+element.parentElement.id).animate({scrollTop: $('#'+element.parentElement.id).scrollTop() + $('#'+element.parentElement.id + ' span').position().top - 200}, 400)
},
}); });
......
...@@ -75,6 +75,10 @@ ...@@ -75,6 +75,10 @@
<div style="width: 7px;height: 7px;background-color: #00c0ef; float: left; margin-top: 7px;margin-right: 3px; margin-left: 6px" class="style-scope news-chart"></div> <div style="width: 7px;height: 7px;background-color: #00c0ef; float: left; margin-top: 7px;margin-right: 3px; margin-left: 6px" class="style-scope news-chart"></div>
Person Person
</div> </div>
<div class="leyend_person" style="display: flex; flex-direction: row;">
<div style="width: 7px;height: 7px;background-color: #9b009b; float: left; margin-top: 7px;margin-right: 3px; margin-left: 6px" class="style-scope news-chart"></div>
Category
</div>
</div> </div>
<template is="dom-repeat" items="{{news.entities}}" as="entity"> <template is="dom-repeat" items="{{news.entities}}" as="entity">
...@@ -82,6 +86,11 @@ ...@@ -82,6 +86,11 @@
<span class="badge badge-secondary" on-tap="highlightEntity" data-id$= "{{getID(news)}}" data-text$="{{getArticle(news)}}" style$="{{getBg(entity)}} cursor:pointer;">{{entity.schema:name}}</span> <span class="badge badge-secondary" on-tap="highlightEntity" data-id$= "{{getID(news)}}" data-text$="{{getArticle(news)}}" style$="{{getBg(entity)}} cursor:pointer;">{{entity.schema:name}}</span>
</template> </template>
<template is="dom-repeat" items="{{news.taxonomies}}" as="category">
<span class="badge badge-secondary" on-tap="highlightCategory" data-id$= "{{getID(news)}}" data-text$="{{getArticle(news)}}" style="background-color: #9b009b;margin-bottom:5px; cursor:pointer;">{{getCategory(category)}}</span>
</template>
</div> </div>
<div class="col-md-7" style="overflow-x: hidden; overflow-y: auto; height: 100%;"> <div class="col-md-7" style="overflow-x: hidden; overflow-y: auto; height: 100%;">
...@@ -397,6 +406,52 @@ ...@@ -397,6 +406,52 @@
} }
return news['@id']; return news['@id'];
}, },
highlightCategory: function(e) {
console.log(e)
var id = e.target.dataset.id
var element = document.getElementById(id)
var text = e.target.dataset.text
var text_highlighted= ""
var beginIndex = e.model.__data__.category["nif:beginIndex"]
var endIndex = e.model.__data__.category["nif:endIndex"]+1
var cnt=0
console.log(beginIndex)
console.log(endIndex)
var subtext = text.substring(0,beginIndex)
if (beginIndex >= 0) {
text = text.substring(0,beginIndex) + "<span class='highlight' style='background-color:yellow'>" + text.substring(beginIndex,endIndex) + "</span>" + text.substring(endIndex)
element.innerHTML = text
//console.log(text)
//console.log($('#'+element.parentElement.id+' span').position().top)
$('#'+element.parentElement.id).animate({scrollTop: $('#'+element.parentElement.id).scrollTop() + $('#'+element.parentElement.id + ' span').position().top - 200}, 400)
}
//var subtext = text.substring(0,beginIndex)
/*if (beginIndex[0] >= 0) {
if(text[beginIndex[0]]===' ') cnt+=1
text_highlighted = text.substring(0,beginIndex[0]+cnt) + "<span class='highlight' style='background-color:yellow'>" + text.substring(beginIndex[0]+cnt,endIndex[0]+1+cnt) + "</span>"
for(var i =1 ; i<beginIndex.length;i++){
if(text[beginIndex[i]+cnt]===' ') cnt+=1
text_highlighted+=text.substring(endIndex[i-1]+1+cnt,beginIndex[i]+cnt)
text_highlighted+="<span class='highlight' style='background-color:yellow'>"
text_highlighted+=text.substring(beginIndex[i]+cnt,endIndex[i]+1+cnt)
text_highlighted+="</span>"
}
text_highlighted+= text.substring(endIndex[endIndex.length-1]+1+cnt)
element.innerHTML = text_highlighted*/
//console.log(text_highlighted)
//console.log(cnt)
//console.log($('#'+element.parentElement.id+' span').position().top)
$('#'+element.parentElement.id).animate({scrollTop: $('#'+element.parentElement.id).scrollTop() + $('#'+element.parentElement.id + ' span').position().top - 200}, 400)
},
}); });
</script> </script>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<app-location route="{{route}}"></app-location> <app-location route="{{route}}"></app-location>
<elastic-client <elastic-client
config='{"host": "http://sefarad-elasticsearch.cluster.gsi.dit.upm.es"}' config='{"host": "http://localhost:19200"}'
client="{{client}}" client="{{client}}"
cluster-status="{{myStatus}}"> cluster-status="{{myStatus}}">
</elastic-client> </elastic-client>
......
[{"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/> \n \nSELECT DISTINCT ?headline ?place \n WHERE { \n ?article a schema:NewsArticle . \n ?article schema:headline ?headline . \n ?article me:hasEntities ?place . \n ?place a schema: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":"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 dbr:ISIL \n }\nLIMIT 25"},{"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 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