SPARQL Queries: Difference between revisions
From Kurdî Wikibase
No edit summary |
|||
Line 20: | Line 20: | ||
==Lexemes and Senses== | ==Lexemes and Senses== | ||
===Languages / language varieties=== | |||
Returns a bubble chart representing amounts of lexemes in different languages. | |||
<sparql tryit="1"> | |||
#defaultView:BubbleChart | |||
PREFIX kwb: <https://kurdi.wikibase.cloud/entity/> | |||
PREFIX kdp: <https://kurdi.wikibase.cloud/prop/direct/> | |||
PREFIX kp: <https://kurdi.wikibase.cloud/prop/> | |||
PREFIX kps: <https://kurdi.wikibase.cloud/prop/statement/> | |||
PREFIX kpq: <https://kurdi.wikibase.cloud/prop/qualifier/> | |||
PREFIX kpr: <https://kurdi.wikibase.cloud/prop/reference/> | |||
PREFIX kno: <https://kurdi.wikibase.cloud/prop/novalue/> | |||
select ?language ?languageLabel (count(?lexeme) as ?count) where { | |||
?lexeme dct:language ?language. | |||
?language rdfs:label ?languageLabel. filter(lang(?languageLabel)="en")} | |||
group by ?language ?languageLabel ?count | |||
</sparql> | |||
===List linked senses=== | ===List linked senses=== | ||
<sparql tryit="1"> | <sparql tryit="1"> |
Revision as of 10:45, 21 March 2023
SPARQL Queries
Kurdish Wikibase
Kurdish Wikibase Ontology Classes
This query lists Kurdish Wikibase Ontology Classes and their instances. Note that classes built in by default in a Wikibase, like e.g. ontolex:LexicalEntry, are not listed here.
PREFIX kwb: <https://kurdi.wikibase.cloud/entity/>
PREFIX kdp: <https://kurdi.wikibase.cloud/prop/direct/>
PREFIX kp: <https://kurdi.wikibase.cloud/prop/>
PREFIX kps: <https://kurdi.wikibase.cloud/prop/statement/>
PREFIX kpq: <https://kurdi.wikibase.cloud/prop/qualifier/>
PREFIX kpr: <https://kurdi.wikibase.cloud/prop/reference/>
PREFIX kno: <https://kurdi.wikibase.cloud/prop/novalue/>
select ?class ?classlabel (group_concat(concat(strafter(str(?instance),"https://kurdi.wikibase.cloud/entity/"),":",?instancelabel)) as ?instances) where {
?class kdp:P5 kwb:Q1; rdfs:label ?classlabel.
optional{?instance kdp:P5 ?class; rdfs:label ?instancelabel.}
} group by ?class ?classlabel ?instances
Kurdish Wikibase properties are found on this list. Also here, default properties, like e.g. ontolex:sense, are not listed.
Lexemes and Senses
Languages / language varieties
Returns a bubble chart representing amounts of lexemes in different languages.
#defaultView:BubbleChart
PREFIX kwb: <https://kurdi.wikibase.cloud/entity/>
PREFIX kdp: <https://kurdi.wikibase.cloud/prop/direct/>
PREFIX kp: <https://kurdi.wikibase.cloud/prop/>
PREFIX kps: <https://kurdi.wikibase.cloud/prop/statement/>
PREFIX kpq: <https://kurdi.wikibase.cloud/prop/qualifier/>
PREFIX kpr: <https://kurdi.wikibase.cloud/prop/reference/>
PREFIX kno: <https://kurdi.wikibase.cloud/prop/novalue/>
select ?language ?languageLabel (count(?lexeme) as ?count) where {
?lexeme dct:language ?language.
?language rdfs:label ?languageLabel. filter(lang(?languageLabel)="en")}
group by ?language ?languageLabel ?count
List linked senses
PREFIX kwb: <https://kurdi.wikibase.cloud/entity/>
PREFIX kdp: <https://kurdi.wikibase.cloud/prop/direct/>
PREFIX kp: <https://kurdi.wikibase.cloud/prop/>
PREFIX kps: <https://kurdi.wikibase.cloud/prop/statement/>
PREFIX kpq: <https://kurdi.wikibase.cloud/prop/qualifier/>
PREFIX kpr: <https://kurdi.wikibase.cloud/prop/reference/>
PREFIX kno: <https://kurdi.wikibase.cloud/prop/novalue/>
select ?lexeme ?sense ?linkedsense where {
?lexeme ontolex:sense ?sense.
?sense kdp:P9 ?linkedsense.
}