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

queries updated

parent aa0dc176
......@@ -192,8 +192,9 @@
this._query();
},
_filtersChange: function() {
var myfilters = []
this._query();
},
},
_query: function() {
console.log("_filtersChangedash")
var that = this;
......@@ -203,21 +204,13 @@
// undocumented params are appended to the query string
index: "gsicrawler",
body: {
size: 10,
size: 100,
query: {
bool: {
must: this.filters,
}
},
aggs: {
type: {
terms: {
field: "@type.keyword",
order: {
_count: "desc"
}
}
},
creator: {
terms: {
field: "creator.keyword",
......
[{"name":"Show the sentiment and emotion of posts and comments", "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#>\n\nSELECT ?blogpost ?sentiment ?emotion\nWHERE {\n ?blogpost a schema:BlogPosting .\n ?blogpost marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity ?sentiment .\n ?blogpost onyx:hasEmotionSet ?emotionlist .\n ?emotionlist onyx:hasEmotionCategory ?emotion .\n}\nLIMIT 25\n"},{"name":"How many opinions are positive, neutral or neutral on each tweet?","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 ?blogpost\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:BlogPosting .\n ?blogpost marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity 'marl:Positive' .\n ?opinion nif:anchorOf ?opinionTextPositive .\n}\n UNION \n {\n ?blogpost a schema:BlogPosting .\n ?blogpost marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity 'marl:Negative' .\n ?opinion nif:anchorOf ?opinionTextNegative .\n\n}\n UNION \n {\n ?blogpost a schema:BlogPosting .\n ?blogpost marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity 'marl:Neutral' .\n ?opinion nif:anchorOf ?opinionTextNeutral .\n}\n} GROUP BY ?blogpost"}]
\ No newline at end of file
[{"name":"Show the sentiment and emotion 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://gsi.dit.upm.es/ontologies/wnaffect/ns#>\n\nSELECT ?article ?sentiment ?emotion\nWHERE {\n ?article a schema:NewsArticle .\n ?article marl:hasOpinion ?opinion .\n ?opinion marl:hasPolarity ?sentiment .\n ?article onyx:hasEmotionSet ?emotionlist .\n ?emotionlist onyx:hasEmotionCategory ?emotion .\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"}]
\ No newline at end of file
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