Help
Difference between revisions of "SPARQL"
Line 6: | Line 6: | ||
* [[DataViz:Records]] | * [[DataViz:Records]] | ||
− | == ✅ | + | == ✅ Is Sex or Gender(Q7) → list all possible values == |
{| | {| | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
Line 31: | Line 31: | ||
|} | |} | ||
− | == ✅ | + | == ✅ Is Speaker (Q3) → list all speakers == |
{| | {| | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
Line 38: | Line 38: | ||
select ?locutor ?locutorLabel | select ?locutor ?locutorLabel | ||
where { | where { | ||
− | ?locutor prop:P2 entity:Q3 . | + | ?locutor prop:P2 * entity:Q3 . |
SERVICE wikibase:label { | SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . |
Revision as of 00:02, 4 December 2021
Base
- Special:ListProperties
- List of properties with possible values. Ex: Gender (P8) : male (male (Q16)), female (female (Q17)), intersex (intersex (Q18)).
- LinguaLibre:List of languages
- DataViz:Speakers
- DataViz:Records
✅ Is Sex or Gender(Q7) → list all possible values
SELECT ?item ?itemLabel
WHERE {
?item prop:P2/prop:P9 * entity:Q7
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
✅ Is Speaker (Q3) → list all speakers
select ?locutor ?locutorLabel
where {
?locutor prop:P2 * entity:Q3 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
Speaker name → Speaker Qid
Speaker Qid → Speaker data
Speaker Qid → Speaker data → speaker languages
Speaker Qid + language → list of audios in target language
Isolang → Language LL Qid
Isolang → Language WD Qid
Language WD Qid → Language data
Language LL Qid → Language data
Langue + speaker + word → Audio's Qid
Audio Qid → Audio data
✅ Langue + speaker + word → Audio's Commons url
Tools
- Special:ApisSandbox – API queries generator for Lingualibre wikipage and wikibase contents.