Абстрактна Вікіпедія/Оновлення/2021-09-10

This page is a translated version of the page Abstract Wikipedia/Updates/2021-09-10 and the translation is 39% complete.
Оновлення Абстрактної Вікіпедії Translate

Абстрактна Вікіпедія (список розсилки) Абстрактна Вікіпедія в ICR Абстрактна Вікіпедія в Телеграм Wikifunctions on Mastodon Абстрактна Вікіпедія у Твіттері Абстрактна Вікіпедія у Фейсбуці Абстрактна Вікіпедія на Ютубі Сторінка проекту Абстрактні Вікіпедії Translate

Морфологічні парадигми

Одним з перших типів функцій, які ми хочемо почати будувати у Вікіфункціях, є функції, які виконують регулярні морфологічні перетворення слів. Тобто функції, які, отримуючи базову форму слова, можуть створювати правильні змінені форми слова. Або, щоб навести приклад: вони можуть сказати мені, що множина від “book” англійською мовою є “books”.

Англійська мова є порівняно простим прикладом, але він має допомогти сформувати пропозиції в цьому інформаційному бюлетені. У багатьох інших випадках морфологічні функції і граматика, ймовірно, будуть складнішими.

Найбільш звичний спосіб утворення множини з основної форми англійського іменника — це додати до нього букву “s”. Тепер погляньмо, скільки записів Вікіданих буде охоплено цим простим правилом.

Наразі у Вікіданих є близько 28,100 англійських іменників.

Тоді як Вікідані дають велику гнучкість під час уведення лексикографічних записів, для Вікіфункцій потрібні дані мають більш передбачувану форму для ефективного використання. Одним із способів вираження цих форм є лексичні маски. Англійські іменники мають дві різні лексичні маски: одну лише з двома формами (однина та множина, напр. “book” і “books”) і одну з чотирма формами (включаючи дві форми родових відмінків, напр. “book’s” і “books’”). Обидві ці маски були автоматично перекладені на Shex, мову, яка використовується Вікіданими для перевірки повноти даних. Але лише версія для двох форм була перетворена на Entity Schema (схему сутності) у Вікіданих.

Тепер ми можемо взяти 28000 англійських іменників у Вікіданих та перевірити, скільки з них відповідають описаним вище вимогам (дайте мені знати, чи є інтерес до коду). Виявляється, що понад 25500, тобто понад 91% іменників відповідають вимозі. І всі вони відповідають схемі з двох форм. Чотири іменники (contract, player, swimmer, і sport) майже виконують схему з чотирьох форм, але у кожному з них називні відмінки були відсутні.

Evaluating "Add s" on "book" in NotWikiLambda

So let’s focus on the 25,500 nouns that pass the structural requirements. We created a function that adds the letter “s” at the end of the word in NotWikiLambda. When we count how many of the plurals are generated this way, we see that 21,000 English nouns are created correctly by simply adding "s", 82% of all nouns. Adding “s” is one paradigm, and, as we can see, the most common one for English nouns.

On the right-hand side of the Function's page you can see a heading “Evaluate Function,” and there you can enter a value, say “book”. If you click on “Call Function” below, the result “books” should come back. (Note that WikiLambda is in heavy development, and the test site might have hiccups at any time. A screenshot of the evaluation working correctly is shown here.)

Another paradigm works for many English nouns that end with the letter “y”. There are many cases where we replace the letter “y” with the letter “ies”, e.g. when turning “baby” into “babies”, or “fairy” into “fairies”. We created the function replacing “y” at the end with “ies” in NotWikiLambda. When we run this paradigm against the nouns in Wikidata, more than 2,000 nouns (almost 8%) get covered by this function.

Evaluating "Replace y with ies at end" in NotWikiLambda

We could create further paradigms (e.g. add “es”, which would cover more than 1,800 nouns), and we could even write a single function which tries to discern which of these functions to apply (e.g. if it ends with “s” or “sh”, add “es”; if it ends with a “y” preceded by a consonant, replace that “y” with an “ies”; else simply add an “s”, etc.), which would give us a more powerful function that can deal with many more words (a bit of experimentation got me to a function that covers 98.3% of all cases).

Grammatical Framework has introduced these functions as so-called smart paradigms. Their web-based implementation of smart paradigms for English nouns covers 96% of the nouns in Wikidata. I would be very curious to see how either of these numbers compares to modern, machine-learning based solutions, and I also want to invite people to create an even smarter paradigm with better coverage without the code becoming too complex.

Smart paradigms are useful when data in Wikidata is incomplete. For example for loan words, technical terms, neologisms, names, or when verbing nouns (so-called conversion), we might need to create a form automatically that Wikidata doesn’t yet explicitly know about.

As this week’s entry is already getting quite long, we will defer to next time the discussion of some of the possibilities of how those paradigms implemented in Wikifunctions might interplay with the lexicographic data in Wikidata. This will also shed more light on the role that the morphological paradigms might play for Abstract Wikipedia in the future.


In other news:

This week, Abstract Wikipedia was covered within the US NPR radio news programme The World. Host Marco Werman interviewed Denny in a five-minute segment that was broadcasted on numerous public radio stations. The segment is now also available online.

The German public TV station 3sat broadcast a documentary about Wikipedia this week: “Wikipedia - Die Schwarmoffensive”. The German-language documentary can be viewed online from Germany, Switzerland, and Austria. It also discusses Abstract Wikipedia for a few minutes at the end of the documentary.