Wikipédia abstraite/Mises à jour/2021-09-10

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by VIGNERON (talk | contribs) at 09:52, 11 September 2021 (Created page with "Il se trouve que plus de 25 500, soit plus de 91 % des noms, remplissent les conditions requises."). It may differ significantly from the current version.
Actualités de la Wikipédia abstraite Translate

liste de diffusion de la Wikipédia abstraite Wikipédia abstraite sur IRC Wikifonctions sur Telegram Wikifonctions sur Mastodon Wikifonctions sur Twitter Wikifonctions sur Facebook Wikifonctions sur Youtube site web de Wikifonctions Translate

Paradigmes morphologiques

Un des premiers types de fonctions que l'on veut commencer à créer dans les wikifonctions sont les fonctions qui effectuent des transformations morphologiques régulières sur les mots. C'est-à-dire des fonctions qui - à partir de la forme de base du mot - peuvent créer les formes fléchies régulières d'un mot. Ou, pour donner un exemple : qui peut nous dire que le pluriel de “book” en anglais est “books”.

L'anglais est un exemple relativement simple, mais cela devrait rendre plus facile l'explication de la proposition dans cette lettre d'information. Dans de nombreux autres cas, les fonctions morphologiques et la grammaire seront probablement plus compliquées.

La façon la plus régulière de créer un pluriel à partir de la forme de base d'un nom anglais est d'y ajouter la lettre "s". Voyons maintenant combien d'entrées de Wikidata sont couvertes par cette règle simple.

Wikidata a actuellement environ 28 100 noms anglais.

Alors que Wikidata permet une grande flexibilité lors de la saisie d'entrées lexicographiques, les wikifonctions nécessiteront que les données aient une forme plus prévisible afin de les utiliser efficacement. Une façon d'exprimer ces formes consiste à utiliser masques lexicaux. Les noms anglais ont deux masques lexicaux différents : un avec seulement deux formes (un singulier et un pluriel, par exemple "book" et "books") et un avec quatre formes (dont deux formes au génitif : book’s et "books'"). Ces deux masques ont été traduits automatiquement en Shex, le langage utilisée par Wikidata pour vérifier la complétude des données. Mais seule la version avec deux formes a été transformée en une entité Schéma dans Wikidata.

Maintenant, nous pouvons prendre les 28 000 noms anglais de Wikidata et vérifier combien remplissent les conditions décrites ci-dessus (faites-moi savoir si vous êtes intéressez par le code). Il se trouve que plus de 25 500, soit plus de 91 % des noms, remplissent les conditions requises. And all of them fulfill the two-form schema. Four nouns (contract, player, swimmer, and sport) almost fulfill the four-form schema, but on each of them the cases on the nominative forms are missing.

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.