query-b3a59aa2e33f25a76d27c6ca372ccb3a

rq turtle/ttl

Find all russian lexemes not linking to a meaning in the top 100 most translated lexemes

SELECT distinct ?meaning ?meaningLabel ?count WHERE { #extract the meanings found in all russian lexemes ?le a ontolex:LexicalEntry ; dct:language ?language ; ontolex:sense ?sense. # get the sense ?sense wdt:P5137 ?meaning_ru.
FILTER (?language = wd:Q7737) { # This block finds the 100 most linked concepts SELECT ?meaning (count(?l) as ?count) WHERE { ?l a ontolex:LexicalEntry ; ontolex:sense ?sense. # get the sense ?sense wdt:P5137 ?meaning. #extract the meanings for ranking } group by ?meaning order by desc(?count) # rank by the most translated concepts limit 100 # only show the 100 most linked meanings } # Show the meanings left after filtering out those already present in russian lexemes # this result should be < 100. FILTER(?meaning NOT IN(?meaning_ru)) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"} }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Find all russian lexemes not linking to a meaning in the top 100 most translated lexemes

SELECT distinct ?meaning ?meaningLabel ?count WHERE
{
  #extract the meanings found in all russian lexemes
  ?le a ontolex:LexicalEntry ; 
        dct:language ?language ;
        ontolex:sense ?sense. # get the sense
  ?sense wdt:P5137 ?meaning_ru.  
  FILTER (?language = wd:Q7737)
  {
    # This block finds the 100 most linked concepts
    SELECT ?meaning (count(?l) as ?count) 
    WHERE {
       ?l a ontolex:LexicalEntry ; 
            ontolex:sense ?sense. # get the sense
      ?sense wdt:P5137 ?meaning. #extract the meanings for ranking
    }
    group by ?meaning 
    order by desc(?count) # rank by the most translated concepts 
    limit 100 # only show the 100 most linked meanings
  }
  # Show the meanings left after filtering out those already present in russian lexemes
  # this result should be < 100.
  FILTER(?meaning NOT IN(?meaning_ru))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?count"):::projected v7("?l") v3("?language") v4("?le") v1("?meaning"):::projected v2("?meaning_ru") v5("?sense") c8(["bd:serviceParam"]):::iri c3(["ontolex:LexicalEntry"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?meaning != ?meaning_ru"]] f0 --> v1 f0 --> v2 f1[["?language = 'wd:Q7737'"]] f1 --> v3 v4 --"a"--> c3 v4 --"dct:language"--> v3 v4 --"ontolex:sense"--> v5 v5 --"wdt:P5137"--> v2 v7 --"a"--> c3 v7 --"ontolex:sense"--> v5 v5 --"wdt:P5137"--> v1 bind3[/"count(?l)"/] v7 --o bind3 bind3 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end