Skip to content

Commit 9d244b6

Browse files
committed
Add author score to the missing-author-items query
This uses the same scoring logic as in author-scores.sparql Prior to this, the only way to sort the list of missing authors was by their work count. This commit adds a "score" column to the table to make it easier to prioritise disambiguation efforts.
1 parent 0f891e9 commit 9d244b6

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

scholia/app/templates/topic-curation_missing-author-items.sparql

+30-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ SELECT
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+
2755
WHERE {
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)
3463
LIMIT 500

0 commit comments

Comments
 (0)