query-8a2ab8500f06288c557f699c9fdf2e32

rq turtle/ttl

Notability

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?x ?exists
  ?notability1_strong ?notability2a_strong ?notability2b_strong ?notability3_strong ?notability_strong 
  ?notability1_weak ?notability2a_weak ?notability2b_weak ?notability3_weak ?notability_weak 
  ?xLabel ?xDescription WHERE {
  VALUES ?x {wd:Q42 wd:Q48507154 wd:Q113547783 wd:Q107204561 wd:Q113547694 wd:Q113548247 wd:Q113548224 wd:Q113551800 wd:Q108218763 wd:Q58409749}

  BIND(exists {
    ?x schema:version ?version .
  } AS ?exists)

  # N1: It contains at least one valid sitelink ...
  BIND(EXISTS { # ?notability1_strong
    ?sitelink schema:about ?x .
  } AS ?notability1_strong)

  BIND(?notability1_strong as ?notability1_weak) # FUTURE

  # N2a: It refers to an instance of a clearly identifiable conceptual or material entity
  BIND(EXISTS { # ?notability2a_weak
    {
      ?x ?p ?statement .
      ?prop wikibase:claim ?p .
      ?prop wikibase:propertyType <http://wikiba.se/ontology#ExternalId> . 
    } UNION {
      ?x p:P856 ?statement . # official website
    }
  } AS ?notability2a_weak)

  BIND(EXISTS { # ?notability2a_strong
    {
      ?x ?p ?statement .
      ?prop wikibase:claim ?p .
      ?prop wikibase:propertyType <http://wikiba.se/ontology#ExternalId> . 
    } MINUS {
      ?prop wdt:P279*/wdt:P31 wd:Q105388954 . # Wikidata property to identify online accounts 
    }
  } AS ?notability2a_strong)

  #N2b: The entity must be notable, in the sense that it can be described using serious and publicly available references.
  BIND(EXISTS { # ?notability2b_weak
    {
      ?x ?p ?statement .
      ?statement prov:wasDerivedFrom ?ref . 
    } UNION {
      ?x ?p ?statement .
      ?prop wikibase:claim ?p .
      ?prop wdt:Q31 wd:Q62589316 . # Wikidata property for an identifier that suggests notability
    } UNION {
      ?x p:P973 ?statement . # described at URL
    }
  } AS ?notability2b_weak)

  BIND(EXISTS { # ?notability2b_strong
    {
      {
        ?x ?p ?statement .
        ?statement prov:wasDerivedFrom ?ref . 
      } MINUS {
        ?ref ?pr ?source .
        ?prop wikibase:reference ?pr .
        ?prop wdt:P31 wd:Q113558322 . # Wikidata property that suggests a reference is weak
      }
    } UNION {
      ?x ?p ?statement .
      ?prop wikibase:claim ?p .
      ?prop wdt:Q31 wd:Q62589316 . # Wikidata property for an identifier that suggests notability
    } UNION {
      ?x p:P973 ?statement . # described at URL
    }
  } AS ?notability2b_strong)

  # N3: It fulfills a structural need, for example: it is needed to make statements made in other items more useful.
  BIND(EXISTS { # ?notability3_strong
    ?statement ?ps ?x .
    ?other ?p ?statement .
    ?prop wikibase:claim ?p .
    FILTER(?other != ?x)
  } AS ?notability3_strong)

  BIND(?notability3_strong as ?notability3_weak) # FUTURE

  BIND((?notability1_strong|| (?notability2a_strong && ?notability2b_strong) || ?notability3_strong) AS ?notability_strong)
  BIND((?notability1_weak || (?notability2a_weak && ?notability2b_weak) || ?notability3_weak) AS ?notability_weak)

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?exists"):::projected v3("?notability1_strong"):::projected v4("?notability1_weak"):::projected v6("?notability2a_strong"):::projected v5("?notability2a_weak"):::projected v8("?notability2b_strong"):::projected v7("?notability2b_weak"):::projected v9("?notability3_strong"):::projected v10("?notability3_weak"):::projected v11("?notability_strong"):::projected v12("?notability_weak"):::projected v1("?x"):::projected c2(["bd:serviceParam"]):::iri c4(["en"]):::literal bind0[/VALUES ?x/] bind0-->v1 bind00(["wd:Q42"]) bind00 --> bind0 bind01(["wd:Q48507154"]) bind01 --> bind0 bind02(["wd:Q113547783"]) bind02 --> bind0 bind03(["wd:Q107204561"]) bind03 --> bind0 bind04(["wd:Q113547694"]) bind04 --> bind0 bind05(["wd:Q113548247"]) bind05 --> bind0 bind06(["wd:Q113548224"]) bind06 --> bind0 bind07(["wd:Q113551800"]) bind07 --> bind0 bind08(["wd:Q108218763"]) bind08 --> bind0 bind09(["wd:Q58409749"]) bind09 --> bind0 v1 --"schema:version"--> null bind1[/" "/] subgraph bind1e0["Exists Clause"] e0v1 --"schema:version"--> e0v2 e0v2("?version"):::projected e0v1("?x"):::projected end bind1--EXISTS--> bind1e0 v1 --o bind1 null --o bind1 null --o bind1 bind1 --as--o v2 null --"schema:about"--> v1 bind2[/" "/] subgraph bind2e1["Exists Clause"] e1v1 --"schema:about"--> e1v2 e1v1("?sitelink"):::projected e1v2("?x"):::projected end bind2--EXISTS--> bind2e1 null --o bind2 null --o bind2 v1 --o bind2 bind2 --as--o v3 bind3[/"?notability1_strong"/] v3 --o bind3 bind3 --as--o v4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P856"--> null end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 -->null--> null null --"wikibase:claim"--> null null --"wikibase:propertyType"--> null end union0r <== or ==> union0l end bind4[/" "/] subgraph bind4e2["Exists Clause"] subgraph unione20[" Union "] subgraph unione20l[" "] style unione20l fill:#abf,stroke-dasharray: 3 3; e2v1 --"p:P856"--> e2v3 end subgraph unione20r[" "] style unione20r fill:#abf,stroke-dasharray: 3 3; e2v1 -->e2v2--> e2v3 e2v4 --"wikibase:claim"--> e2v2 e2v4 --"wikibase:propertyType"--> e2c3 end unione20r <== or ==> unione20l end e2v2("?p"):::projected e2v4("?prop"):::projected e2v3("?statement"):::projected e2v1("?x"):::projected e2c3(["wikibase:ExternalId"]):::iri end bind4--EXISTS--> bind4e2 v1 --o bind4 null --o bind4 null --o bind4 null --o bind4 null --o bind4 null --o bind4 null --o bind4 null --o bind4 bind4 --as--o v5 v1 -->null--> null null --"wikibase:claim"--> null null --"wikibase:propertyType"--> null subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; null --"p:direct/P279"--> null null --"p:direct/P31"--> null end bind6[/" "/] subgraph bind6e3["Exists Clause"] e3v1 -->e3v2--> e3v3 e3v4 --"wikibase:claim"--> e3v2 e3v4 --"wikibase:propertyType"--> e3c3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; e3v4 --"p:direct/P279"--> e3a1 e3a1 --"p:direct/P31"--> e3c6 end e3v2("?p"):::projected e3v4("?prop"):::projected e3v3("?statement"):::projected e3v1("?x"):::projected e3a1((" ")):::projected e3c6(["wd:Q105388954"]):::iri e3c3(["wikibase:ExternalId"]):::iri end bind6--EXISTS--> bind6e3 v1 --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 null --o bind6 bind6 --as--o v6 subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P973"--> null end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 -->null--> null null --"wikibase:claim"--> null null --"p:direct/Q31"--> null end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 -->null--> null null --"prov:wasDerivedFrom"--> null end union1r <== or ==> union1l end bind7[/" "/] subgraph bind7e4["Exists Clause"] subgraph unione40[" Union "] subgraph unione40l[" "] style unione40l fill:#abf,stroke-dasharray: 3 3; subgraph unione41[" Union "] subgraph unione41l[" "] style unione41l fill:#abf,stroke-dasharray: 3 3; e4v1 --"p:P973"--> e4v3 end subgraph unione41r[" "] style unione41r fill:#abf,stroke-dasharray: 3 3; e4v1 -->e4v2--> e4v3 e4v5 --"wikibase:claim"--> e4v2 e4v5 --"p:direct/Q31"--> e4c4 end unione41r <== or ==> unione41l end end subgraph unione40r[" "] style unione40r fill:#abf,stroke-dasharray: 3 3; e4v1 -->e4v2--> e4v3 e4v3 --"prov:wasDerivedFrom"--> e4v4 end unione40r <== or ==> unione40l end e4v2("?p"):::projected e4v5("?prop"):::projected e4v4("?ref"):::projected e4v3("?statement"):::projected e4v1("?x"):::projected e4c4(["wd:Q62589316"]):::iri end bind7--EXISTS--> bind7e4 v1 --o bind7 null --o bind7 null --o bind7 null --o bind7 null --o bind7 null --o bind7 null --o bind7 null --o bind7 null --o bind7 null --o bind7 bind7 --as--o v7 subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P973"--> null end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v1 -->null--> null null --"wikibase:claim"--> null null --"p:direct/Q31"--> null end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v1 -->null--> null null --"prov:wasDerivedFrom"--> null subgraph minus8["MINUS"] style minus8 stroke-width:6px,fill:pink,stroke:red; null -->null--> null null --"wikibase:reference"--> null null --"p:direct/P31"--> null end end union3r <== or ==> union3l end bind9[/" "/] subgraph bind9e5["Exists Clause"] subgraph unione50[" Union "] subgraph unione50l[" "] style unione50l fill:#abf,stroke-dasharray: 3 3; subgraph unione51[" Union "] subgraph unione51l[" "] style unione51l fill:#abf,stroke-dasharray: 3 3; e5v1 --"p:P973"--> e5v3 end subgraph unione51r[" "] style unione51r fill:#abf,stroke-dasharray: 3 3; e5v1 -->e5v2--> e5v3 e5v7 --"wikibase:claim"--> e5v2 e5v7 --"p:direct/Q31"--> e5c7 end unione51r <== or ==> unione51l end end subgraph unione50r[" "] style unione50r fill:#abf,stroke-dasharray: 3 3; e5v1 -->e5v2--> e5v3 e5v3 --"prov:wasDerivedFrom"--> e5v4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; e5v4 -->e5v5--> e5v6 e5v7 --"wikibase:reference"--> e5v5 e5v7 --"p:direct/P31"--> e5c4 end end unione50r <== or ==> unione50l end e5v2("?p"):::projected e5v5("?pr"):::projected e5v7("?prop"):::projected e5v4("?ref"):::projected e5v6("?source"):::projected e5v3("?statement"):::projected e5v1("?x"):::projected e5c4(["wd:Q113558322"]):::iri e5c7(["wd:Q62589316"]):::iri end bind9--EXISTS--> bind9e5 v1 --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 null --o bind9 bind9 --as--o v8 f10[["?other != ?x"]] f10 --> null f10 --> v1 null -->null--> v1 null -->null--> null null --"wikibase:claim"--> null bind11[/" "/] subgraph bind11e6["Exists Clause"] e6f0[["?other != ?x"]] e6f0 --> e6v1 e6f0 --> e6v2 e6v3 -->e6v4--> e6v2 e6v1 -->e6v5--> e6v3 e6v6 --"wikibase:claim"--> e6v5 e6v1("?other"):::projected e6v5("?p"):::projected e6v6("?prop"):::projected e6v4("?ps"):::projected e6v3("?statement"):::projected e6v2("?x"):::projected end bind11--EXISTS--> bind11e6 null --o bind11 v1 --o bind11 null --o bind11 null --o bind11 null --o bind11 null --o bind11 null --o bind11 bind11 --as--o v9 bind12[/"?notability3_strong"/] v9 --o bind12 bind12 --as--o v10 bind13[/"(?notability1_strong || (?notability2a_strong?notability2b_strong || ?notability3_strong))"/] v3 --o bind13 v6 --o bind13 v8 --o bind13 v9 --o bind13 bind13 --as--o v11 bind14[/"(?notability1_weak || (?notability2a_weak?notability2b_weak || ?notability3_weak))"/] v4 --o bind14 v5 --o bind14 v7 --o bind14 v10 --o bind14 bind14 --as--o v12 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end