Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
social
SoMeDi Use Case - Lateral
Commits
601ecb53
Commit
601ecb53
authored
Nov 17, 2017
by
Alberto Pascual
Browse files
SPARQL queries updates
parent
719a426e
Pipeline
#496
passed with stages
in 19 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
demo/queries.json
View file @
601ecb53
[{
"name"
:
"Show me news about Popular Party"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:Popular_Party .
\n
}
\n
LIMIT 100"
"name"
:
"Show me news about Popular Party
in Spanish
"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:Popular_Party .
\n
FILTER(lang(?headline) = 'es')
\n
}
\n
LIMIT 100"
},{
"name"
:
"Show me news about PSOE"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:PSOE .
\n
}
\n
LIMIT 100"
"name"
:
"Show me news about PSOE
in English
"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:PSOE .
\n
FILTER(lang(?headline) = 'en')
\n
}
\n
LIMIT 100"
},{
"name"
:
"Show me news about Ciudadanos"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:Ciudadanos .
\n
}
\n
LIMIT 100"
"name"
:
"Show me news about Ciudadanos
in Spanish
"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:Ciudadanos .
\n
FILTER(lang(?headline) = 'es')
\n
}
\n
LIMIT 100"
},{
"name"
:
"Show me news about Podemos"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:Podemos .
\n
}
\n
LIMIT 100"
"name"
:
"Show me news about Podemos
in English
"
,
"val"
:
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
\n
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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n
PREFIX dbps: <http://www.openlinksw.com/schemas/dbpedia-spotlight#>
\n
PREFIX dbr: <http://dbpedia.org/resource/>
\n
PREFIX dbo: <http://dbpedia.org/ontology/>
\n
PREFIX dbc: <http://dbpedia.org/category/>
\n
PREFIX db: <http://dbpedia.org/>
\n
PREFIX dcterms: <http://purl.org/dc/terms/>
\n
PREFIX dct: <http://purl.org/dc/terms/>
\n
PREFIX dc: <http://purl.org/dc/elements/1.1/>
\n
PREFIX dco: <http://info.deepcarbon.net/schema#>
\n
SELECT DISTINCT ?headline ?entity
\n
WHERE {
\n
?article a schema:NewsArticle .
\n
?article schema:headline ?headline .
\n
?entities rdfs:subClassOf ?entity .
\n
?entities rdfs:subClassOf dbr:Podemos .
\n
FILTER(lang(?headline) = 'en')
\n
}
\n
LIMIT 100"
},{
"name"
:
"Show the sentiment of articles"
,
"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://www.gsi.dit.upm.es/ontologies/wnaffect/ns#>
\n\n
SELECT ?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
}
\n
LIMIT 25
\n
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment