The on-wiki version of this newsletter can be found here:
https://www.wikifunctions.org/wiki/Wikifunctions:Status_updates/2025-02-26
--
From things to words
<https://www.wikifunctions.org/wiki/File:Find_lexemes_for_a_Wikidata_Item.png>Screenshot
of the Find lexemes for a Wikidata item function at launch
In the last few weeks, we deployed and tested one of our main milestones
for this quarter: the ability to get the right Lexeme given a Wikidata
Item, or, put simpler, to get the right word from a thing.
Lexemes in Wikidata bring together the different aspects of a word: forms
(where the right one is selected based on the grammar of the language) and
senses (the standardized meanings a lexeme refers to). In English, the
forms of a Lexeme such as *rose <https://www.wikidata.org/wiki/L:L18379>* would
be *rose*, *roses*, *rose’s*, etc., and the current three senses refer to
the flower, the biological taxon, and the color.
Senses in Wikidata Lexemes can be represented in many different ways. For
Wikifunctions’ purposes, one important way that senses can be structured is
by connecting them to Wikidata items. For example, the English noun *water
<https://www.wikidata.org/wiki/L:L3302>* has three senses, of which two
connect to Wikidata items, among others to the item for water
<https://www.wikidata.org/wiki/Q283>. The first link is to the English noun
(a lexeme), and the second to the liquid (an item). In many cases such as
this, a Sense connects a Lexeme with an Item.
There are a number of useful properties connecting a Sense with an Item.
These include:
- most notably item for this sense
<https://www.wikidata.org/wiki/P:P5137>, most often connecting a noun to
a thing or a class of things in Wikidata;
- predicate for <https://www.wikidata.org/wiki/P:P9970>, connecting a
verb to an action or event; and
- demonym of <https://www.wikidata.org/wiki/P:P6271>, connecting a noun
or adjective to a location, describing the people and things that live or
are from that place.
This allows us, for the first time in Wikifunctions, to use a
language-independent value, and find the words to use in a given language.
The screenshot shows the usage of the new built-in Fetch lexemes for a
Wikidata item <https://www.wikifunctions.org/view/en/Z6830> used to look up
the Hausa noun *ruwa <https://www.wikidata.org/wiki/L:L8303>* meaning water.
The community has quickly picked up this new functionality, and has created
a powerful example of how to create a whole indefinite noun phrase
<https://www.wikifunctions.org/view/en/Z22664> with Wikifunctions in a
language-independent way. You can read more about this function below,
where it is highlighted as this week’s Function of the Week.
Volunteers’ Corner on March 3
Next week, on Monday, 3 March 2025, at 18:30 UTC
<https://zonestamp.toolforge.org/1741026600>, we will have our monthly
Volunteers’ Corner. Unless you have many questions, we will follow our
usual agenda, of giving updates on the upcoming plans and recent
activities, having plenty of time and space for your questions, and
building a Function together. Looking forward to seeing you online
<https://meet.google.com/xuy-njxh-rkw> on Monday!
Recent Changes in the software
Alongside the Wikidata work talked about above, we've also been focussed on
the other big pieces of work for the Quarter.
We've worked more on the integration of Wikifunctions into MediaWiki, which
will when released allow users to embed calls to functions in wikitext (
T383106 <https://phabricator.wikimedia.org/T383106>). This includes a
series of bug fixes, simplifications and code improvements, and testing to
the recently-landed stack we mentioned last week. We've also been hard at
work on experiments (T386791 <https://phabricator.wikimedia.org/T386791>)
on how to best provide a reasonable front-end in the wikitext and visual
editors on each client wiki without overwhelming users who aren't
necessarily experienced in how Wikifunctions works (T373118
<https://phabricator.wikimedia.org/T373118>).
We've accepted an accessibility improvement from User:Abbe98
<https://www.wikifunctions.org/wiki/User:Abbe98> that makes the run-details
button keyboard-accessible; this was submitted in November but got lost,
our apologies! We've also landed a couple of style variable improvements
from User:Taavi <https://www.wikifunctions.org/wiki/User:Taavi> this week
that should improve the experience in dark mode; thank you!
We, along with all Wikimedia-deployed code, are now using the latest
version of the Codex UX library, v1.20.x, as of this week. We believe that
there should be no user-visible changes on Wikifunctions, so please comment
on the Project chat or file a Phabricator task if you spot an issue.
Function of the Week: Indefinite noun phrase
*The Function of the Week is a column written by the community. Planning
the column and submissions can be made here
<https://www.wikifunctions.org/wiki/Special:MyLanguage/Wikifunctions:Functio…>.
**Thanks
to User:Feeglgeef
<https://www.wikifunctions.org/wiki/User:Feeglgeef> and User:GrounderUK
<https://www.wikifunctions.org/wiki/User:GrounderUK> for writing and
editing this submission.*
One of the most important pieces of the Abstract Wikipedia goal is the
conversion of structures of Wikidata items to texts. These structures will
then be created by editors and transformed into content in many of the
world's languages, making the sum of all human knowledge accessible for
almost all.
Last week, we made a huge step toward this goal, with the creation of Find
lexemes for a Wikidata item <https://www.wikifunctions.org/view/en/Z6830>,
a predefined function written by David Martin
<https://www.wikifunctions.org/wiki/User:DMartin_(WMF)> at the Abstract
Wikipedia team. Predefined functions are written in the backend code for
Wikifunctions, and thus aren't subject to the normal sandboxing
requirements of functions. This function allows us to find Wikidata items
related to lexemes, which we can then use to create text.
The function we are focusing on is Indefinite noun phrase
<https://www.wikifunctions.org/view/en/Z22664>, which takes 2 Wikidata item
references, representing a noun and an adjective, and a language, which is
the language that the function outputs in. The function outputs a string to
represent an indefinite singular noun phrase. In English, indefinite
singular noun phrases start with a or an, like "a yellow banana" or "an
apple." These make up a large part of English language sentences, with
about half using an indefinite article in some form . The creation of this
function marks a very important epoch in the Abstract Wikipedia journey.
The function has two implementations, one
<https://www.wikifunctions.org/view/en/Z22670> that uses another function
to find the correct function to parse the lexemes, and another
<https://www.wikifunctions.org/view/en/Z22724> that does it more directly.
The function has 5 tests:
- That an orange (color, Q39338) orange (fruit, Q13191) becomes "una
naranja naranja" in Spanish.
<https://www.wikifunctions.org/view/en/Z22712>
- That a black (Q23445) house cat (Q146) becomes "un(e) chat(te)
noir(e)" in French (which fails)
<https://www.wikifunctions.org/view/en/Z22671>
- That an orange (color, Q39338) orange (fruit, Q13191) becomes "an
orange orange" in English <https://www.wikifunctions.org/view/en/Z22711>
- That an orange (color, Q39338) orange (fruit, Q13191) becomes
"апельсин морковный" in Russian
<https://www.wikifunctions.org/view/en/Z22714>
- That a green (color, Q3133) lime (fruit, Q13195) becomes "a green
lime" in English <https://www.wikifunctions.org/view/en/Z22708>
There are still some flaws with this function that will need to be fixed.
Timeouts are quite common. Part of this can be solved on the community's
side, as the function can be simplified to lower dependencies, but some
work may still need to be done on the Abstract Wikipedia team's side to
improve performance in this area.
A quite unhelpful Argument value error
<https://www.wikifunctions.org/view/en/Z516> may sometimes appear if there
is no valid Wikidata lexeme connected to the Wikidata item you chose in the
correct language. Unfortunately, this is not a problem that can easily be
fixed right now and will require a large amount of work by contributors to
Wikidata. This will likely be a large blocker as we continue to get closer
to Abstract Wikipedia.
The function only knows how to create indefinite singular noun phrases in a
few languages; more will be needed to properly work with this. Functions
for more languages can be added by editing indef noun phrase functions for
languages (Z21733) <https://www.wikifunctions.org/view/en/Z21733>, please
contribute a function and connect it if you can!
Invitation to a hybrid talk by Denny Vrandečić in London
On Monday, 10 March 2025, Denny Vrandečić will talk at King’s College London
<https://en.wikipedia.org/wiki/King%27s_College_London> on the topic
of Knowledge
in the Age of AI
<https://www.eventbrite.co.uk/e/knowledge-in-the-age-of-ai-tickets-123281745…>.
Wikidata and Wikifunctions will be topics in that talk. The event will be
hybrid. You can join either remotely or locally in London. Free registration
via Eventbrite
<https://www.eventbrite.co.uk/e/knowledge-in-the-age-of-ai-tickets-123281745…>
is
requested if you want to attend. The talk will be recorded.
News in Types: Unicode code point
The proposal to fix Unicode code point
<https://www.wikifunctions.org/wiki/Wikifunctions:Type_proposals/Unicode_cod…>
has
been implemented, and Unicode code point (Z86)
<https://www.wikifunctions.org/view/en/Z86> has been changed. All relevant
functions have been updated or deprecated, and the “do not use” marker has
been removed. We invite you to build functions with the new type: this can
range from having fun with emojis, to the proper construction of strings
using more complex scripts.
As of now, only staff can add display and read functions to types. We have
a few types with missing display and read functions, and would like to
invite you to agree and collaborate on and propose read and write functions
for the following five types:
- Gregorian calendar date (Z20420)
<https://www.wikifunctions.org/view/en/Z20420>: A date in the proleptic
Gregorian calendar
- Day of Roman year (Z20342)
<https://www.wikifunctions.org/view/en/Z20342>: A day of the month and a
month of the Gregorian calendar
- Gregorian year (Z20159) <https://www.wikifunctions.org/view/en/Z20159>
: Numbered years according to the proleptic Gregorian calendar
- byte (Z80) <https://www.wikifunctions.org/view/en/Z80>: åtta bitar
- Unicode code point (Z86) <https://www.wikifunctions.org/view/en/Z86>: A
single code point in Unicode
Fresh Functions Weekly: 39 new Functions
Here is a list of some of the new functions that have been created since
last week, with connected implementations and passing tests. There are a
large number of new functions to celebrate!
- geometric mean of float64 list (Z22596)
<https://www.wikifunctions.org/view/en/Z22596>: no description
- nth root of float64 (Z22600)
<https://www.wikifunctions.org/view/en/Z22600>: no description
- multiplicative inverse of float64 (Z22605)
<https://www.wikifunctions.org/view/en/Z22605>: no description
- harmonic mean of float64 list (Z22610)
<https://www.wikifunctions.org/view/en/Z22610>: no description
- sort list ascending (float64) (Z22615)
<https://www.wikifunctions.org/view/en/Z22615>: no description
- Arabic to Church Slavonic numeral (Z22623)
<https://www.wikifunctions.org/view/en/Z22623>: Convert a number to
Church Slavonic Cyrillic numeral See for a reference:
https://school.orthpatr.ru/sites/default/files/sites/default/files/image/Tc…
- Box-Cox transformation of float64 (Z22629)
<https://www.wikifunctions.org/view/en/Z22629>: no description
- is zero (float64) (Z22636)
<https://www.wikifunctions.org/view/en/Z22636>: no description
- all grammatical features of lexeme form (Z22638)
<https://www.wikifunctions.org/view/en/Z22638>: including those
inherited from the parent lexeme
- Arabic numerals to Devanagari numerals (Z22649)
<https://www.wikifunctions.org/view/en/Z22649>: Converts any Arabic
numerals in string to Devanagari numerals. Reverse at Z22294
- byte as list of Booleans (Z22654)
<https://www.wikifunctions.org/view/en/Z22654>: Returns a byte as a list
of eight Boolean values
- Indefinite noun phrase (Z22664)
<https://www.wikifunctions.org/view/en/Z22664>: génère une phrase
nominale indéfinie à partir d'un nom et d'un adjectif via les lexèmes
Wikidata, dans une langue donnée
- list of Booleans to Byte (Z22672)
<https://www.wikifunctions.org/view/en/Z22672>: constructs a Byte object
from a list of Booleans
- Code point equality (Z22683)
<https://www.wikifunctions.org/view/en/Z22683>: tests whether two
code-point realisations (as entered) have identical Unicode code-point
representations
- Codepoint list to string (Z22693)
<https://www.wikifunctions.org/view/en/Z22693>: Converts a list of code
points to a string. Reverse at Z22717
- first Lexeme from item reference and language (Z22696)
<https://www.wikifunctions.org/view/en/Z22696>: no description
- Find lexemes for a Wikidata item (Z6830)
<https://www.wikifunctions.org/view/en/Z6830>: Search for lexemes
related to the given item by the given property, and return those having
the given language
- String to codepoint list (Z22717)
<https://www.wikifunctions.org/view/en/Z22717>: Converts a string to a
list of codepoints. Reverse at Z22693
- to Scream Cipher (Z22725)
<https://www.wikifunctions.org/view/en/Z22725>: Based on xkcd.com/3054 -
reverse at Z22728
- from Scream Cipher (Z22728)
<https://www.wikifunctions.org/view/en/Z22728>: Based on xkcd.com/3054 -
reverse at Z22725
- Italian word starts with a vowel (Z22786)
<https://www.wikifunctions.org/view/en/Z22786>: Returns whether an
italian word start with a vowel (useful for example to establish which
article it requires between "il" and "l'")
- Italian word requires article "lo" (Z22791)
<https://www.wikifunctions.org/view/en/Z22791>: Check whether an italian
word stars with "impure" s, z, x, pn, ps, gn, sc, semiconsonantic i
There is a rich variety of functions – about mathematics, linguistics, and
byte operations – and there were a few more that didn’t make it to the list
because they didn’t have tests or implementations. A comprehensive list of
all functions
<https://www.wikifunctions.org/wiki/Special:ListObjectsByType?type=Z8&orderb…>
sorted
by creation date can be found on-wiki.
The on-wiki version of this newsletter can be found here:
https://www.wikifunctions.org/wiki/Wikifunctions:Status_updates/2025-02-13
--
Restricting the World, redux
<https://www.wikifunctions.org/wiki/File:Hot_air_balloon_and_moon.jpg>
Twelve years ago, I wrote an essay describing one of the fundamental design
choices for Wikidata: Restricting the World
<https://blog.wikimedia.de/2013/02/22/restricting-the-world/>.
In that essay I was arguing that the Wikidata software should not restrict
the knowledge represented in Wikidata: instead of having fixed fields for
each type of entry, Wikidata was designed to allow for any kind of
structures. This would allow us to capture as much of the complexities of
the world as possible.
It makes reuse more difficult. Because we can never be sure about the
structure of an item: will that country item have a capital? A population?
How will the family of a person be represented, if at all?
Over the years, numerous features and systems grew in order to support
Wikidata with better structuring of its content. A constraint system
surrounding properties
<https://www.wikidata.org/wiki/Help:Property_constraints_portal> grew. Schema
definitions <https://www.wikidata.org/wiki/Wikidata:Schemas> were
introduced. Recommender systems
<https://www.wikidata.org/wiki/Wikidata:Recoin> were suggesting missing
properties based on the existing structure. All of these, and much more,
allowed for the data in Wikidata to grow towards a more cohesive and
consistent place.
Now, with Wikifunctions, we are on the other side: instead of a flexible
knowledge base, we prefer predictable, strict structures. When writing a
Function implementation to get the right form of a verb, we need to know
what structures verbs in the given language use. What are the grammatical
features that are being used for the forms? Which forms will be given in
Wikidata? Which grammatical features will they have?
The flexibility, which I still think is a necessary design decision for a
knowledge base such as Wikidata, becomes a minor burden for a system such
as Wikifunctions that aims to use that knowledge. But we have unique
advantages: both projects can work together, towards a compromise between
the flexibility that we need to represent the world in Wikidata, and the
requirements for the knowledge representation to become processable in
Wikifunctions. Wikifunctions can deal with a certain amount of flexibility,
and Wikidata can benefit from a certain amount of unification.
Wikifunctions will be like a forcing function for some parts of Wikidata.
One way to resolve some of the tension is to decouple Wikidata from
Wikifunctions in certain ways, as we have already been doing. The truth
values in Wikifunctions are not Wikidata's Q16751793
<https://www.wikidata.org/wiki/Q16751793> and Q5432619
<https://www.wikidata.org/wiki/Q5432619>, they are true (Z41)
<https://www.wikifunctions.org/view/en/Z41> and false (Z42)
<https://www.wikifunctions.org/view/en/Z42>. The current month of February
is Q109 <https://www.wikidata.org/wiki/Q109> in Wikidata and February (
Z16102) <https://www.wikifunctions.org/view/en/Z16102> in Wikifunctions.
Dagbani is the first language edition of Wikipedia on which Wikifunctions
will be enabled; the language is Q32238
<https://www.wikidata.org/wiki/Q32238> in Wikidata and Dagbani (Z1015)
<https://www.wikifunctions.org/view/en/Z1015> in Wikifunctions. Did we get
the decoupling right? Probably not. Why do we need labels for February both
in Wikifunctions and Wikidata? Do we want to have several different values
for the feminine and masculine grammatical genders for several different
systems? This is something we want to look very soon at.
But in other cases, decoupling can be very beneficial. By decoupling from
Wikidata we can have somewhat more control about the representation as we
need it. If the knowledge base changes, we can retain our functionality and
move at our own speed, because the representation of Dagbani in
Wikifunctions is not meant to represent the language in the sense of an
encyclopedia-supporting knowledge base, but merely in a way that is
pragmatically useful for Wikifunctions.
All of this is particularly true and relevant for representing lexemes in
Wikifunctions, a discussion that is currently ongoing on the project chat
and other channels. More about this next week, also in the NLG SIG next
week!
Invitation to the NLG SIG meeting on February 18
On February 18, 2025, at 16:00 UTC
<https://zonestamp.toolforge.org/1739894400>, we will have our first public
Natural Language Generation Special Interest Group meeting on Google Meet
<https://meet.google.com/xzn-kqer-mah>. The meeting is planned to be
recorded. A wiki page for the NLG SIG
<https://www.wikifunctions.org/wiki/Wikifunctions:NLG_SIG> has been
created, and an agenda is being collected there.
Recent Changes in the software
Only one bug fix will be released this week; most of our efforts have gone
towards priority, longer-term work.
We fixed a bug that meant that on Function pages' tables, the pagination
control never showed up on the Implementations table and on the Test cases
one only when there were four or more Implementations (T385776
<https://phabricator.wikimedia.org/T385776>).
We, along with all Wikimedia-deployed code, are now using the latest
version of the Codex UX library, v1.20.1, as of this week. We believe that
there should be no user-visible changes on Wikifunctions, so please comment
on the Project chat or file a Phabricator task if you spot an issue.
We also wanted to use this weekly update to highlight that we will be
removing the functionality that currently replaces the shown version of a
link to an Object with its name. This feature from the early days of the
project has suffered from issues related to pages showing in the wrong
language, and isn't compatible with our switch to the Parsoid rendering
engine anyway (T343483 <https://phabricator.wikimedia.org/T343483>). We
will keep the feature for special pages (which don't suffer from this bug),
like Special:RecentChanges
<https://www.wikifunctions.org/wiki/Special:RecentChanges> and
Special:WhatLinksHere
<https://www.wikifunctions.org/wiki/Special:WhatLinksHere>.
In lieu of the Function of the Week: Schrödinger Model sub shell
configuration
*The Function of the Week is a column written by the community. Planning
the column and submissions can be made here
<https://www.wikifunctions.org/wiki/Special:MyLanguage/Wikifunctions:Functio…>.*
Last week I noticed a contributor, MolecularPilot
<https://www.wikifunctions.org/wiki/User:MolecularPilot>, telling us in the
chat how they were doing an assignment while learning chemistry. So they
started a function to automate it, calculating Schrödinger’s Model for sub
shell configuration <https://www.wikifunctions.org/view/en/Z22155>.
I really enjoyed the insight they described after they created the Function:
*Ironically making the function actually helped me understand the
underlying concepts a lot better than just repeating it over and over!! I
think making Wikifunctions makes you have to think about something in a
kind of computational and logical kind of way using a problem solving
mindset.*
I hope you enjoy this quote too!
News in Types: Byte
This week we implemented the proposal to fix up the Byte type
<https://www.wikifunctions.org/wiki/Wikifunctions:Type_proposals/Byte>. We
removed the markers from the type so it can be used, and more functions can
be created for the Byte type. We are looking forward to having a display
and read function for this type available, too.
Fresh Functions weekly
Here is a list of new functions that have been created since last week,
with connected implementations and passing tests. This week we had a good
number of new functions to celebrate.
- Kleenean inequality (Z22231)
<https://www.wikifunctions.org/view/en/Z22231>
- remainder of float64 division (Z22236)
<https://www.wikifunctions.org/view/en/Z22236>
- Gregorian calendar month to Wikidata reference (Z22240)
<https://www.wikifunctions.org/view/en/Z22240>
- Wikidata item reference from QID string (Z22246)
<https://www.wikifunctions.org/view/en/Z22246>
- Wikidata lexeme reference from LID string (Z22249)
<https://www.wikifunctions.org/view/en/Z22249>
- equality of Kleenean and Boolean (Z22257)
<https://www.wikifunctions.org/view/en/Z22257>
- Malayalam numerals to Arabic numerals (Z22267)
<https://www.wikifunctions.org/view/en/Z22267>
- read Malayam natural numbers leniently (Z22271)
<https://www.wikifunctions.org/view/en/Z22271>
- Khmer numerals to Arabic numerals (Z22279)
<https://www.wikifunctions.org/view/en/Z22279>
- Thai numerals to Arabic numerals (Z22285)
<https://www.wikifunctions.org/view/en/Z22285>
- Burmese numerals to Arabic numerals (Z22288)
<https://www.wikifunctions.org/view/en/Z22288>
- Bengali numerals to Arabic numerals (Z22291)
<https://www.wikifunctions.org/view/en/Z22291>
- Devanagari numerals to Arabic numerals (Z22294)
<https://www.wikifunctions.org/view/en/Z22294>
- Gujarati numerals to Arabic numerals (Z22297)
<https://www.wikifunctions.org/view/en/Z22297>
- string of numeral digits in order from language (Z22302)
<https://www.wikifunctions.org/view/en/Z22302>
- square root of float64 (Z22318)
<https://www.wikifunctions.org/view/en/Z22318>
- Population density (Z22322)
<https://www.wikifunctions.org/view/en/Z22322>
- Annual Population growth rate (Z22327)
<https://www.wikifunctions.org/view/en/Z22327>
- str left (Z22344) <https://www.wikifunctions.org/view/en/Z22344>
We can see a rich variety of functions – and there were even more who
didn’t make it to the list because they didn’t have tests or
implementations. A comprehensive list of all functions sorted by creation
date
<https://www.wikifunctions.org/wiki/Special:ListObjectsByType?type=Z8&orderb…>
can
be found on-wiki.