query-a8f9be3b4bf688de8be8bcfc804e2a31
ItemsLinda Brava (Q541180)
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?extract ?link ?wikipedia
WHERE
{
?link schema:about wd:Q541180; schema:name ?title .
BIND(CONCAT(SUBSTR(str(?link), 9, 2), ".wikipedia.org") AS ?wikipedia) .
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint ?wikipedia .
bd:serviceParam mwapi:generator "allpages" .
bd:serviceParam mwapi:gapfrom ?title .
bd:serviceParam mwapi:gapto ?title .
bd:serviceParam mwapi:prop "pageprops|extracts" .
bd:serviceParam mwapi:exsentences "3" . # number of sententences to extract (1-10)
# bd:serviceParam mwapi:exchars "100" . # number of characters to extract (1-1200)
bd:serviceParam mwapi:explaintext "true" .
?item wikibase:apiOutputItem mwapi:item .
?extract wikibase:apiOutput "extract/text()".
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fi". }
}
Query found at
- https://www.wikidata.org/wiki/User:Susannaanas/Kuka_kuvasi
- https://www.wikidata.org/wiki/User:Susannaanas/SPARQL
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/08
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?extract"):::projected
v4("?item"):::projected
v1("?link"):::projected
v2("?title")
v3("?wikipedia"):::projected
c20(["mwapi:item"]):::iri
c5(["bd:serviceParam"]):::iri
c2(["wd:Q541180"]):::iri
c10(["allpages"]):::literal
c14(["pageprops|extracts"]):::literal
c25(["#91;AUTO_LANGUAGE#93;,fi"]):::literal
c22(["extract/text()"]):::literal
c16(["3"]):::literal
c18(["true"]):::literal
c7(["Generator"]):::literal
v1 --"schema:about"--> c2
v1 --"schema:name"--> v2
bind0[/"concat(substring(str(?link),'9^^xsd:integer','2^^xsd:integer'),'.wikipedia.org')"/]
v1 --o bind0
bind0 --as--o v3
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c5 --"mwapi:api"--> c7
c5 --"mwapi:endpoint"--> v3
c5 --"mwapi:generator"--> c10
c5 --"mwapi:gapfrom"--> v2
c5 --"mwapi:gapto"--> v2
c5 --"mwapi:prop"--> c14
c5 --"mwapi:exsentences"--> c16
c5 --"mwapi:explaintext"--> c18
v4 --"mwapi:apiOutputItem"--> c20
v5 --"mwapi:apiOutput"--> c22
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c5 --"mwapi:language"--> c25
end