Jump to content

Wikifunctions:Status updates/2025-02-26

From Wikifunctions
Wikifunctions Status updates Translate

Abstract Wikipedia via mailing list Volunteer Response Team Abstract Wikipedia on IRC Wikifunctions on Telegram Wikifunctions on Mastodon Wikifunctions on Twitter Wikifunctions on Facebook Wikifunctions on YouTube Wikifunctions website Translate

From things to words

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 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:

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:

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!

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.