User
Difference between revisions of "Yug/Gallery"
< User:Yug
Line 70: | Line 70: | ||
GROUP BY ?language ?speaker ?speakerLabel ?genderLabel | GROUP BY ?language ?speaker ?speakerLabel ?genderLabel | ||
ORDER BY DESC (?audio) | ORDER BY DESC (?audio) | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === Speaker Qid (Q445757) + Language LL Qid (Q34) → List records === | ||
+ | ''This query is going to be DEPRECATED as the queried data will no longer be available.'' | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | SELECT ?audio ?audioLabel | ||
+ | WHERE { | ||
+ | ?audio prop:P5 entity:Q445757 . # Filter: P5 Speaker is Q445757 User:SangeetaRH | ||
+ | ?audio prop:P4 entity:Q34 . # Filter: P4 language is Q34 Marathi | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | | | ||
+ | <query _pagination="10" item="Property" itemLabel="Values"> | ||
+ | SELECT ?audio ?audioLabel | ||
+ | WHERE { | ||
+ | ?audio prop:P5 entity:Q445757 . # Filter: P5 Speaker is Q445757 User:SangeetaRH | ||
+ | ?audio prop:P4 entity:Q34 . # Filter: P4 language is Q34 Marathi | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === ✅ Languages with media type video → written word (P7), url (P3) speakers (P5) === | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | SELECT ?word ?filename ?speaker WHERE { | ||
+ | ?record prop:P4 entity:Q99628 . | ||
+ | ?record prop:P2 entity:Q2 . | ||
+ | ?record prop:P7 ?word . | ||
+ | ?record prop:P3 ?filename . | ||
+ | ?record prop:P5 ?speakerItem . | ||
+ | ?speakerItem rdfs:label | ||
+ | ?speaker filter ( lang( ?speaker ) = "en" ) . | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | <query _pagination="5"> | ||
+ | SELECT ?word ?filename ?speaker WHERE { | ||
+ | ?record prop:P4 entity:Q99628 . | ||
+ | ?record prop:P2 entity:Q2 . | ||
+ | ?record prop:P7 ?word . | ||
+ | ?record prop:P3 ?filename . | ||
+ | ?record prop:P5 ?speakerItem . | ||
+ | ?speakerItem rdfs:label | ||
+ | ?speaker filter ( lang( ?speaker ) = "en" ) . | ||
+ | } | ||
</query> | </query> | ||
|} | |} |
Revision as of 13:37, 10 August 2022
✅ Speakers → missing gender value
- This query returns speakers who have missing gender value. See also list of genders.
SELECT ?speaker ?speakerLabel ?gender ?language ?languageLabel (COUNT(?audio) AS ?audio)
WHERE {
?speaker prop:P2 entity:Q3 .
FILTER NOT EXISTS { ?speaker prop:P8 ?gender }
?audio prop:P5 ?speaker . # Filter: P5 'speaker' is Q445757 'SangeetaRH'
?audio prop:P4 ?language . # Filter: P4 'language' is Q34 'Marathi'
# Add labels
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
}
GROUP BY ?speaker ?speakerLabel ?genderLabel ?language ?languageLabel # Sorting first groups per language and speaker
ORDER BY DESC (?audio)
|
|
Language LL Qid → List speakers
This query is going to be DEPRECATED as the queried data will no longer be available.
SELECT ?language ?speaker ?speakerLabel ?genderLabel (COUNT(?audio) AS ?audio)
WHERE {
VALUES ?language { entity:Q150 }
?speaker prop:P2 entity:Q3 . # P2 'instance of' is Q3 'speaker'
?speaker prop:P4 ?language . # P4 'language'
?speaker prop:P8 ?gender . # P8 'language'
# Audios
?audio prop:P5 ?speaker . # Filter: P5 'speaker'
?audio prop:P4 ?language . # Filter: P4 'language'
# Add labels
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
}
GROUP BY ?language ?speaker ?speakerLabel ?genderLabel
ORDER BY DESC (?audio)
|
|
Speaker Qid (Q445757) + Language LL Qid (Q34) → List records
This query is going to be DEPRECATED as the queried data will no longer be available.
SELECT ?audio ?audioLabel
WHERE {
?audio prop:P5 entity:Q445757 . # Filter: P5 Speaker is Q445757 User:SangeetaRH
?audio prop:P4 entity:Q34 . # Filter: P4 language is Q34 Marathi
# Add labels
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
✅ Languages with media type video → written word (P7), url (P3) speakers (P5)
SELECT ?word ?filename ?speaker WHERE {
?record prop:P4 entity:Q99628 .
?record prop:P2 entity:Q2 .
?record prop:P7 ?word .
?record prop:P3 ?filename .
?record prop:P5 ?speakerItem .
?speakerItem rdfs:label
?speaker filter ( lang( ?speaker ) = "en" ) .
}
|
|