-
Notifications
You must be signed in to change notification settings - Fork 0
/
prefix_desiderative.rq
64 lines (48 loc) · 2.39 KB
/
prefix_desiderative.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
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#>
PREFIX prinparlat: <http://lila-erc.eu/ontologies/prinparlat/>
#count the number of derivative lemmas featuring a certain affix
SELECT ?prefixlabel (COUNT( DISTINCT ?secondarylemma) as ?secondarylemmacount) WHERE {
<http://lila-erc.eu/data/lexicalResources/LIV/Lexicon> lime:entry ?livlexentry.
?livlexentry ontolex:canonicalForm ?lemma;
vartrans:lexicalRel ?latstem.
?etylink lemonEty:etyTarget ?latstem;
lemonEty:etySource ?piestem.
?piestem prinparlat:stemType ?piestemtype.
#restrict the results just to lemmas descending from desiderative stems
VALUES ?piestemtype {<http://lila-erc.eu/data/lexicalResources/LIV/id/LexicalEntry/id/Stems/desiderative_stem>}
#exclude the lemmas descending from the innovative stems
FILTER NOT EXISTS { ?etylink lemonEty:etySource <http://lila-erc.eu/data/lexicalResources/LIV/id/Themes/->}
?lemma lila:hasBase ?base.
?secondarylemma lila:hasBase ?base.
?base rdfs:label ?baselabel.
?secondarylemma lila:hasPrefix ?prefix.
?prefix rdfs:label ?prefixlabel.
#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 ?prefixlabel ?secondarylemmacount ORDER BY DESC (?secondarylemmacount)