query-7d5ee4a6762d6062c5a32c05b148de9b

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?article ?aliasLabel
WHERE
{
  # wikidata item has a link to ar.wikipedia. 
  ?article  schema:about ?item ;
            schema:isPartOf <https://ar.wikipedia.org/> .

  # wikidata record is a person. If you don't cut down the results set, you'll get a time-out ... that'll probably be your biggest problem
  ?item wdt:P31 wd:Q5 .

  # If there's an ar. alias, then we'll be wanting that ... 
  optional {?item skos:altLabel ?alias FILTER (LANG (?alias) = "ar")}

  # Now show only items that have no alias
  filter(!bound(?alias))

  # Access the label service.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ar" }
}
LIMIT 200

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?alias") v2("?article"):::projected v3("?item"):::projected c11(["#91;AUTO_LANGUAGE#93;,ar"]):::literal c9(["bd:serviceParam"]):::iri c6(["wd:Q5"]):::iri c4([https://ar.wikipedia.org/]):::iri f0[["not bound(?alias)"]] f0 --> v1 v2 --"schema:about"--> v3 v2 --"schema:isPartOf"--> c4 v3 --"wdt:P31"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."skos:altLabel".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end