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.pngScreenshot 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:Function_of_the_Week/submissions. **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-1232817453189. 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-1232817453189 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_codepoint 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/TcS... - 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&orderby=latest sorted by creation date can be found on-wiki.
abstract-wikipedia@lists.wikimedia.org