-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery_keyword.rq
75 lines (73 loc) · 2.06 KB
/
query_keyword.rq
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
select ?bol ?sc ?cat
{
{
# direct scores
{
(?res ?lsc ?l) text:query ( bdo:skosLabels "\"bka' 'gyur\""@bo-x-ewts ) .
} union {
(?title ?lsc ?l) text:query ( rdfs:label "\"bka' 'gyur\""@bo-x-ewts ) .
?res bdo:personName ?title .
}
?res tmp:entityScore ?sc .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
?res a ?cat .
BIND(f:ewtsToUnicode(?l) as ?bol)
} union {
# scores in the work
{
(?res ?lsc ?l) text:query ( bdo:skosLabels "\"bka' 'gyur\""@bo-x-ewts ) .
} union {
(?title ?lsc ?l) text:query ( rdfs:label "\"bka' 'gyur\""@bo-x-ewts ) .
?res bdo:hasTitle ?title .
}
?res :instanceOf ?wa .
?wa tmp:entityScore ?sc .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
BIND(bdo:Instance as ?cat) .
BIND(f:ewtsToUnicode(?l) as ?bol)
}
}
select ?ewts ?sc ?cat {
{
?res tmp:entityScore ?sc .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
?res skos:prefLabel ?ewts .
FILTER(lang(?ewts) = "bo-x-ewts")
?res a ?cat .
} union {
?res tmp:entityScore ?sc .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
?res a ?cat .
?res skos:altLabel ?ewts .
FILTER(lang(?ewts) = "bo-x-ewts")
} union {
?res tmp:entityScore ?sc .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
?res :personName ?pn .
?pn rdfs:label ?ewts .
FILTER(lang(?ewts) = "bo-x-ewts")
bind(:Person as ?cat)
} union {
?wa tmp:entityScore ?sc .
?res :instanceOf ?wa .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
?res skos:prefLabel ?ewts .
FILTER(lang(?ewts) = "bo-x-ewts")
bind(:Instance as ?cat)
} union {
?wa tmp:entityScore ?sc .
?res :instanceOf ?wa .
?resadm adm:adminAbout ?res ;
adm:status bda:StatusReleased .
bind(:Instance as ?cat)
?res :hasTitle ?t .
?t rdfs:label ?ewts .
FILTER(lang(?ewts) = "bo-x-ewts")
}
}