191,161
edits
Superraptor (talk | contribs) No edit summary |
Superraptor (talk | contribs) No edit summary |
||
Line 83: | Line 83: | ||
=== Lexemes === | === Lexemes === | ||
==== Instances of lexemes returned in dictionary order ==== | |||
This query returns all instances of English lexemes in dictionary order. It uses the service wikibase:label to return the labels in your default language or in English. | |||
<sparql tryit="1">PREFIX wd: <https://lgbtdb.wikibase.cloud/entity/> | |||
PREFIX wdt: <https://lgbtdb.wikibase.cloud/prop/direct/> | |||
SELECT ?headword ?categoryLabel { | |||
?item wikibase:lemma ?headword . # Returns the lemma as the headword for the entry | |||
?item wikibase:lexicalCategory ?category . # Returns the lexical category (noun, verb, etc.) | |||
?item dct:language wd:Q2 . # Returns only English-language lexemes | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en (English) language | |||
} ORDER BY ASC(UCASE(str(?headword))) # Orders the headwords in ascending order after being sent to uppercase | |||
</sparql> | |||
==== Instances of lexemes derived from a particular lexeme ==== | ==== Instances of lexemes derived from a particular lexeme ==== | ||
This query returns all instances of lexemes wherein at least one of the indicated etyma is the lexeme 'queen' (L127). It uses the service wikibase:label to return the labels in your default language or in English. | This query returns all instances of lexemes wherein at least one of the indicated etyma is the lexeme 'queen' (L127). It uses the service wikibase:label to return the labels in your default language or in English. | ||
Line 96: | Line 110: | ||
wikibase:lemma ?lemma . # Returns the lemma | wikibase:lemma ?lemma . # Returns the lemma | ||
?l wdt:P32 wd:L127. # Returns all lexemes with an etymon for 'queen' indicated. | ?l wdt:P32 wd:L127. # Returns all lexemes with an etymon for 'queen' indicated. | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en (English) language | |||
} | |||
</sparql> | |||
=== Mappings === | |||
==== Mappings between all versions of the Homosaurus ==== | |||
This query returns all instances of items with at least one mapping to one of the versions of the Homosaurus, providing mappings between them where possible. It uses the service wikibase:label to return the labels in your default language or in English. | |||
<sparql tryit="1">PREFIX wd: <https://lgbtdb.wikibase.cloud/entity/> | |||
PREFIX wdt: <https://lgbtdb.wikibase.cloud/prop/direct/> | |||
SELECT DISTINCT ?item ?itemLabel ?val_0 ?val_1 ?val_2 ?val_3 | |||
WHERE | |||
{ | |||
?item wdt:P29|wdt:P28|wdt:P27|wdt:P26 [] . # Must have a mapping to at least one of the versions of the Homosaurus available | |||
OPTIONAL { ?item wdt:P29 ?val_0 . } # Homosaurus Version 0 | |||
OPTIONAL { ?item wdt:P28 ?val_1 . } # Homosaurus Version 1 | |||
OPTIONAL { ?item wdt:P27 ?val_2 . } # Homosaurus Version 2 | |||
OPTIONAL { ?item wdt:P26 ?val_3 . } # Homosaurus Version 3 | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en (English) language | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en (English) language | ||
} | } |