Erweiterung:WikibaseLexeme/Datenmodell

From mediawiki.org
This page is a translated version of the page Extension:WikibaseLexeme/Data Model and the translation is 36% complete.
Outdated translations are marked like this.

Dieses Dokument steht unter Bearbeitung und beschreibt das konzeptuelle Datenmodell, welches von WikibaseLexeme genutzt wird. Es ist keine Spezifikation eines bestimmten Data Bindings, einer Implementierung, eines Mappings, oder einer Serialisierung.

The data model of WikibaseLexeme describes the structure of the data that is handled as "Lexemes" in Wikibase, such as words and phrases. While it would be theoretically possible to model these things using Items, a more expressive specialized model helps to reduce complexity, and improve re-use and mappings to other vocabularies. This data model is conceptual ("Which information do we have to support?") and does not specify how this data should be represented technically ("Which data structures should the software use?") or syntactically ("How should the data be expressed in a file?"). Separate documents describe the serialization of the Wikibase data model in JSON (JavaScript Object Notation) and in RDF (Resource Description Framework). The Lexeme data model defines basic concepts and relationships needed to describe lexemes, which act as a fixed ontology. This ontology provides a minimal scaffolding that allows Items and Statements to be used for detailed modeling of a lexeme. The specification of the Lexeme data model is based on the Wikibase data model, so the Wikidata glossary and the Wikibase data model primer may be helpful in understanding this document. The Lexeme data model aims to align with the LEMON model by the Ontolex W3C community group, where useful and practical. However, in the spirit of Wikibase, the Lexeme model is designed to be simple and flexible enough for casual collaborative editing, as opposed to the more formalized approach taken by LEMON.

Lexeme

Visualisierung des Lexeme-Datenmodelles

Ein Lexem ist ein lexikalisches element einer Sprache, wie zum Beispiel ein Wort, ein Ausdruck (Phrase) oder ein Präfix (siehe Lexem in der Wikipedia). Lexeme sind Entititäten im Sinne des Wikibase Datenmodells. Ein Lexem wird mit folgenden Informationen beschrieben:

  • Einer ID. Lexeme haben IDs, beginnend mit "L" gefolgt von einer natürlichen Zahl in Dezimalschreibweise, z.B. L3746552. Diese IDs sind eindeutig innerhalb des Repositories, welches die Lexeme verwaltet. Die ID kann mit der konzeptuellen Basis-URI eines Repositories kombiniert werden um eine eindeutige URI für das Lexem zu bilden.
  • Ein Lemma als menschenlesbare Darstellung für das Lexem z.B. "run".
  • * Die Sprache zu der das Lexem gehört. Diese ist ein Verweis auf ein Item, z.B. Q1860 für Englisch.
  • * Die Lexical category zu der das Lexem gehört. Dies ist auch ein Verweis auf ein konkretes Item, z.B. Q34698 für Adjektiv.
  • Eine Liste von Statements, die Eigenschaften des Lexems beschreiben, die nicht spezifisch zu Form oder Bedeutung gehören (z.B. abgeleitet von oder grammatikalisches Geschlecht oder syntaktische Funktion)
  • Eine Liste von Formen, üblicherweise eine für jede relevante Kombination aus grammatikalischen Eigenschaften, wie zum Beispiel Zweite Person / Einzahl / Präteritum.
  • Eine Liste von Bedeutungen, die die verschiedenen möglichen Interpretationen des Lexems beschreiben (z.B. "Finanzinstitut" und "Sitzgelegenheit für mehrere Personen nebeneinander" für das deutsche Substantiv Bank).

Editorial Note: Wir sollten einige Hinweise angeben, wie das grammatikalische Geschlecht mit Statements modelliert werden kann.

Lexeme statements

Instance of

In Wikidata they generally use the most general lexical category possible, e.g. affix and then instead describe which type of affix it is using an instance of-statement.

Usage examples

In Wikidata the community decided to have usage examples in one place on the lexeme because then they know where to look for them. They have to demonstrate two properties: form (d:Property:P5830) and sense (d:Property:P6072). They can have multiple examples from different time periods e.g. different centuries and for formality/informality and written/spoken.

Lemma

The lemma is a human readable representation of the lexeme (see Lemma on Wikipedia). Typically, the canonical form of the lexeme (e.g. the infinitive form of verbs) will be used as the lemma (see also lemon:canonicalForm). Lemmas sind keine einfachen Strings sondern MultilingualTextValues, da das gleiche Lemma mehrere Schreibweisen haben kann. Das ist insbesondere wichtig für sprachen, die mehrere Skripte benutzen, zum Beispiel Serbisch und Japanisch.

Example: Das Lemma für das Englische Substantiv color würde colour für britisches Englisch als auch color für amerikanisches Englisch enthalten. Das deutsche Januar würde so zum Beispiel Jänner für die österreichische Form als auch Januar für die hochdeutsche enthalten.

Ein Lemma kann nicht komplett leer sein, mindestens eine Form muss angegeben sein.

Lemmata sind nicht eindeutig, auch nicht die Kombination aus Lemma, Sprache und lexikalischer Kategorie. Zwei unterschiedliche Lexeme mit der selben lexischen Kategorie können in der gleichen Sprache existieren, wenn sie verschiedene Daten haben, dies könnte Geschlecht, Etymologie, Morphologie (verschiedene Formen) und so weiter sein.

