lingua-libre / operations

⚙️ Configuration files and deployment procedures for LinguaLibre wiki.
MIT License
0 stars 1 forks source link

Add programatic query of existing languages #8

Open hugolpz opened 2 years ago

hugolpz commented 2 years ago

Replace the hard coded line #48 by a programmatic query.

Rapid Query to get relevant info from LLQS :

SELECT ?lang ?langLabel ?code ( count(DISTINCT ?record) as ?nb ) WHERE {
  ?lang prop:P2 entity:Q4 ; rdfs:label ?langLabel . FILTER (lang(?langLabel) = "en").
  OPTIONAL { ?record prop:P4 ?lang ; prop:P2 entity:Q2 . }
  OPTIONAL { ?lang prop:P13 ?code }
}
GROUP BY ?lang ?langLabel ?code
ORDER BY DESC(?nb)

See also :

Poslovitch commented 2 years ago

The current code in create_datasets.sh seems to be out of date compared to what @mickeybarber showed me on Friday. Let's wait for input from him.