Wikifunctions:Status updates/2025-02-26
◀ | ![]() ![]() |
▶ |
From things to words

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 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 has three senses, of which two connect to Wikidata items, among others to the item for water. 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, most often connecting a noun to a thing or a class of things in Wikidata;
- predicate for, connecting a verb to an action or event; and
- demonym of, 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 used to look up the Hausa noun ruwa 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 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, 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 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). 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) 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).
We've accepted an accessibility improvement from 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 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.2, 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. Thanks to User:Feeglgeef and 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, a predefined function written by David Martin 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, 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 that uses another function to find the correct function to parse the lexemes, and another that does it more directly.
The function has 5 tests:
- That an orange (color, Q39338) orange (fruit, Q13191) becomes "una naranja naranja" in Spanish.
- That a black (Q23445) house cat (Q146) becomes "un(e) chat(te) noir(e)" in French (which fails)
- That an orange (color, Q39338) orange (fruit, Q13191) becomes "an orange orange" in English
- That an orange (color, Q39338) orange (fruit, Q13191) becomes "апельсин морковный" in Russian
- That a green (color, Q3133) lime (fruit, Q13195) becomes "a green lime" in English
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 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 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 on the topic of Knowledge in the Age of AI. 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 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 has been implemented, and Unicode code point (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): A date in the proleptic Gregorian calendar
- Day of Roman year (Z20342): A day of the month and a month of the Gregorian calendar
- Gregorian year (Z20159): Numbered years according to the proleptic Gregorian calendar
- Byte (Z80): åtta bitar
- Unicode code point (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): no description
- nth root of float64 (Z22600): no description
- multiplicative inverse of float64 (Z22605): no description
- harmonic mean of float64 list (Z22610): no description
- sort list ascending (float64) (Z22615): no description
- Arabic to Church Slavonic numeral (Z22623): Convert a number to Church Slavonic Cyrillic numeral See for a reference: https://school.orthpatr.ru/sites/default/files/sites/default/files/image/TcSYa_C_05.pdf
- Box-Cox transformation of float64 (Z22629): no description
- is zero (float64) (Z22636): no description
- all grammatical features of lexeme form (Z22638): including those inherited from the parent lexeme
- Arabic numerals to Devanagari numerals (Z22649): Converts any Arabic numerals in string to Devanagari numerals. Reverse at Z22294
- byte as list of Booleans (Z22654): Returns a byte as a list of eight Boolean values
- Indefinite noun phrase (Z22664): returns an indefinite noun phrase combining the adjective and noun in the convention of a chosen language
- list of Booleans to Byte (Z22672): constructs a Byte object from a list of Booleans
- Code point equality (Z22683): tests whether two code-point realisations (as entered) have identical Unicode code-point representations
- Codepoint list to string (Z22693): Converts a list of code points to a string. Reverse at Z22717
- first Lexeme from item reference and language (Z22696): no description
- Find lexemes for a Wikidata item (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): Converts a string to a list of codepoints. Reverse at Z22693
- to Scream Cipher (Z22725): Based on xkcd.com/3054 - reverse at Z22728
- from Scream Cipher (Z22728): Based on xkcd.com/3054 - reverse at Z22725
- Italian word starts with a vowel (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): 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 sorted by creation date can be found on-wiki.