fnielsen / ordia

Wikidata lexemes presentations
https://ordia.toolforge.org
Apache License 2.0
24 stars 13 forks source link

More languages in Flying Dehyphenator #228

Closed fnielsen closed 1 month ago

fnielsen commented 1 month ago
SELECT 
  (CONCAT('<option value="', SUBSTR(STR(?language), 32), '">', ?local_label, ' - ', ?code, ' - ', ?english_label, '</option>') AS ?string)
WITH {
  SELECT 
    (COUNT(?hyphenation) AS ?hyphenations)
    ?language
    (SAMPLE(?hyphenation) AS ?example_hyphenation)
  WHERE {
    ?lexeme dct:language ?language ;
            ontolex:lexicalForm / wdt:P5279 ?hyphenation .
  }
  GROUP BY ?language
} AS %languages
WHERE {
  INCLUDE %languages
  ?language rdfs:label ?english_label, ?local_label ;
            wdt:P424 ?code .
  FILTER (LANG(?english_label) = 'en')
  FILTER (LANG(?local_label) = ?code)
}