Skip to content

Commit 2de2647

Browse files
committed
Also show outgoing citation intentions
1 parent 993d9b0 commit 2de2647

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scholia/app/templates/work_cited-works.sparql

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
PREFIX target: <http://www.wikidata.org/entity/{{ q }}>
44

55
# List of works that is cited by the specified work
6-
SELECT ?citations ?publication_date ?cited_work ?cited_workLabel
6+
SELECT ?citations ?publication_date ?cited_work ?cited_workLabel
7+
(GROUP_CONCAT(DISTINCT ?intentionLabel;separator=", ") AS ?intentions)
78
WITH {
89
SELECT (MIN(?date) AS ?publication_date) (COUNT(DISTINCT ?citing_cited_work) AS ?citations) ?cited_work
910
WHERE {
@@ -18,6 +19,12 @@ WITH {
1819
} AS %result
1920
WHERE {
2021
INCLUDE %result
22+
OPTIONAL {
23+
target: p:P2860 ?citationStatement .
24+
?citationStatement pq:P3712 ?intention ;
25+
ps:P2860 ?cited_work .
26+
?intention rdfs:label ?intentionLabel . FILTER (lang(?intentionLabel) = "en")
27+
}
2128
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }
22-
}
29+
} GROUP BY ?citations ?publication_date ?cited_work ?cited_workLabel
2330
ORDER BY DESC(?citations) DESC(?date)

0 commit comments

Comments
 (0)