Project:Example Queries: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 112: Line 112:


=== Lexemes ===
=== Lexemes ===
==== Dictionary ====
To return all lexemes in English in dictionary order, you can use the following:
<syntaxhighlight lang="sparql"><syntaxhighlight lang="sparql">SELECT ?headword ?categoryLabel {
  ?item wikibase:lemma ?headword .
  ?item wikibase:lexicalCategory ?category .
  ?item dct:language wd:Q2 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ASC(UCASE(str(?headword)))</syntaxhighlight>
==== Lexical Categories ====
==== Lexical Categories ====
This query returns the different lexical categories and the number of lexemes in each:
This query returns the different lexical categories and the number of lexemes in each:

Navigation menu