Example: Es gibt zwei deutsche Substantive mit dem Lemma "See", die sich nur im grammatikalischen Geschlceht unterscheiden: "der See" mit der Bedeutung "von Land umschlossenes, flächengroßes stehendes Gewässer (eng: lake)", und "die See" als Synonym für "das Meer". Diese beiden Bedeutungen können nicht als ein einzelnes Lexem betrachtet werden, da sie zwei unterschiedliche Formen in abhängigkeit des Geschlechts haben. An example where there would only be one Lexeme would be the German word "Schild", which for its meaning "Shield" can be either masculine or neutral gendered based on the region in Germany (neutral in the north and parts of central Germany).

Form

The morphology of the lexeme is understood as a set of Forms. Each form defines how a lexeme changes based on a specific syntactic role or mode it may take in a sentence (see also lemon:Form).

Example: Das Englische Verb run wird im Partizip Präsens zu running und zu runs als dritte Person, Singular. Das Deutsche Verb laufen wird als Substantivierung zu (das) Laufen und zu läuft als dritte Person, Singular

Eine Form wird mit folgenden Informationen beschrieben:

  • Einer ID. Formen haben haben IDs beginnend mit der ID des Lexems, zu dem sie gehören, gefolgt von einem Bindestrich ("-") und einem "F", gefolgt von einer natürlichen Zahl in Dezimalschreibweise: z.B. L3746552-F7. Diese IDs sind eindeutig innerhalb des Repositories, welches die Lexeme verwaltet. Die ID kann mit der konzeptuellen Basis-URI eines Repositories kombiniert werden um eine eindeutige URI für diese Form zu erhalten.
  • Einer Darstellung, die die Form als String ausschreibt.
  • Eine Liste von grammatikalischen Eigenschaften die definieren, für welche syntaktischen Rollen eine Form gilt. Diese sind als Verweise zu bestimmten Items gegeben, z.B. Q814722 für Partizip.
  • Eine Liste von Statements, die die Form weiter beschreiben oder sie in Relation zu anderen Formen oder Items setzen (z.B. Aussprache (Audio), reimt sich auf, benutzt bis, benutzt in Region)

Planned Feature:
Lorem Ipsum

Darstellung

A form's Representation is its written form, as used in a text (compare lemon:writtenRep). Just like Lemmas, Representations are not simple strings, but MultilingualTextValues, since the same form may have multiple spellings, possibly in multiple scripts.

Eine Darstellung kann nicht komplett leer sein, mindestens eine Variante muss angegeben sein.

Multiple forms with the same representation are allowed to enable adding usage examples demonstrating each of them. Beispiel in Wikidata

Grammatisches Merkmal

A form's grammatical features specify under which conditions or in which syntactic role that form is used (see lexinfo:morphosyntacticProperty and grammatical category on Wikipedia). Multiple grammatical features can be combined to express under which conditions the language's grammar requires a given form to be used. Grammatical features are represented as references to Items.

Example: Die Funktion Erste Person, Plural, Präsens kann durch drei Merkmale definiert werden, die durch Wikidata-Items dargestellt werden können: Q192613 (Zeitform der Gegenwart), Q21714344 (Erste Person), and Q146786 (Plural).

Editorial Note: How do we model "a" vs "an"? What item would we use as a feature to describe this? Do we need free text usage notes after all?

Editorial Note: We should note that gender-specific forms like "baroness" can be treated as Forms, or as separate Lexemes, as need be.

Sinn

The senses of a lexeme are different meanings which it may represent in a text. The senses are given as natural language definitions or glosses (compare intensional definitions on Wikipedia).

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 Statements further describing the Sense and its relations to Senses and Items (e.g. item for this sense, synonym, antonym, connotation, register, denotes, evokes).

In Wikidata image is also added to provide a culturally adapted image of the sense, e.g. of a letterbox or color that can vary greatly between cultures.

Editorial Note: We should find a good place to address a common source of misunderstandings: Senses can be connected to Wikidata Items via an appropriate Statement they evoke or denote (compare lemon:denotes and lemon:evokes). However, such a connection should not be interpreted as the lexeme actually representing the concept defined by the item (compare lemon:LexicalSense and lemon:LexicalConcept). In particular, if two lexemes have senses that refer to the same concept in this way, this does not imply that the two lexemes are synonyms.

Example: The lexemes for the English adjectives "hot" and "cold" could both have a sense that refers to Q11466 (temperature), even though they are antonyms.

Editorial Note: We should describe how word function can be described for things like "to" or "a", using Statements on the Lexeme. We should also explain that function words should not have senses. Do we need free text usage notes?

Planned Feature:
Lorem Ipsum

Glossar

A sense's gloss gives a natural definition of the sense (see Gloss on Wikipedia and skos:definition). Glosses cannot be referenced.

Similar to Lemmas, Glosses are not simple strings, but MultilingualTextValues. However, the reason is not providing support for variants, but to allow the gloss to be given in entirely different languages. E.g. it would be quite useful for a German learning French to have a German gloss for a French sense.

A Gloss cannot be entirely empty, at least one language has to be provided. A good gloss provides little or no space for ambiguity about the meaning. Lexemes with multiple senses should have glosses that are easily distinguishable from each other.

Short glosses of only a single or a few words should be avoided as it leaves too much space for interpretation of the meaning.

In Wikidata Glosses are often very similar to carefully crafted descriptions on Q-items. E.g. for apple the Q-items English description fruit of the apple tree is copied as gloss when using tools like MachtSinn to match lexemes and Q-items together and create missing senses.

Siehe auch