WDscholia / scholia

Wikidata-based scholarly profiles
https://scholia.toolforge.org
Other
223 stars 81 forks source link

Establish a mechanism to track wiki pages that do not have Template:Scholia but should #781

Open Daniel-Mietchen opened 5 years ago

Daniel-Mietchen commented 5 years ago

e.g. an author item linked to many of the corresponding publication items and with a Wikipedia page that does not use the template.

This should complement #460 and #768.

Daniel-Mietchen commented 5 years ago

I have some Listeria pages that can help in the process: https://www.wikidata.org/wiki/User:Daniel_Mietchen/Scholia/Examples

Daniel-Mietchen commented 5 years ago

Here is a query that looks for items that have both an ORCID and an English Wikipedia article and then checks whether that article has a Scholia template:

SELECT DISTINCT ?item #?itemLabel  
?article ?bool 
WHERE {
  ?item wdt:P496 ?orcid.

   {
      ?article schema:about ?item .
      ?article schema:inLanguage "en" .
      FILTER (SUBSTR(str(?article), 1, 25) = "https://en.wikipedia.org/")
  }
 OPTIONAL {   
   SELECT ?item ?pageid ?ns WHERE {
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "search" .
      bd:serviceParam mwapi:gsrsearch "hastemplate:Scholia" .
      bd:serviceParam mwapi:gsrlimit "max" .
      ?item wikibase:apiOutputItem mwapi:item .
      ?pageid wikibase:apiOutput "@pageid" .
      ?ns wikibase:apiOutput "@ns" .
    }
  } LIMIT 150
 }

  BIND( IF(BOUND(?article),   IF(BOUND(?ns), "yes" , "no" )  ,  "no"   )  AS ?bool).  

#  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Daniel-Mietchen commented 5 years ago

A first Listeria list based on the above query is now up at https://www.wikidata.org/wiki/Wikidata:WikiProject_Scholia/Listeria/author/English_Wikipedia_article_candidates_for_Scholia_template .

pigsonthewing commented 5 years ago

A simpler solution would be to add the Scholia link to {{Authority control}} (or equivalnet in other projects), such that it only displays if an ORCID/ Researcher ID/ Semantic Scholar, etc., value is present.

Daniel-Mietchen commented 5 years ago

Here is a different query where I have sliced the corpus not by ORCID but by whether these folks got an award and have published in a specific journal:

SELECT DISTINCT ?item ?itemLabel ?article ?rgb WHERE {
  ?item wdt:P31 wd:Q5 .
 ?item wdt:P166 ?award .
 ?paper wdt:P50 ?item ;
        wdt:P1433 wd:Q5533480 .
 OPTIONAL {   
   SELECT ?item ?pageid ?ns WHERE {
    SERVICE wikibase:mwapi {
      bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "search" .
      bd:serviceParam mwapi:gsrsearch "hastemplate:Scholia" .
      bd:serviceParam mwapi:gsrlimit "max" .
      ?item wikibase:apiOutputItem mwapi:item .
      ?pageid wikibase:apiOutput "@pageid" .
      ?ns wikibase:apiOutput "@ns" .
    }
  } LIMIT 1000
 }

  #OPTIONAL 
  {
      ?article schema:about ?item .
      ?article schema:inLanguage "en" .
      FILTER (SUBSTR(str(?article), 1, 25) = "https://en.wikipedia.org/")
  }

  BIND( IF(BOUND(?article),   IF(BOUND(?ns), "y" , "n" )  ,  "z"   )  AS ?rgb).  

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Daniel-Mietchen commented 5 years ago

Eventually, we should perhaps use something more generic like ShEx to determine whether a given Scholia profile meets some specified quality criteria.

Daniel-Mietchen commented 4 years ago

About a week ago, I have refined the query a bit further and updated the Listeria list for English Wikipedia article candidates for Scholia template accordingly. Seems to work well enough for now, just that the availability (or not) of academic tree information acts as a bottleneck.