-
Notifications
You must be signed in to change notification settings - Fork 2
/
scholia.yaml
89 lines (88 loc) · 3.15 KB
/
scholia.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# scholia sparql queries
# 2022-02-14 tholzheim
'WorksAndAuthor':
title: 'Works and their authors'
sparql: |
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Authors
SELECT ?work ?workLabel ?author ?authorLabel
WHERE
{
?work wdt:P50 ?author.
?work rdfs:label ?workLabel .
?author rdfs:label ?authorLabel.
}
LIMIT 10
'Papers with Fulltext':
title: 'Papers with Fulltext'
description: see also https://qlever.cs.uni-freiburg.de/wikidata/fd5w1u
sparql: |
#
# Example Query for
# https://github.com/WDscholia/scholia/issues/1774
#
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Scholarly articles with full text
SELECT ?paperLabel ?publishedInLabel ?event ?eventLabel ?fullText ?authors
WHERE
{
?paper wdt:P31 wd:Q13442814.
?paper rdfs:label ?paperLabel.
filter(lang(?paperLabel) = "en").
?paper wdt:P953 ?fullText.
# wikidata query service
#?paper wdt:P953 ?fullText filter (strends(str(?fullText), ".pdf" )).
# qlever
filter(regex(?fullText, "\\.pdf\\>$" )).
?paper wdt:P1433 ?publishedIn.
?publishedIn rdfs:label ?publishedInLabel.
filter(lang(?publishedInLabel) = "en" ).
?publishedIn wdt:P4745 ?event.
?event rdfs:label ?eventLabel.
filter(lang(?eventLabel) = "en").
{
SELECT (GROUP_CONCAT(?authorLabel) as ?authors) WHERE {
?paper wdt:P50 ?author.
?author rdfs:label ?authorLabel . filter(lang(?authorLabel) = "en").
} GROUP BY ?paper
}
}
'ACL-Paper2Event':
title:
description:
sparql: |
# ACL Anthology article ID
SELECT ?article ?articleLabel ?aclId ?publishedIn ?publishedInLabel ?event ?eventLabel WHERE {
#ACL Anthology article ID
?article wdt:P7505 ?aclId.
?article rdfs:label ?articleLabel .
#?aclIdStatement (ps:P7505) ?aclId.
?article wdt:P1433 ?publishedIn.
?publishedIn rdfs:label ?publishedInLabel .
#OPTIONAL {
# is proceedings from
?publishedIn wdt:P4745 ?event.
?event rdfs:label ?eventLabel.
#}
} LIMIT 50
'DblpAuthors':
title: find all persons with a dblp author id
description: see also https://qlever.cs.uni-freiburg.de/wikidata/73DtyS
sparql: |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Scholars by dblpId
SELECT ?scholar ?scholarLabel ?dlpId
WHERE
{
?scholar wdt:P31 wd:Q5.
?scholar wdt:P2456 ?dblpId.
?scholar rdfs:label ?scholarLabel .
}