Help
Difference between revisions of "SPARQL (HAL)"
(Created page with "=== ✅ HAL Authors → birthdate === {| style="width:100%" |- style="vertical-align:top;" |style="padding: 0 3em;width:60%"| <syntaxhighlight lang="sparql"> #defaultEndpoint...") |
|||
Line 1: | Line 1: | ||
+ | == Done == | ||
=== ✅ HAL Authors → birthdate === | === ✅ HAL Authors → birthdate === | ||
{| style="width:100%" | {| style="width:100%" | ||
Line 5: | Line 6: | ||
<syntaxhighlight lang="sparql"> | <syntaxhighlight lang="sparql"> | ||
#defaultEndpoint:Wikidata | #defaultEndpoint:Wikidata | ||
+ | SELECT ?item ?itemLabel ?halIdValue ?gender ?birthDate (YEAR(?birthDate) AS ?birthYear) | ||
+ | WHERE { | ||
+ | ?item wdt:P31 wd:Q5. # has HAL author ID `P4450` | ||
+ | ?item wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue | ||
+ | OPTIONAL { ?item wdt:P569 ?birthDate. } # birthDate `P569` in ?birthDate | ||
+ | # MINUS { ?item wdt:P569 ?birthDate. } | ||
+ | OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender | ||
+ | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
+ | } | ||
+ | ORDER BY DESC (?birthYear) | ||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | <query _pagination="10"> | ||
#defaultEndpoint:Wikidata | #defaultEndpoint:Wikidata | ||
− | SELECT ?item ?itemLabel ?halIdValue ?birthDate (YEAR(?birthDate) AS ?birthYear) | + | SELECT ?item ?itemLabel ?halIdValue ?gender ?birthDate (YEAR(?birthDate) AS ?birthYear) |
WHERE { | WHERE { | ||
− | ?item wdt:P31 wd:Q5 | + | ?item wdt:P31 wd:Q5. # has HAL author ID `P4450` |
− | + | ?item wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue | |
− | + | OPTIONAL { ?item wdt:P569 ?birthDate. } # birthDate `P569` in ?birthDate | |
− | OPTIONAL { ?item wdt:P569 ?birthDate. } | ||
# MINUS { ?item wdt:P569 ?birthDate. } | # MINUS { ?item wdt:P569 ?birthDate. } | ||
+ | OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
} | } | ||
+ | ORDER BY DESC (?birthYear) | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === ✅ HAL Authors → Links to HAL cv, publications === | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | #defaultEndpoint:Wikidata | ||
+ | SELECT ?item | ||
+ | ?itemLabel | ||
+ | (ENCODE_FOR_URI(?itemLabel) AS ?uriLabel) # Wikipedia title | ||
+ | ?halIdValue | ||
+ | (CONCAT("https://cv.hal.science/", STR(?halIdValue)) AS ?halAuthorCv) # | ||
+ | (CONCAT("https://hal.science/search/index/q/*/authIdHal_s/", STR(?halIdValue)) AS ?halAuthorPublications) | ||
+ | ?genderLabel ?birthDate | ||
+ | (YEAR(?birthDate) AS ?birthYear) | ||
+ | WHERE { | ||
+ | ?item wdt:P31 wd:Q5. # has HAL author ID `P4450` | ||
+ | ?item wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue | ||
+ | OPTIONAL { ?item wdt:P569 ?birthDate. } # birthDate `P569` in ?birthDate | ||
+ | OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender | ||
+ | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
+ | } | ||
+ | ORDER BY DESC (?birthDate) | ||
|| | || | ||
− | <query _pagination=" | + | <query _pagination="10"> |
+ | #defaultEndpoint:Wikidata | ||
+ | SELECT ?item | ||
+ | ?itemLabel | ||
+ | (ENCODE_FOR_URI(?itemLabel) AS ?uriLabel) # Wikipedia title | ||
+ | ?halIdValue | ||
+ | (CONCAT("https://cv.hal.science/", STR(?halIdValue)) AS ?halAuthorCv) # | ||
+ | (CONCAT("https://hal.science/search/index/q/*/authIdHal_s/", STR(?halIdValue)) AS ?halAuthorPublications) | ||
+ | ?genderLabel ?birthDate | ||
+ | (YEAR(?birthDate) AS ?birthYear) | ||
+ | WHERE { | ||
+ | ?item wdt:P31 wd:Q5. # has HAL author ID `P4450` | ||
+ | ?item wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue | ||
+ | OPTIONAL { ?item wdt:P569 ?birthDate. } # birthDate `P569` in ?birthDate | ||
+ | OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender | ||
+ | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
+ | } | ||
+ | ORDER BY DESC (?birthDate) | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | |||
+ | === 🇶 HAL authors on Wikidata per gender ([[Property:P21|P21]]) === | ||
+ | |||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
#defaultEndpoint:Wikidata | #defaultEndpoint:Wikidata | ||
+ | SELECT | ||
+ | ?genderLabel (count(?item) AS ?nb) # counting gender | ||
+ | WHERE { | ||
+ | ?item wdt:P31 wd:Q5; # has HAL author ID `P4450` | ||
+ | wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue | ||
+ | OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender | ||
+ | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
+ | } | ||
+ | GROUP BY ?genderLabel | ||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | <query _pagination="5" > | ||
#defaultEndpoint:Wikidata | #defaultEndpoint:Wikidata | ||
− | SELECT ? | + | SELECT |
+ | ?genderLabel (count(?item) AS ?nb) # counting gender | ||
WHERE { | WHERE { | ||
− | ?item wdt:P31 wd:Q5; | + | ?item wdt:P31 wd:Q5; # has HAL author ID `P4450` |
− | + | wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue | |
− | + | OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender | |
− | OPTIONAL { ?item wdt: | ||
− | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
} | } | ||
+ | GROUP BY ?genderLabel | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | |||
+ | == HAL Authors == | ||
+ | === 🇶 Author name(s) → Author Qid(s) === | ||
+ | ''This query is going to be DEPRECATED as the queried data will no longer be available.'' | ||
+ | <!-- REVIEW REQUIRED --> | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?speakerName ?speakerId | ||
+ | WHERE { | ||
+ | VALUES ?speakerName { "Yug" "VIGNERON" } # Assign value: one or multiple values | ||
+ | # note: need to comment BIND | ||
+ | BIND ( STRLANG(?speakerName, "en") AS ?speakerLabel ) | ||
+ | # Grammatical note: ';' allows to chain actions | ||
+ | ?speakerId prop:P2 entity:Q3 ; # Filter: P2 'instance of' is Q3 'speaker'. | ||
+ | rdfs:label ?speakerLabel . # Filter by value: label equal ?speakerLabel's value | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | |||
+ | <query _pagination="5"> | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?speakerName ?speakerId | ||
+ | WHERE { | ||
+ | VALUES ?speakerName { "Yug" "VIGNERON" } | ||
+ | BIND ( STRLANG(?speakerName, "en") AS ?speakerLabel ) | ||
+ | ?speakerId prop:P2 entity:Q3 ; | ||
+ | rdfs:label ?speakerLabel . | ||
+ | } | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === 🇶 Speaker Qid ([[Q445757]]) → Speaker data, all === | ||
+ | ''This query is going to be DEPRECATED as the queried data will no longer be available.'' | ||
+ | <!-- Q: alternative words for "predicate" and "object". "property" and "value" ?--> | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | # Get Q445757 (User:SangeetaRH)'s data | ||
+ | SELECT ?anyProperty ?anyValue ?anyValueLabel | ||
+ | WHERE { | ||
+ | entity:Q445757 ?anyProperty ?anyValue . # Filter: of Q445757 'SangeetaRH', get any property and any values | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | <query _pagination="10" > | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?anyProperty ?anyValue ?anyValueLabel | ||
+ | WHERE { | ||
+ | entity:Q445757 ?anyProperty ?anyValue . # Filter: of Q445757 'SangeetaRH', get any property and any values | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === 🇶 Speaker Qid ([[Q445757]]) → Speaker languages ([[Property:P4|P4]]) === | ||
+ | ''This query is going to be DEPRECATED as the queried data will no longer be available.'' | ||
+ | <!-- Q: Add languages iso P:13 --> | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?languages ?languagesLabel | ||
+ | WHERE { | ||
+ | entity:Q445757 prop:P4 ?languages . # Assign value: for Q445757 'SangeetaRH', P4 'language' into ?languages | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | <query _pagination="5" > | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?languages ?languagesLabel | ||
+ | WHERE { | ||
+ | entity:Q445757 prop:P4 ?languages . # Assign value: for Q445757 'SangeetaRH', P4 'language' into ?languages | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === Speaker Qid (speakers/1 ???) + Language LL Qid ([[d:Q1571]]) → List records === | ||
+ | ''This query is IN WORK for Commons SPARQL Endpoint. One Wikidata property is missing; please update this query with the right property URI.'' | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | #defaultEndpoint:Commons | ||
+ | SELECT ?audio ?audioLabel | ||
+ | WHERE { | ||
+ | ?audio wdt:SPEAKER_PROPERTY_MISSING <http://lingualibre.org/speakers/1> ; # Filter: ??? 'speaker' P5 Speaker is User:SangeetaRH | ||
+ | wdt:P407 wd:Q1571 . # Filter: P407 'language' is Q1571 'Marathi' | ||
+ | |||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | || | ||
+ | <query _pagination="5" > | ||
+ | #defaultEndpoint:Commons | ||
+ | SELECT ?audio ?audioLabel | ||
+ | WHERE { | ||
+ | ?audio wdt:SPEAKER_PROPERTY_MISSING <http://lingualibre.org/speakers/1> ; # Filter: ??? 'speaker' P5 Speaker is User:SangeetaRH | ||
+ | wdt:P407 wd:Q1571 . # Filter: P407 'language' is Q1571 'Marathi' | ||
+ | |||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === Speaker Qid (speakers/1 ???) + Language LL Qid ([[d:Q1571]]) → Count records === | ||
+ | ''This query is IN WORK for Commons SPARQL Endpoint. One Wikidata property is missing; please update this query with the right property URI.'' | ||
+ | {| style="width:100%" | ||
+ | |- style="vertical-align:top;" | ||
+ | |style="padding: 0 3em;width:60%"| | ||
+ | <syntaxhighlight lang="sparql"> | ||
+ | #defaultEndpoint:Commons | ||
+ | SELECT ?language ?speaker (COUNT(?audio) AS ?audio) | ||
+ | WHERE { | ||
+ | # Comment out the below pattern to filter by language, e.g. Q1571 or others | ||
+ | # VALUES ?language { wd:Q1571 } # Bind value: Q1571 'Marathi' into ?language | ||
+ | VALUES ?speaker { <http://lingualibre.org/speakers/1> } # Assign value: ll.org/speakers/1 (for 'SangeetaRH') into ?speaker | ||
+ | |||
+ | ?audio wdt:SPEAKER_PROPERTY_MISSING ?speaker ; # Filter: ??? 'speaker' is ?speaker | ||
+ | wdt:P407 ?language ; # Filter: P407 'language' bound to ?language | ||
+ | wdt:P31 wd:Q108167708 . # Filter: P31 'instance of' is Q108167708 'pronunciation file' | ||
+ | } | ||
+ | GROUP BY ?language ?speaker # Sorting first groups per language and speaker | ||
+ | </syntaxhighlight> | ||
+ | | | ||
+ | <query _pagination="6" item="Property" itemLabel="Values"> | ||
+ | #defaultEndpoint:Commons | ||
+ | SELECT ?language ?speaker (COUNT(?audio) AS ?audio) | ||
+ | WHERE { | ||
+ | # Comment out the below pattern to filter by language. | ||
+ | # E.g. Q1571 or others | ||
+ | |||
+ | # VALUES ?language { wd:Q1571 } # Bind value: Q1571 'Marathi' into ?language | ||
+ | VALUES ?speaker { <http://lingualibre.org/speakers/1> } # Assign value: ll.org/speakers/1 (for 'SangeetaRH') into ?speaker | ||
+ | |||
+ | ?audio wdt:SPEAKER_PROPERTY_MISSING ?speaker ; # Filter: ??? 'speaker' is ?speaker | ||
+ | wdt:P407 ?language ; # Filter: P407 'language' bound to ?language | ||
+ | wdt:P31 wd:Q108167708 . # Filter: P31 'instance of' is Q108167708 'pronunciation file' | ||
+ | } | ||
+ | GROUP BY ?language ?speaker # Sorting first groups per language and speaker | ||
+ | </query> | ||
+ | |} | ||
+ | |||
+ | === Is Speaker ([[Q3]]) → List of accounts and associated speakers === | ||
+ | ''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"> | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?linkedUser ?speakerLabel (SUBSTR(STR(?speaker),32) AS ?speakerQid) | ||
+ | WHERE { | ||
+ | ?speaker prop:P2 entity:Q3 . # Filter: P2 'instance of' is Q3 'speaker'. | ||
+ | ?speaker prop:P11 ?linkedUser . # Assign value: P11 'linked users' into ?linkedUser. | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } ORDER BY DESC (?speakerLabel) | ||
+ | </syntaxhighlight> | ||
+ | | | ||
+ | <query _pagination="6" item="Property" itemLabel="Values"> | ||
+ | #defaultEndpoint:Lingualibre | ||
+ | SELECT ?linkedUser ?speakerLabel (SUBSTR(STR(?speaker),32) AS ?speakerQid) | ||
+ | WHERE { | ||
+ | ?speaker prop:P2 entity:Q3 . # Filter: P2 'instance of' is Q3 'speaker'. | ||
+ | ?speaker prop:P11 ?linkedUser . # Assign value: P11 'linked users' into ?linkedUser. | ||
+ | # Add labels | ||
+ | SERVICE wikibase:label { | ||
+ | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . | ||
+ | } | ||
+ | } ORDER BY DESC (?speakerLabel) | ||
</query> | </query> | ||
|} | |} |
Revision as of 13:40, 14 June 2023
Done
✅ HAL Authors → birthdate
#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue ?gender ?birthDate (YEAR(?birthDate) AS ?birthYear)
WHERE {
?item wdt:P31 wd:Q5. # has HAL author ID `P4450`
?item wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue
OPTIONAL { ?item wdt:P569 ?birthDate. } # birthDate `P569` in ?birthDate
# MINUS { ?item wdt:P569 ?birthDate. }
OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?birthYear)
|
|
✅ HAL Authors → Links to HAL cv, publications
SELECT ?item ?itemLabel (ENCODE_FOR_URI(?itemLabel) AS ?uriLabel) # Wikipedia title ?halIdValue (CONCAT("https://cv.hal.science/", STR(?halIdValue)) AS ?halAuthorCv) # (CONCAT("https://hal.science/search/index/q/*/authIdHal_s/", STR(?halIdValue)) AS ?halAuthorPublications) ?genderLabel ?birthDate (YEAR(?birthDate) AS ?birthYear) WHERE { ?item wdt:P31 wd:Q5. # has HAL author ID `P4450` ?item wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue OPTIONAL { ?item wdt:P569 ?birthDate. } # birthDate `P569` in ?birthDate OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC (?birthDate) |
|
🇶 HAL authors on Wikidata per gender (P21)
#defaultEndpoint:Wikidata
SELECT
?genderLabel (count(?item) AS ?nb) # counting gender
WHERE {
?item wdt:P31 wd:Q5; # has HAL author ID `P4450`
wdt:P4450 ?halIdValue. # HAL author ID `P4450` in ?halIdValue
OPTIONAL { ?item wdt:P21 ?gender. } # gender `P21` in ?gender
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?genderLabel
|
|
HAL Authors
🇶 Author name(s) → Author Qid(s)
This query is going to be DEPRECATED as the queried data will no longer be available.
#defaultEndpoint:Lingualibre
SELECT ?speakerName ?speakerId
WHERE {
VALUES ?speakerName { "Yug" "VIGNERON" } # Assign value: one or multiple values
# note: need to comment BIND
BIND ( STRLANG(?speakerName, "en") AS ?speakerLabel )
# Grammatical note: ';' allows to chain actions
?speakerId prop:P2 entity:Q3 ; # Filter: P2 'instance of' is Q3 'speaker'.
rdfs:label ?speakerLabel . # Filter by value: label equal ?speakerLabel's value
}
|
|
🇶 Speaker Qid (SangeetaRH (Q445757)) → Speaker data, all
This query is going to be DEPRECATED as the queried data will no longer be available.
#defaultEndpoint:Lingualibre
# Get Q445757 (User:SangeetaRH)'s data
SELECT ?anyProperty ?anyValue ?anyValueLabel
WHERE {
entity:Q445757 ?anyProperty ?anyValue . # Filter: of Q445757 'SangeetaRH', get any property and any values
# Add labels
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
🇶 Speaker Qid (SangeetaRH (Q445757)) → Speaker languages (P4)
This query is going to be DEPRECATED as the queried data will no longer be available.
#defaultEndpoint:Lingualibre
SELECT ?languages ?languagesLabel
WHERE {
entity:Q445757 prop:P4 ?languages . # Assign value: for Q445757 'SangeetaRH', P4 'language' into ?languages
# Add labels
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
Speaker Qid (speakers/1 ???) + Language LL Qid (d:Q1571) → List records
This query is IN WORK for Commons SPARQL Endpoint. One Wikidata property is missing; please update this query with the right property URI.
#defaultEndpoint:Commons
SELECT ?audio ?audioLabel
WHERE {
?audio wdt:SPEAKER_PROPERTY_MISSING <http://lingualibre.org/speakers/1> ; # Filter: ??? 'speaker' P5 Speaker is User:SangeetaRH
wdt:P407 wd:Q1571 . # Filter: P407 'language' is Q1571 'Marathi'
# Add labels
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
|
|
Speaker Qid (speakers/1 ???) + Language LL Qid (d:Q1571) → Count records
This query is IN WORK for Commons SPARQL Endpoint. One Wikidata property is missing; please update this query with the right property URI.
#defaultEndpoint:Commons
SELECT ?language ?speaker (COUNT(?audio) AS ?audio)
WHERE {
# Comment out the below pattern to filter by language, e.g. Q1571 or others
# VALUES ?language { wd:Q1571 } # Bind value: Q1571 'Marathi' into ?language
VALUES ?speaker { <http://lingualibre.org/speakers/1> } # Assign value: ll.org/speakers/1 (for 'SangeetaRH') into ?speaker
?audio wdt:SPEAKER_PROPERTY_MISSING ?speaker ; # Filter: ??? 'speaker' is ?speaker
wdt:P407 ?language ; # Filter: P407 'language' bound to ?language
wdt:P31 wd:Q108167708 . # Filter: P31 'instance of' is Q108167708 'pronunciation file'
}
GROUP BY ?language ?speaker # Sorting first groups per language and speaker
|
|
Is Speaker (speaker (Q3)) → List of accounts and associated speakers
This query is going to be DEPRECATED as the queried data will no longer be available.
#defaultEndpoint:Lingualibre
SELECT ?linkedUser ?speakerLabel (SUBSTR(STR(?speaker),32) AS ?speakerQid)
WHERE {
?speaker prop:P2 entity:Q3 . # Filter: P2 'instance of' is Q3 'speaker'.
?speaker prop:P11 ?linkedUser . # Assign value: P11 'linked users' into ?linkedUser.
# Add labels
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
} ORDER BY DESC (?speakerLabel)
|
|