346
edits
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Here you find some SPARQL queries that you can use, and also modify or combine. | Here you find some SPARQL queries that you can use, and also modify or combine. To start a query from scratch, you may use this: | ||
<sparql tryit="1"> | |||
PREFIX qwb: <https://qichwa.wikibase.cloud/entity/> | |||
PREFIX qdp: <https://qichwa.wikibase.cloud/prop/direct/> | |||
PREFIX qp: <https://qichwa.wikibase.cloud/prop/> | |||
PREFIX qps: <https://qichwa.wikibase.cloud/prop/statement/> | |||
PREFIX qpq: <https://qichwa.wikibase.cloud/prop/qualifier/> | |||
PREFIX qpr: <https://qichwa.wikibase.cloud/prop/reference/> | |||
PREFIX qno: <https://qichwa.wikibase.cloud/prop/novalue/> | |||
SELECT * WHERE {} | |||
</sparql> | |||
=Lexical Entries= | =Lexical Entries= | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 10: | Line 21: | ||
order by lcase(?lemma) | order by lcase(?lemma) | ||
</sparql> | </sparql> | ||
==Problematic lexical entries== | |||
<sparql tryit="1"> | |||
# this lists all lexical entries with bracket, semicolon, or comma in the lemma sign | |||
select ?entry ?lemma ?posLabel | |||
where {?entry a ontolex:LexicalEntry; | |||
wikibase:lemma ?lemma; | |||
wikibase:lexicalCategory [rdfs:label ?posLabel]. | |||
filter(lang(?posLabel)="en") | |||
filter(regex(?lemma,'[();,]'))} | |||
order by lcase(?lemma) | |||
</sparql> | |||
=Senses and sense descriptions= | |||
<sparql tryit="1"> | |||
#this lists entries that have senses and sense descriptions | |||
select ?entry ?lemma ?posLabel (group_concat(concat(str(?sensegloss)," (",lang(?sensegloss),")");SEPARATOR="; ") as ?sense_descriptions) | |||
where { | |||
?entry a ontolex:LexicalEntry; | |||
wikibase:lemma ?lemma; | |||
wikibase:lexicalCategory [rdfs:label ?posLabel] . filter(lang(?posLabel)="en") | |||
?entry ontolex:sense [skos:definition ?sensegloss]. | |||
} group by ?entry ?lemma ?posLabel ?sense_descriptions | |||
limit 100 # remove the limit and get all entries that have sense descriptions | |||
</sparql> | |||
=Dialectal lemma variants= | =Dialectal lemma variants= | ||
<sparql tryit="1"> | <sparql tryit="1"> |