query-ce237687e8cee641ea72c2b0cbc4f3b3
Last part
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX target: <http://www.wikidata.org/entity/Q9035>
SELECT
?forms
?last_part
?example_lexeme ?example_lexemeLabel
(CONCAT("#lexeme/", SUBSTR(STR(?example_lexeme), 32)) AS ?example_lexemeUrl)
WHERE {
{
SELECT
(COUNT(?form) AS ?forms)
?last_part
(SAMPLE(?lexeme) AS ?example_lexeme)
WHERE {
?lexeme dct:language target: ;
ontolex:lexicalForm ?form .
?form wdt:P5279 ?hyphenation .
BIND(REPLACE(?hyphenation, ".+‧([^‧]+)$", "$1") AS ?last_part)
}
GROUP BY ?last_part
} ?example_lexeme wikibase:lemma ?example_lexemeLabel
}
ORDER BY DESC(?forms)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?example_lexeme"):::projected
v7("?example_lexemeLabel"):::projected
v8("?example_lexemeUrl")
v3("?form")
v6("?forms"):::projected
v4("?hyphenation")
v5("?last_part"):::projected
v2("?lexeme")
c2([http://www.wikidata.org/entity/Q9035]):::iri
v2 --"dct:language"--> c2
v2 --"ontolex:lexicalForm"--> v3
v3 --"wdt:P5279"--> v4
bind0[/"replace(?hyphenation,'.+‧(#91;^‧#93;+)$','$1')"/]
v4 --o bind0
bind0 --as--o v5
bind3[/"count(?form)"/]
v3 --o bind3
bind3 --as--o v6
bind4[/"sample(?lexeme)"/]
v2 --o bind4
bind4 --as--o v6
v6 --"wikibase:lemma"--> v7
bind5[/"concat('#lexeme/',substring(str(?example_lexeme),'32^^xsd:integer'))"/]
v6 --o bind5
bind5 --as--o v8