# SPARQL/WIKIDATA Lexicographical data

The data on WIKIDATA contains more info than only triples with concepts: Q-items are related to a thing or an idea. Since 2018, Wikidata has also stored a new type of data: words, phrases and sentences, in many languages, described in many languages. This information is stored in new types of entities, called Lexemes (L), Forms (F) and Senses (S).
Comment This chapter is not yet complete. Please help expand this.
| Glossary | SPARQL code |
| A Lexeme is a lexical element of a language, such as a word, a phrase, or a prefix (see Lexeme on Wikipedia). Lexemes are Entities in the sense of the Wikibase data model. A Lexeme is described using the following information: An ID. Lexemes have IDs starting with an "L" followed by a natural number in decimal notation, e.g. L3746552. These IDs are unique within the repository that manages the Lexeme. The ID can be combined with a repository's concept base URI to form a unique URI for the Lexeme. A Lemma for use as a human readable representation of the lexeme, e.g. "run". The Language to which the lexeme belongs. This is a reference to a concrete Item, e.g. English (Q1860). The Lexical category to which the lexeme belongs. This is given as a reference to a concrete Item, e.g. adjective (Q34698). A list of Lexeme Statements to describe properties of the lexeme that are not specific to a Form or Sense (e.g. derived from or grammatical gender or syntactic function) | ?l a ontolex:LexicalEntry . ?l wikibase:lemma ?word . ?l dct:language wd:Q1860 . # English ?l wikibase:lexicalCategory ?category . |
| A list of Forms, typically one for each relevant combination of grammatical features, such as 2nd person / singular / past tense. A Form is described using the following information: An ID. Forms have IDs starting with the ID of the Lexeme they belong to, followed by a hyphen ("-") and an "F", followed by a natural number in decimal notation: e.g. L3746552-F7 A representation, spelling out the Form as a string. A list of grammatical features that define for which syntactic role the given form applies. These are given as references to a concrete Items, e.g. participle (Q814722) for participle. A list of Form Statements further describing the Form or its relations to other Forms or Items (e.g. IPA transcription (P898), pronunciation audio, rhymes with, used until, used in region) | ?l ontolex:lexicalForm ?form . ?form a ontolex:Form . ?form ontolex:representation ?word . ?form wikibase:grammaticalFeature ?feat . |
| A list of Senses, describing the different meanings of the lexeme (e.g. "financial institution" and "edge of a body of water" for the English noun bank). A sense is described using the following information: An ID. Senses have IDs starting with the ID of the Lexeme they belong to, followed by a hyphen ("-") and an "S", followed by a natural number in decimal notation: e.g. L3746552-S4. These IDs are unique within the repository that manages the Lexeme. The ID can be combined with a repository's concept base URI to form a unique URI for the Sense. A Gloss, defining the meaning of the Sense using natural language. A list of Sense Statements further describing the Sense and its relations to Senses and Items (e.g. translation, synonym, antonym, connotation, register, denotes, evokes). | ?l ontolex:sense ?sense . ?sense a ontolex:LexicalSense . ?sense skos:definition ?gloss . FILTER(LANG(?gloss) = "sv") |

### Prefixes

Prefixes used only for Lexicograpical data are:
Try it!

### Examples
#### Get swedish gloss of specific lexeme

Try it!

#### Get senses of a specific lexeme that has P5137 (item for this sense)

Try it!

#### Lexemes describing a color

Try it!

#### Words per language

Here is an overview of the number of words per language
Try it!

### English and American English

This query lists all words that are different in English and American English
Try it!

#### Overview of Lexical categories

Here is an overview of the most used Lexical categories in English:
Try it!

#### Longest words

Here as example a list of the longest words in English
Try it!

#### Adjectives

This example shows (English) adjectives and their positive, comparative and superlative degrees. By changing VALUES ?language { wd:Q1860 } this query can be changed into any language.
Try it!

#### Verbs

This example shows (English) verbs and their conjugations. This query is very complex because conjugations in Wikidata are modeled very complex. By changing VALUES ?language { "en" } this query can be changed into any language. Currently only a few verbs are conjugated.
Try it!

#### Articles in all languages

This example shows articles in many languages.
Try it!

### External tools

See Wikidata:Tools/Lexicographical data for a list of external tools for Lexicographical data.

### References

* d:Wikidata:Lexicographical data/Documentation
* Wikidata Query Lexemes in the Query Service