query-7f486a94bdb7543e2a9321926c38a2c1
22:16, 5 December 2018 (UTC)) talk (ImreSamu--Ez meg egy olyan módosítása, ami kiszűri azokat is, amelyeknek már van magyar címkéje.
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?politik ?politikLabel ?politikDescription ?sitelinks
WHERE {
{
SELECT DISTINCT ?politik (COUNT(distinct ?sitelink) AS ?sitelinks) WHERE {
?politik wdt:P106 wd:Q82955 .
OPTIONAL { ?sitelink schema:about ?politik FILTER REGEX(STR(?sitelink), ".wikipedia.org/wiki/") } .
FILTER NOT EXISTS { ?politik wdt:P570 ?date } . # Nem halt még meg
#Nincs magyar wikipedia oldala
FILTER NOT EXISTS { [] schema:about ?politik; schema:isPartOf <https://hu.wikipedia.org/> } .
# Nincs magyar description-ja !
FILTER(NOT EXISTS { ?politik schema:description ?politikdesc. FILTER(LANG(?politikdesc) = "hu") })
}
GROUP BY ?politik
HAVING (?sitelinks > 10)
}
SERVICE wikibase:label {bd:serviceParam wikibase:language "hu,en,fr,de,es,it,ru,uk,bg,zh,ja,ko"}
}
ORDER BY DESC (?sitelinks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?date")
v3("?politik"):::projected
v2("?politikdesc")
v5("?sitelink")
v6("?sitelinks"):::projected
a1((" "))
c14(["hu,en,fr,de,es,it,ru,uk,bg,zh,ja,ko"]):::literal
c10(["wd:Q82955"]):::iri
c6([https://hu.wikipedia.org/]):::iri
c12(["bd:serviceParam"]):::iri
f0[["?sitelinks > '10^^xsd:integer'"]]
f0 --> v6
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0f0[["?politikdesc = 'hu'"]]
e0f0 --> e0v1
e0v2 --"schema:description"--> e0v1
e0v2("?politik"):::projected
e0v1("?politikdesc"):::projected
end
f1--EXISTS--> f1e0
f1 --> v2
f1 --> v3
f1 --> c3
f2[["?politikdesc = 'hu'"]]
f2 --> v2
v3 --"schema:description"--> v2
f3[["not "]]
subgraph f3e1["Exists Clause"]
e1a1 --"schema:about"--> e1v1
e1a1 --"schema:isPartOf"--> e1c3
e1v1("?politik"):::projected
e1a1((" ")):::projected
e1c3([https://hu.wikipedia.org/]):::iri
end
f3--EXISTS--> f3e1
f3 --> a1
f3 --> c4
f3 --> v3
f3 --> c5
f3 --> c6
a1 --"schema:about"--> v3
a1 --"schema:isPartOf"--> c6
f4[["not "]]
subgraph f4e2["Exists Clause"]
e2v1 --"wdt:P570"--> e2v2
e2v2("?date"):::projected
e2v1("?politik"):::projected
end
f4--EXISTS--> f4e2
f4 --> v3
f4 --> c7
f4 --> v4
v3 --"wdt:P570"--> v4
v3 --"wdt:P106"--> c10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v3
end
bind6[/"count(?sitelink)"/]
v5 --o bind6
bind6 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end