query-88a10892b78b78a9da1df6a40fddc798
title: Betydelser av svenska fraslexem med ett synonym
date: 2024-04-25
author: So9q
note: Thanks to Nikki and Ainali for help with selecting the synonym lexeme
SELECT ?l ?sense ?lemma ?synonym ?synonym_lemma WHERE { ?l ontolex:sense ?sense ; # the sense dct:language wd:Q9027 ; # the language wikibase:lemma ?lemma ; # and the lemma wikibase:lexicalCategory ?category. ?category wdt:P279/wdt:P31* wd:Q187931. # subclass of phrase ?sense wdt:P5973 ?synonym_sense . ?synonym ontolex:sense ?synonym_sense . # select synonym lexeme ?synonym wikibase:lemma ?synonym_lemma . # get the synonym lemma }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
#title: Betydelser av svenska fraslexem med ett synonym
# <span lang="en" dir="ltr" class="mw-content-ltr">date: 2024-04-25</span>
# <span lang="en" dir="ltr" class="mw-content-ltr">author: So9q</span>
# <span lang="en" dir="ltr" class="mw-content-ltr">note: Thanks to Nikki and Ainali for help with selecting the synonym lexeme</span>
SELECT ?l ?sense ?lemma ?synonym ?synonym_lemma WHERE {
?l ontolex:sense ?sense ; # <span lang="en" dir="ltr" class="mw-content-ltr">the sense</span>
dct:language wd:Q9027 ; # <span lang="en" dir="ltr" class="mw-content-ltr">the language</span>
wikibase:lemma ?lemma ; # <span lang="en" dir="ltr" class="mw-content-ltr">and the lemma</span>
wikibase:lexicalCategory ?category.
?category wdt:P279/wdt:P31* wd:Q187931. # <span lang="en" dir="ltr" class="mw-content-ltr">subclass of phrase</span>
?sense wdt:P5973 ?synonym_sense .
?synonym ontolex:sense ?synonym_sense . # <span lang="en" dir="ltr" class="mw-content-ltr">select synonym lexeme</span>
?synonym wikibase:lemma ?synonym_lemma . # <span lang="en" dir="ltr" class="mw-content-ltr">get the synonym lemma</span>
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?category")
v1("?l"):::projected
v3("?lemma"):::projected
v2("?sense"):::projected
v6("?synonym"):::projected
v7("?synonym_lemma"):::projected
v5("?synonym_sense")
a1((" "))
c3(["wd:Q9027"]):::iri
c8(["wd:Q187931"]):::iri
v1 --"ontolex:sense"--> v2
v1 --"dct:language"--> c3
v1 --"wikibase:lemma"--> v3
v1 --"wikibase:lexicalCategory"--> v4
v4 --"wdt:P279"--> a1
a1 --"wdt:P31"--> c8
v2 --"wdt:P5973"--> v5
v6 --"ontolex:sense"--> v5
v6 --"wikibase:lemma"--> v7