-
Notifications
You must be signed in to change notification settings - Fork 0
/
count_Tokens_per_base.rq
51 lines (48 loc) · 2.94 KB
/
count_Tokens_per_base.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
###############################################
# TITLE: Velez's Dictionary: from definitions to corpus by bases
# DESCRIPTION: Search for verbal lemmas whose set of definitions in the Velez dictionary includes the concept of 'speaking' (by means of the literal strings "fallar") and counts the frequency of verbal lemmas that share the same lexical base in the works of five historians (Caesar, Sallustius, Tacitus, Quintus-Curtius and Hirtius) and in two epic poems (Virgilius' Aeneid and Lucanus' Pharsalia).
###############################################
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX powla: <http://purl.org/powla/powla.owl#>
# Search for verbal lemmas whose set of definitions in the Velez dictionary includes the concept of 'speaking' (by means of the literal strings "fallar") and counts the frequency of verbal lemmas that share the same 'lexical base' in the works of five historians (Caesar, Sallustius, Tacitus, Quintus-Curtius and Hirtius) and in two epic poems (Virgilius' Aeneid and Lucanus' Pharsalia).
# 32 results in 2.648 seconds
SELECT ?baseLabel (count(?token) as ?occurrences) ?title
WHERE {
#
# filter the lexicon
VALUES ?lexicon {
<http://lila-erc.eu/data/lexicalResources/LatinPortuguese/Velez/Lexicon>
} .
?lexicon lime:entry ?lexentry .
?lexentry ontolex:canonicalForm ?lemma ;
ontolex:sense ?lexsense .
?lexsense <http://www.w3.org/2004/02/skos#definition> ?definition .
FILTER (regex(?definition, "^fallar")||regex(?definition, " fallar"))
#
# prende i lemmi
?lemma lila:hasPOS lila:verb ;
rdfs:label ?label ;
lila:hasBase ?base .
?base rdfs:label ?baseLabel .
#
?token lila:hasLemma ?lemmaT .
?lemmaT lila:hasPOS lila:verb ; lila:hasBase ?base .
?texts ^powla:hasLayer ?token .
?texts dc:description ?title .
VALUES ?texts {
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/CaesarBellum%20Gallicum/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/CaesarBellum%20Civile/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/CurtiusCurtius%20Historiae%20Alexandri%20Magni/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/HirtiusBellum%20Gallicum/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/SallustiusCatilina/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/SallustiusJugurtha/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/TacitusTac%20Annales/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/TacitusTac%20Historiae/DocumentLayer>
<http://lila-erc.eu/data/corpora/Lasla/id/corpus/VergiliusAeneis/DocumentLayer>
<http://lila-erc.eu/data/corpora/CIRCSELatinLibrary/id/corpus/Pharsalia/DocumentLayer>
}.
} order by ?title ?baseLabel