File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 22 # Number of works with the author
33 ?count
44
5+ # Author score - 3 points for authoring a work, 1 for being cited
6+ ?score
7+
58 # Author as a string
69 ?author
710
@@ -24,11 +27,37 @@ WITH {
2427 }
2528 GROUP BY ?author
2629} AS %result
30+
31+ # Generate a score for each author
32+ WITH {
33+ SELECT (SUM (?score_ ) AS ?score ) ?author
34+ WHERE {
35+ {
36+ # Assign them 3 points if they are an author of a work on the subject
37+ SELECT (3 AS ?score_ ) ?author ?work WHERE {
38+ ?work wdt:P2093 ?author .
39+ ?work wdt:P921/wdt:P279* wd:{{ q }} .
40+ }
41+ }
42+ UNION
43+ {
44+ # Assign them 1 point if they are the author of a work that is cited by a work on the subject
45+ SELECT (1 AS ?score_ ) ?author ?work WHERE {
46+ ?work wdt:P2093 ?author .
47+ ?citing_work wdt:P2860 ?work .
48+ ?citing_work wdt:P921/wdt:P279* wd:{{ q }} .
49+ }
50+ }
51+ }
52+ GROUP BY ?author
53+ } AS %scores
54+
2755WHERE {
2856 INCLUDE %result
57+ INCLUDE %scores
2958
3059 # Label the result
3160 SERVICE wikibase:label { bd:serviceParam wikibase:language " [AUTO_LANGUAGE],en" . }
3261}
33- ORDER BY DESC (?count )
62+ ORDER BY DESC (?count ) DESC ( ?score )
3463LIMIT 500
You can’t perform that action at this time.
0 commit comments