query-8bfe6e0b488ce7a2673d01765b62862c

rq turtle/ttl

tool: scholia PREFIX target: http://www.wikidata.org/entity/Q21045365 # Initial Sequencing of the human genome

SELECT (COUNT(?work) AS ?count) ?string (CONCAT("https://author-disambiguator.toolforge.org/names_oauth.php?doit=Look+for+author&name=", ENCODE_FOR_URI(?string)) AS ?author_resolver_url) WITH { SELECT DISTINCT ?authorstring WHERE { target: wdt:P50 ?authorQID .
{ target: wdt:P2093 ?authorstring . } UNION { { ?authorQID skos:altLabel ?author_. } UNION { ?authorQID rdfs:label ?author_. } BIND(STR(?author_) AS ?authorstring) } UNION { ?author_statement ps:P50 ?authorQID ; pq:P1932 ?authorstring. } } LIMIT 10000 } AS %rawstrings WITH

This part is due to Dipsacus fullonum, as per https://w.wiki/5Brk

{ # Calculate capitalization variants of these raw strings SELECT DISTINCT ?string WHERE { { INCLUDE %rawstrings BIND(STR(?authorstring) AS ?string) # the raw strings } UNION { INCLUDE %rawstrings BIND(UCASE(STR(?authorstring)) AS ?string) # uppercased versions of the raw strings } UNION { INCLUDE %rawstrings BIND(LCASE(STR(?authorstring)) AS ?string) # lowercased versions of the raw strings } } } AS %normalizedstrings WHERE { # Find works that have "author name string" values equal to these normalized strings INCLUDE %normalizedstrings ?work wdt:P2093 ?string. } GROUP BY ?string ORDER BY DESC (?count) LIMIT 200

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
# tool: scholia
PREFIX target: <http://www.wikidata.org/entity/Q21045365> # Initial Sequencing of the human genome

SELECT
(COUNT(?work) AS ?count) 
?string 
(CONCAT("https://author-disambiguator.toolforge.org/names_oauth.php?doit=Look+for+author&name=", 
        ENCODE_FOR_URI(?string)) AS ?author_resolver_url) 
WHERE {
  # Find works that have "author name string" values equal to these normalized strings

{
  # Calculate capitalization variants of these raw strings
  SELECT DISTINCT ?string
  WHERE
  {
    {
       {
  SELECT DISTINCT ?authorstring WHERE {
    target: wdt:P50 ?authorQID .    
    { target: wdt:P2093 ?authorstring . }
    UNION
    {
      { ?authorQID skos:altLabel ?author_. }
      UNION
      { ?authorQID rdfs:label ?author_. }
      BIND(STR(?author_) AS ?authorstring)
    }
    UNION
    {
      ?author_statement ps:P50 ?authorQID ;
                        pq:P1932 ?authorstring.
    }
  }
  LIMIT 10000
}      BIND(STR(?authorstring) AS ?string) # the raw strings
    }
    UNION
    {
       {
  SELECT DISTINCT ?authorstring WHERE {
    target: wdt:P50 ?authorQID .    
    { target: wdt:P2093 ?authorstring . }
    UNION
    {
      { ?authorQID skos:altLabel ?author_. }
      UNION
      { ?authorQID rdfs:label ?author_. }
      BIND(STR(?author_) AS ?authorstring)
    }
    UNION
    {
      ?author_statement ps:P50 ?authorQID ;
                        pq:P1932 ?authorstring.
    }
  }
  LIMIT 10000
}      BIND(UCASE(STR(?authorstring)) AS ?string) # uppercased versions of the raw strings
    }
    UNION
    {
       {
  SELECT DISTINCT ?authorstring WHERE {
    target: wdt:P50 ?authorQID .    
    { target: wdt:P2093 ?authorstring . }
    UNION
    {
      { ?authorQID skos:altLabel ?author_. }
      UNION
      { ?authorQID rdfs:label ?author_. }
      BIND(STR(?author_) AS ?authorstring)
    }
    UNION
    {
      ?author_statement ps:P50 ?authorQID ;
                        pq:P1932 ?authorstring.
    }
  }
  LIMIT 10000
}      BIND(LCASE(STR(?authorstring)) AS ?string) # lowercased versions of the raw strings
    }
  }
}  ?work wdt:P2093 ?string. 
}
GROUP BY ?string
ORDER BY DESC (?count)
LIMIT 200

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?authorQID") v4("?author_") v8("?author_resolver_url") v5("?author_statement") v7("?authorstring") v8("?count") v7("?string"):::projected v7("?work"):::projected c1([http://www.wikidata.org/entity/Q21045365]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P50"--> v2 subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; v5 --"ps:P50"--> v2 v5 --"pq:P1932"--> v7 end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; v2 --"rdfs:label"--> v4 end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v2 --"skos:altLabel"--> v4 end union4r <== or ==> union4l end bind0[/"str(?author_)"/] v4 --o bind0 bind0 --as--o v7 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P2093"--> v7 end union2r <== or ==> union2l end bind1[/"lower-case(str(?authorstring))"/] v7 --o bind1 bind1 --as--o v7 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P50"--> v2 subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; subgraph union6[" Union "] subgraph union6l[" "] style union6l fill:#abf,stroke-dasharray: 3 3; v5 --"ps:P50"--> v2 v5 --"pq:P1932"--> v7 end subgraph union6r[" "] style union6r fill:#abf,stroke-dasharray: 3 3; subgraph union7[" Union "] subgraph union7l[" "] style union7l fill:#abf,stroke-dasharray: 3 3; v2 --"rdfs:label"--> v4 end subgraph union7r[" "] style union7r fill:#abf,stroke-dasharray: 3 3; v2 --"skos:altLabel"--> v4 end union7r <== or ==> union7l end bind2[/"str(?author_)"/] v4 --o bind2 bind2 --as--o v7 end union6r <== or ==> union6l end end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P2093"--> v7 end union5r <== or ==> union5l end bind3[/"upper-case(str(?authorstring))"/] v7 --o bind3 bind3 --as--o v7 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P50"--> v2 subgraph union8[" Union "] subgraph union8l[" "] style union8l fill:#abf,stroke-dasharray: 3 3; subgraph union9[" Union "] subgraph union9l[" "] style union9l fill:#abf,stroke-dasharray: 3 3; v5 --"ps:P50"--> v2 v5 --"pq:P1932"--> v7 end subgraph union9r[" "] style union9r fill:#abf,stroke-dasharray: 3 3; subgraph union10[" Union "] subgraph union10l[" "] style union10l fill:#abf,stroke-dasharray: 3 3; v2 --"rdfs:label"--> v4 end subgraph union10r[" "] style union10r fill:#abf,stroke-dasharray: 3 3; v2 --"skos:altLabel"--> v4 end union10r <== or ==> union10l end bind4[/"str(?author_)"/] v4 --o bind4 bind4 --as--o v7 end union9r <== or ==> union9l end end subgraph union8r[" "] style union8r fill:#abf,stroke-dasharray: 3 3; c1 --"wdt:P2093"--> v7 end union8r <== or ==> union8l end bind5[/"str(?authorstring)"/] v7 --o bind5 bind5 --as--o v7 end union0r <== or ==> union0l end v7 --"wdt:P2093"--> v7 bind7[/"count(?work)"/] v7 --o bind7 bind7 --as--o v8 bind8[/"concat('https://author-disambiguator.toolforge.org/names_oauth.php?doit=Look+for+author&name=',encode-for-uri(?string))"/] v7 --o bind8 bind8 --as--o v8