Help
SPARQL
Revision as of 18:53, 5 December 2021 by VIGNERON (talk | contribs) (→Speaker Qid + language → list of all associated audios: +)
Revision as of 18:53, 5 December 2021 by VIGNERON (talk | contribs) (→Speaker Qid + language → list of all associated audios: +)
Base
✅ 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 ?speaker ?speakerLabel
where {
?speaker prop:P2 entity:Q3 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
Speaker name → Speaker Qid
select ?speakerName ?speakerId
where {
VALUES ?speakerName { "Yug" "VIGNERON" } #One or multiple values are acceptable here
BIND ( STRLANG(?speakerName, "en") AS ?speakerLabel )
?speakerId prop:P2 entity:Q3 ; rdfs:label ?speakerLabel .
}
|
|
Speaker Qid (Q42) → Speaker data
SELECT ?predicate ?object
WHERE {
entity:Q42 ?predicate ?object .
}
|
|
Speaker Qid → Speaker data → speaker languages
SELECT ?languages
WHERE {
entity:Q42 prop:P4 ?languages .
}
|
|
Speaker Qid + language → list of all associated audios
SELECT ?audio WHERE {
?audio prop:P5 entity:Q42 .
?audio prop:P4 entity:Q21 .
}
|
|
Is Language (Q3) → list all languages with number of unique words and speakers
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.