fnielsen / ordia

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

Add grammatical features statistics to lexical category - language aspect. #238

Open fnielsen opened 4 days ago

fnielsen commented 4 days ago
SELECT 
  ?number_of_forms
  ?grammatical_feature ?grammatical_featureLabel
  ?example_form
WITH {
  SELECT 
    (COUNT(?form) AS ?number_of_forms)
    ?grammatical_feature 
    (SAMPLE(?form) AS ?example_form)
  WHERE {
    ?lexeme wikibase:lexicalCategory wd:Q1084 ;
            dct:language wd:Q9035 ;
            ontolex:lexicalForm ?form .
    ?form wikibase:grammaticalFeature ?grammatical_feature .
  }
  GROUP BY ?grammatical_feature
} AS %grammatical_features
WHERE {
  INCLUDE %grammatical_features
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
ORDER BY DESC(?number_of_forms)
fnielsen commented 4 days ago

In Synia there is a related statistics for languages now: https://synia.toolforge.org/#language/Q9035/lexicalcategory