Wikifunctions:Status updates/2024-11-21
◀ | Wikifunctions Status updates | ▶ |
New special page: missing labels
A new special page has arrived on Wikifunctions, which lists objects with a missing label. You can choose the type of the object to filter for, and the language you want to look for. This should make it much easier for you to find objects that need translation work.
The highest priorities for translations are probably types and functions. But also enumerations such as Boolean, day of the week, Gregorian month and Igbo month, era, or sign are great targets for a translation effort, since they often enable a whole domain of functions to work for a given language for an effort that can be easily estimated.
We hope that through this page we will enable the work to see more of Wikifunctions become available for more people in the world! Thank you all for your help, support, and contributions.
Since we are talking about special pages, last week the special page for listing types by object was refreshed. It now uses paging (i.e. displaying only a certain number of results per page, and then allowing to go through further results), which speeds the page up considerably, and provides a more user-friendly interface.
I want to use the opportunity to thank Arthur P. Smith for the original volunteer work on this special page.
New types: Gregorian year and Wikidata statement rank
We have introduced a new type, Gregorian year. It represents a year in the proleptic Gregorian calendar, which is the calendar most Western countries and many others use. “Proleptic” means that it is being extended into a past where it wasn’t actually used. Gregorian year combines the Gregorian era (whether AD or BC) with a natural number in order to count the years in each era.
Converters to Python and JavaScript are available, using the ISO 8601 standard in which the year 1 BC is represented by the number 0, the year 2 BC by the number -1 etc. This does, in many cases, simplify the math – but may confuse the display. Hopefully, the converters will take care of the respective translation.
Have fun with the new type!
We also created the Wikidata statement rank type, an enumeration with three values (preferred, normal, and deprecated), which is used to represent the rank of a Wikidata statement. The ranks are described on Wikidata.
Next week we plan to work on days in a year, leading to Gregorian calendar dates. Please join the discussion on the type proposals!
Lexeme form tools now using Wikifunctions per setting
For Wikidata’s 12th birthday, Lucas Werkmeister has updated the Wikidata Lexeme Tools. You can now use settings to enable Wikifunctions to automatically create regular forms when creating a new Lexeme. Thanks to Lucas for this update, and we hope that it will help with the creation of many new Lexemes!
Recent Changes in the software
A part of our main Quarterly work is that we are improving on-wiki tools to help the Wikifunctions community maintain Functions more easily (T376671). The first new page from this work lets you find all the Objects of a particular kind that are missing a label in a given language: Special:ListMissingLabels (T378008). By default, it lists Functions missing a label in your view language, but e.g. you can find all the Types without a Dagbani label. The page is available within this week's release, though we'll need to re-run an update script to make sure all labels are up-to-date.
A community member, SomeRandomDeveloper, made a change that gives a more specific "not found" message for Objects (T342965). Thanks!
The slightly-broken display on empty discussion pages, which showed code like `(<span dir="ltr">Z10599</span>)` in the introduction section, has been fixed by wider changes to the MediaWiki messages system (T344491); thank you, Bartosz Dziewoński!
We have included an additional layer of database tracking for which Functions are connected to which Implementations and Test cases (T378008), which will allow us to soon provide a page finding unconnected Implementations and Tests (rather than people finding them by chance, or newbies knowing to ask on Community portal or Project chat).
We have tweaked the maintenance script we use to update Objects in production after development changes; we can now run it for all Objects in one go (T379602).
We have added support for the Z1951/kip language to Wikifunctions, as part of it being added to MediaWiki.
We, along with all Wikimedia-deployed code, are now using the latest version of the Codex UX library, v1.16.0, 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.
Which function is used by which function?
Feeglgeef, a new contributor, has created an app that allows you to check each function in which implementations it is being used and other helpful ways to check the graph structure of Wikifunctions: wf-usage
Blog post on Wikifunctions
Long-time Wikimedian Gerard Meijssen has written a blog post about some of the possibilities that Wikifunctions and Abstract Wikipedia are aiming for, around the theme of awards. Thank you for your kind words, Gerard! The post is here: The story of African award winning
Next volunteers’ corner on December 9
Due to a team offsite during the first week of December, we have to move the next volunteers’ corner (and the last one of the year) one week later, to December 9. The January volunteers’ corner will also be moved by a week to January 13. We are considering moving the volunteers’ corner to an earlier time slot for this time, December 9 at 15:30 UTC. Feedback is appreciated!
Wikifunctions-related talk at SWIB24
Coming Monday, November 25, at 14:00 UTC, Denny will be holding a keynote at SWIB24, the Semantic Web in Libraries conference. SWIB is completely online and registration is free of charge. The topic of Denny’s talk will be ”How knowledge representation is changing in a world of large language models”, and it will talk about the impact that Wikidata, Wikifunctions and Abstract Wikipedia can have on knowledge representation, particularly given the novel capabilities that large language models are making available.
Function of the Week: Bayes' theorem conditional probability P(A|B)
Following the introduction of a new type, we traditionally pick one of the functions using the new type in the following week. Last week, we introduced rational numbers, and you have been generously contributing new functions for the type: we already have 50 functions that either return or accept rational numbers as an argument. That’s great work, thank you all!
This week we also crossed ZID Z20000. ZIDs are being consecutively created for every new object, and we started with Z10000, keeping the ZIDs with fewer than 5 digits for built-in objects. This means that since its launch, the Wikifunctions community has created about 10,000 objects! Wikifunctions currently has 1778 functions as of writing, with more than 3,000 implementations and more than 5,300 tests. For me as a trained software engineer, it is particularly heart-warming to see how many tests we have, and how much the Wikifunctions community values a good test coverage. Thank you!
And since we just crossed Z20000, let’s use Z20000 as our Function of the Week: Bayes' theorem conditional probability, often written as P(A|B). Bayes’ theorem is an important rule in the mathematics of probabilities. I started writing examples, but the Wikipedia article already offers a good list of examples.
The function has three implementations:
- The composition is a straightforward implementation of the theorem: we multiply P(B|A) with P(A) and divide by P(B).
- The Python implementation does the same.
- The JavaScript implementation is a bit more complex: since, unlike in Python, JavaScript offers no native type for rational numbers, the numerator and denominator are being deconstructed. And since for a rational number a division is the same as multiplying with its reciprocal, we see in the JavaScript implementation the denominator being the product of the denominator of the first two and the numerator of the last argument, and vice versa for the numerator.
As usual, we can either think through the logic of these implementations in order to understand that they are indeed equivalent – or we can rely on our test suite. The function has six tests:
- A rare, B usually co-occurs but more common
- A and B are both rare, but correlated
- A and B are both common but never co-occur
- A test based on one of the examples in a Wikipedia article
- A is already known impossible, the first edge case
- And B is known to be impossible, another edge case (although this one is undefined, and we currently don’t have good support for that)
This function is also a great example of a function that, while likely not frequently useful for creating text for Wikipedia, could be very useful on the Wikipedia article for Bayes' theorem itself, in order to directly allow to use this function, deepening the educational mission of Wikipedia.
Off to many more functions!