The LiITA Knowledge Base is accessible through our SPARQL endpoint, where you can perform advanced queries on the data.
Example Queries:
Quantitative distribution of PoS in LiITA
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
SELECT ?pos (COUNT(*) as ?count)
WHERE {
GRAPH <http://liita.it/data> {
?lemma a lila:Lemma .
?lemma lila:hasPOS ?pos .
}
}
GROUP BY ?pos
ORDER BY DESC (?count )
Count how many nouns end in -ione
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
SELECT COUNT(*) as ?count
WHERE {
GRAPH <http://liita.it/data> {
?lemma a lila:Lemma .
?lemma lila:hasPOS lila:noun .
?lemma ontolex:writtenRep ?wr .
FILTER regex(str(?wr), "ione$") .
}
}
Lemmas starting in infra-
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
SELECT ?lemma ?wr
WHERE {
GRAPH <http://liita.it/data> {
?lemma a lila:Lemma .
?lemma ontolex:writtenRep ?wr .
FILTER regex(str(?wr), "^infra") .
}
}
Find all Italian entries linked to CompL-IT where the definition starts with the word “uccello”, and show its translation in the Parmigian Glossary
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX vartrans: <http://www.w3.org/ns/lemon/vartrans#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX onto: <http://www.ontotext.com/>
PREFIX lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?liitaLemma ?lemma ?parmigianoLemma ?wr ?definition WHERE
{
SERVICE <https://klab.ilc.cnr.it/graphdb-compl-it/> {
?word a ontolex:Word ;
lexinfo:partOfSpeech [ rdfs:label ?pos ] ;
ontolex:sense ?sense ;
ontolex:canonicalForm ?form .
?form ontolex:writtenRep ?lemma .
OPTIONAL {
?sense skos:definition ?definition
} .
OPTIONAL {
?sense lexinfo:senseExample ?example
} .
FILTER(str(?pos) = "noun") .
FILTER (strstarts(str(?definition), "uccello")).
}
?word ontolex:canonicalForm ?liitaLemma.
?leItaLexiconPar ontolex:canonicalForm ?liitaLemma;
^lime:entry <http://liita.it/data/id/LexicalReources/DialettoParmigiano/Lexicon>.
?leItaLexiconPar vartrans:translatableAs ?leParLexiconPar.
?leParLexiconPar ontolex:canonicalForm ?parmigianoLemma.
?parmigianoLemma ontolex:writtenRep ?wr
} group by ?wr
Retrieves the Italian entries in the Parmigian Glossary linked to CompL-it whose definition begins with ‘colore’
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX vartrans: <http://www.w3.org/ns/lemon/vartrans#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX onto: <http://www.ontotext.com/>
PREFIX lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE
{
SERVICE <https://klab.ilc.cnr.it/graphdb-compl-it/> {
?word a ontolex:Word ;
lexinfo:partOfSpeech [ rdfs:label ?pos ] ;
ontolex:sense ?sense ;
ontolex:canonicalForm ?form .
?form ontolex:writtenRep ?lemma .
OPTIONAL {
?sense skos:definition ?definition
} .
OPTIONAL {
?sense lexinfo:senseExample ?example
} .
FILTER(str(?pos) = "noun") .
FILTER (strstarts(str(?definition), "colore")).
}
}
Retrieves the Parmigiano and LiITA lemmas of the hyponyms of the lemma ‘colore’ in CompL-it
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX vartrans: <http://www.w3.org/ns/lemon/vartrans#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX onto: <http://www.ontotext.com/>
PREFIX lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?senseHyponym
GROUP_CONCAT(str(?_definition);SEPARATOR="; esempio: ") AS ?definition
?liitaLemma ?parmigianoLemma ?wr
WHERE
{
SERVICE <https://klab.ilc.cnr.it/graphdb-compl-it/> {
?word a ontolex:Word ;
lexinfo:partOfSpeech [ rdfs:label ?pos ] ;
ontolex:sense ?sense ;
ontolex:canonicalForm [ ontolex:writtenRep ?lemma ] .
?sense lexinfo:hypernym ?senseHyponym .
OPTIONAL {
?senseHyponym skos:definition ?_definition
} .
FILTER(str(?pos) = "noun") .
FILTER(str(?lemma) = "colore") .
?wordHyponym ontolex:sense ?senseHyponym .
}
?wordHyponym ontolex:canonicalForm ?liitaLemma.
?leItaLexiconPar ontolex:canonicalForm ?liitaLemma;
^lime:entry <http://liita.it/data/id/LexicalReources/DialettoParmigiano/Lexicon>.
?leItaLexiconPar vartrans:translatableAs ?leParLexiconPar.
?leParLexiconPar ontolex:canonicalForm ?parmigianoLemma.
?parmigianoLemma ontolex:writtenRep ?wr
}
GROUP BY ?senseHyponym ?liitaLemma ?parmigianoLemma ?wr
ORDER BY ASC(?wr)
Retrieves the Parmigiano and LiITA lemmas corresponding to the meronyms of the lemma ‘giorno’ in CompL-it
PREFIX lime: <http://www.w3.org/ns/lemon/lime#>
PREFIX vartrans: <http://www.w3.org/ns/lemon/vartrans#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX onto: <http://www.ontotext.com/>
PREFIX lexinfo: <http://www.lexinfo.net/ontology/3.0/lexinfo#>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?senseMeronym
GROUP_CONCAT(str(?_definition);SEPARATOR="; esempio: ") AS ?definition
?liitaLemma ?parmigianoLemma ?wr
WHERE
{
SERVICE <https://klab.ilc.cnr.it/graphdb-compl-it/> {
?word a ontolex:Word ;
lexinfo:partOfSpeech [ rdfs:label ?pos ] ;
ontolex:sense ?sense ;
ontolex:canonicalForm [ ontolex:writtenRep ?lemma ] .
?senseMeronym lexinfo:partMeronym ?sense .
OPTIONAL {
?senseMeronym skos:definition ?_definition
} .
FILTER(str(?pos) = "noun") .
FILTER(str(?lemma) = "giorno") .
?wordMeronym ontolex:sense ?senseMeronym .
}
?wordMeronym ontolex:canonicalForm ?liitaLemma.
?leItaLexiconPar ontolex:canonicalForm ?liitaLemma;
^lime:entry <http://liita.it/data/id/LexicalReources/DialettoParmigiano/Lexicon>.
?leItaLexiconPar vartrans:translatableAs ?leParLexiconPar.
?leParLexiconPar ontolex:canonicalForm ?parmigianoLemma.
?parmigianoLemma ontolex:writtenRep ?wr
}
GROUP BY ?senseMeronym ?liitaLemma ?parmigianoLemma ?wr
ORDER BY ASC(?wr)
Retrieves all Sicilian lemmas having written representations containing the alternation “ed”-“ied”
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
SELECT ?lemmaSiciliano ?lemmaSicilianoLabel ?wr1 ?wr2
WHERE {
?lemmaSiciliano dcterms:isPartOf <http://liita.it/data/id/DialettoSiciliano/lemma/LemmaBank>.
?lemmaSiciliano rdfs:label ?lemmaSicilianoLabel.
?lemmaSiciliano ontolex:writtenRep ?wr1, ?wr2 .
filter( ?wr1 != ?wr2 ).
FILTER regex(str(?wr1), "ied") .
FILTER regex(str(?wr2), "ed") .
} group by ?lemmaSiciliano
Retrieves Sicilian common nouns ending with the abstract suffix “ìa” and show the correspoding Italian translations
PREFIX lila: <http://lila-erc.eu/ontologies/lila/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX vartrans: <http://www.w3.org/ns/lemon/vartrans#>
SELECT ?lemma (GROUP_CONCAT(DISTINCT ?wr ;separator=", ") as ?wrs) ?liitaLemma (GROUP_CONCAT(DISTINCT ?wrIT ;separator=", ") as ?wrsIT)
WHERE {
?lemma dcterms:isPartOf <http://liita.it/data/id/DialettoSiciliano/lemma/LemmaBank>.
?lemma ontolex:writtenRep ?wr .
?lemma lila:hasPOS lila:noun .
?le ontolex:canonicalForm ?lemma.
?leITA vartrans:translatableAs ?le;
ontolex:canonicalForm ?liitaLemma.
?liitaLemma ontolex:writtenRep ?wrIT.
FILTER regex(str(?wr), "ìa$") .
} group by ?lemma ?liitaLemma