Розширення:WikibaseLexeme/Модель даних

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

Це — робочий документ, що описує концептуальну модель даних, яку використовує WikibaseLexeme . Це не специфікація будь-якого конкретного зв'язування, імплементації, мапування (data mapping) чи.

Модель даних WikibaseLexeme описує структуру даних, таких як слова та фрази, які обробляються як «Лексеми» у Вікібазі. Хоча теоретично можна моделювати ці речі, використовуючи елементи, виразніша спеціалізована модель допомагає зменшити складність та покращити повторне використання та відображення інших словників. Ця модель даних є концептуальною («Яку інформацію ми повинні підтримувати?») і не визначає, як ці дані повинні бути представлені технічно («Які структури даних повинно використовувати програмне забезпечення?») або синтаксично («Як дані повинні бути виражені у файлі?»). Separate documents describe the serialization of the Wikibase data model in JSON (JavaScript Object Notation) and in RDF (Resource Description Framework). Модель даних Лексеми визначає основні поняття та зв'язки, необхідні для опису лексеми, які діють як фіксована онтологія. Ця онтологія забезпечує мінімальний каркас, який дозволяє використовувати Елементи та Твердження для детального моделювання лексеми. Специфікація моделі даних Lexeme базується на моделі даних Wikibase, тому глосарій Вікіданих і основи моделі даних Wikibase можуть бути корисним для розуміння цього документа. Модель даних Лексеми спрямована на узгодження з моделлю LEMON спільноти Ontolex групи W3C, що корисно й практично. Однак у дусі Wikibase модель Лексеми розроблена для того, щоб бути досить простою та гнучкою для зручного спільного редагування, на відміну від більш формалізованого підходу, застосованого на LEMON.

Лексема

Візуалізація моделі даних Лексем

Лексема — це лексичний елемент мови, такий як слово, словосполучення або префікс (див. Lexeme у Вікіпедії). Лексеми — це Сутності в розумінні моделі даних Wikibase. Лексему описують, використовуючи таку інформацію:

  • Ідентифікатор (ID). Лексеми мають ідентифікатори, що починаються з «L», за якою є натуральне число в десятковій формі, наприклад L3746552. Ці ідентифікатори є унікальними у сховищі, яке керує лексемою. Ідентифікатор може поєднуватися з базовим URI сховища, щоб сформувати унікальний URI для Лексеми.
  • Лема (Lemma) для використання як зрозуміле для людини зображення лексеми, напр. «run».
  • Мова (Language) до якої належить лексема. Це — посилання на конкретний елемент, напр. на Q1860 для англійська мова.
  • Лексична категорія (Lexical category), до якої належить лексема. Вона вказується як посилання на конкретний елемент, наприклад Q34698 для прикметника.
  • Список Тверджень (Statement) для опису властивостей лексеми, які не є специфічними для Форми або Смислу (наприклад, походить від, граматичний рід або синтаксична функція)
  • Список Форм (Form), як правило, по одній для кожної відповідної комбінації граматичних ознак, наприклад, 2-а особа/однина/минулий час.
  • Список Смислів (Sense), який описує різні значення лексеми (наприклад, фінансова установа та берег для англійського іменника bank).

Editorial Note: Ми повинні надати деякі підказки щодо того, як граматичний рід можна змоделювати за допомогою Тверджень (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.

Лема

Лема — це зручне для людини представлення лексеми (див. лема у Вікіпедії). Як правило, як лема буде використовуватися канонічна форма лексеми, наприклад, інфінітивна форма дієслів (див. також lemon:canonicalForm). Леми — це не прості рядки, а MultilingualTextValues (багатомовні текстові значення), оскільки одна й та сама лема може мати кілька написань. Це особливо важливо для мов, які використовують декілька написань, таких як сербська та японська.

Example: Лема для англійського іменника color включала б «colour» для британської англійської мови, а також «color» для американської англійської.

Лема не може бути повністю порожньою, потрібно вказати принаймні один варіант.

Примітка: Леми не є унікальними, як і поєднання лем, мов та лексичних категорій. Дві різні лексеми з однією лексичною категорією можуть існувати в одній мові, якщо вони мають різні дані, це може бути рід, етимологія, морфологія (різні форми) тощо.

Example: Є два німецькі іменники з лемою «See», що відрізняються лише родом: «der See», що означає «озеро», і «die See», що означає «море». Ці два значення не можна розуміти як єдину лексему, оскільки вони мають різні форми відповідно до свого роду. 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).

Форма

Морфологія лексеми розуміється як набір Форм. Кожна форма визначає, як лексема змінюється на основі певної синтаксичної ролі або виду, який вона може набути в реченні (див. також lemon:Form).

Example: {{{1}}}

Форму описують, використовуючи таку інформацію:

  • 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. 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 Form.
  • 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. Q814722 for participle.
  • A list of Statements further describing the Form or its relations to other Forms or Items (e.g. pronunciation audio, rhymes with, used until, used in region)

Planned Feature:
Lorem Ipsum

Representation

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.

A Representation cannot be entirely empty, at least one variant has to be provided.

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

Grammatical Feature

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: {{{1}}}

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.

Смисл

Смисли лексеми — це різні значення, які вона може представляти в тексті. Смисли даються як визначення природними мовами або глоси (порівняйте інтенціональні визначення у Вікіпедії).

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

Глоса

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.

Див. також