-
Notifications
You must be signed in to change notification settings - Fork 0
/
suffix_lilaLB.rq
49 lines (36 loc) · 1.67 KB
/
suffix_lilaLB.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
PREFIX lemonEty: <http://lari-datasets.ilc.cnr.it/lemonEty#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX vartrans: <http://www.w3.org/ns/lemon/vartrans#>
#count the number of derivative lemmas featuring a certain affix
SELECT ?suffixlabel (COUNT( DISTINCT ?secondarylemma) as ?secondarylemmacount) WHERE {
?lemma lila:hasBase ?base.
?secondarylemma lila:hasBase ?base.
?secondarylemma lila:hasSuffix ?suffix.
?suffix rdfs:label ?suffixlabel.
#restrict the results just to Classical Latin lemmas
BIND(xsd:integer(STRAFTER(STR(?secondarylemma), "http://lila-erc.eu/data/id/lemma/")) AS ?lemmaNumber)
FILTER NOT EXISTS { ?secondarylemma rdf:type lila:Lemma.
FILTER (
(?lemmaNumber >= 1 && ?lemmaNumber <= 86822) ||
(?lemmaNumber >= 131479 && ?lemmaNumber <= 135661)
)
}
FILTER (
STR(?secondarylemma) NOT IN (
"http://lila-erc.eu/data/id/lemma/156423",
"http://lila-erc.eu/data/id/lemma/156422",
"http://lila-erc.eu/data/id/lemma/156421",
"http://lila-erc.eu/data/id/lemma/156420",
"http://lila-erc.eu/data/id/lemma/135916",
"http://lila-erc.eu/data/id/lemma/135915",
"http://lila-erc.eu/data/id/lemma/135914",
"http://lila-erc.eu/data/id/lemma/135913",
"http://lila-erc.eu/data/id/lemma/135912"
)
)
} GROUP BY ?suffixlabel ?secondarylemmacount ORDER BY DESC (?secondarylemmacount)