Jump to content

Wikifunctions:Status updates/2025-07-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

"Wikipedia is an encyclopedia"

This Quarter, we are working on demonstrating functions that generate sentences and fragments in several languages. This moves us up from noun phrases and other phrases that we had before, to whole sentences. This is a considerable step towards creating text for Abstract Wikipedia!

Today, we discuss here a first such example, a function that can generate the following sentences:

  • Bangla: উইকিপিডিয়া একটি বিশ্বকোষ
  • English: Wikipedia is an encyclopedia.
  • Spanish: Wikipedia es una enciclopedia.
  • Turkish: Vikipedi bir ansiklopedi

You can just go to the Function article-less instantiating fragment, select Wikipedia as the entity and encyclopaedia as the class, and select one of the four languages above and see the result. You can also try other entities and classes, and hope that it works, and plenty do, here are the results for Nairobi and city:

  • Bangla: নাইরোবি একটি নগর
  • English: Nairobi is a city.
  • Spanish: Nairobi es una ciudad.
  • Turkish: Nairobi bir şehir

Play around, it is fun!

As of time of writing, only those four languages work. That’s because the configuration used here currently only has Functions for those four languages. The actual functions that are being called for the individual languages are here:

All of these have Implementations which are compositions, and thus are hopefully easy enough to understand and take as a blueprint on how to implement it for more languages.

We are calling for the community to add Functions that create such sentences in more languages! And then they can be added to the configuration.

Here’s a suggestion on how to proceed – and you won’t need any programming skills to do so:

  1. Check if such a function in your language already exists. Here is a list of per-language catalogues.
  2. If it doesn’t exist yet, create a new Function for making a sentence for article-less instantiation in your language. It should have two inputs of Type Wikidata item reference, one for the entity and one for the class.
  3. On the new Function, create tests. Choose an entity and a class, and put in the expected sentence into the result validation.
  4. Connect the newly created Test case with the Function you created.
  5. Try to create an Implementation. Take those in the existing languages as an example. It might well be that you will find that helper tools would be useful at this point. That’s OK. Note these down, and either try to create them yourself, or let other people know on Wikifunctions:Suggest a function.

We understand that these steps are fiddly and not very obvious, and we would really like to get feedback on how far you got, and where you got stuck. If you have any questions on how to use Wikifunctions to do so, reach out and ask questions. We will take the feedback and try to improve the system or even just the documentation, or offer more examples, to help you proceed.

We are also aware that currently, if something goes wrong, it is a bit difficult to figure out what exactly went wrong. Was a label missing on Wikidata? Is there no function to generate that sentence in the given language? Is there no lexeme given for the given class? We are also working on how to improve our error system, so that we can give better feedback.

We are very excited to work together with you on this!

Two years of Wikifunctions

Today is the second anniversary of Wikifunctions!

We want to thank the community for joining us on this incredible journey! Better than any birthday gift are the continuous contributions to Wikifunctions, as the project grows and becomes increasingly more useful. Wikifunctions offers more than 2700 Functions for numerous domains, and as we are widening access to Wikidata data and introducing more types, we see novel and interesting functions being created. We are excited to see what the next year will bring in terms of expanding the catalog of functions!

We are looking forward to a truly transformative third year, full of opportunities. Just to mention one thing: we plan to continue to roll out to many more Wikimedia projects, bringing the capabilities of functions to so many more places throughout the Wikimedia ecosystem. We are curious to see how the Wiktionary communities and later the Wikipedias will pick up the new possibilities Wikifunctions will bring to their projects.

In short, thank you! Thank you for two amazing years, and we are looking forward to the future!

Recent Changes in the software

This week, we added a pair of wikitext parser functions: for showing the label, and showing the label and description, of an Object on Wikifunctions. The first parser function, #wikifunctionlabel, shows the label of any known Object in any known language, falling back along the language chain to English: {{#wikifunctionlabel:Z1004|en}} -> "French (Z1004)". The second, #wikifunctionlabeldesc, also shows the description: {{#wikifunctionlabeldesc:Z2|en}} -> "Persistent object (Z2): A Z1/Object which is stored persistently on the Wikifunctions wiki.". These were provided after the community-maintained Lua script stopped working, and we rushed it out early to fix the wiki as swiftly as possible, and the {{Z}} and {{Z+}} templates were switched over to using them. In our focus on fixing the wiki, we had no time to ask the Wikifunctions community about what was wanted; if you think there are missing features or other similar needed tools for the community, please discuss them with the community and (once consensus is achieved) file a Phabricator ticket.

In Quarterly work, we're working to make it possible to include references to Wikidata entities like items and lexemes in embedded Wikifunctions calls (T397403). As part of this work, this week we made it possible for the search API to offer Functions using these as inputs (T398728), and adjusted the VisualEditor integration to give a search-and-select interface when creating or editing embedded Function calls (T398730).

The other, very minor, user-facing feature shipping this week is that we tweaked the configuration for the CodeEditor to wrap long lines in the Ace editor, to make them more readable.

In terms of fixes for the code, we landed a few. We landed a large re-work of the way the front-end Vue code talks to Wikifunctions.org through the Action API, adding an AbortController so that we can cleanly cancel calls that are no longer needed (T391327). We added an extra safety check on user input around language, to avoid logging noise (T399755). Finally, we adjusted the expected whitespace output for the browser tests, fixing an error spotted in the integration of the testing platform into GitLab development of the back-end services, which is now complete (T394558).

News in Types: Hijri calendar month

Last week we invited you to suggest candidates for Wikidata-based enumeration types, and you did, thanks!

Based on the proposal for Hijri calendar months, we create a type for it: Hijri calendar month.

More proposals have been incoming, such as for Grammatical number (singular / plural), and Chemical elements. Looking forward to more proposals and discussion!

Fresh Functions weekly: 52 new Functions

This week we had 52 new functions. Here is a list of functions with implementations and passing tests to get a taste of what functions have been created. Thanks everybody for contributing!

A complete list of all functions sorted by when they were created is available.