Jump to content

Wikifunctions:Status updates/2025-02-06

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

Invitation to the Natural Language Generation Special Interest Group

For over two years, we have been holding regular meetings of the Abstract Wikipedia Natural Language Generation Special Interest Group (NLG SIG). We have mentioned this group a few times, and invited folks to prior meetings. Previous results from the NLG SIG have been published and announced through this newsletter. We recently had an internal discussion in the group and decided to shake up things a bit.

We plan for the meetings to be public in the future, and to allow folks to drop in. Whereas so far we usually did not have an agenda which we decided beforehand, and instead mostly had open discussions, we plan to have in the future an agenda and publish that in the public as well, so that people can decide whether they want to join or not based on the agenda. We plan to announce the agenda in the weekly updates, if possible,

The meetings will be monthly, on the third Tuesday of each month, currently planned at 16:30 UTC, using Google Meet. We will publish the link to the Meet closer to the meeting both on wiki and in the newsletter. The time might change through the year as daylight saving kicks in in certain areas, or for other reasons.

Given the recent developments of Wikifunctions, in particular the recent ability to use Wikidata Lexemes in functions, this seems a great time to get more people involved with the group and to discuss how to proceed with the NLG work on Wikifunctions.

This can also be seen by the increased frequency of discussions about NLG topics. On the project chat, we have a lively discussion about how to represent grammatical features, a discussion which is also ongoing in the IRC / Telegram chat. This also makes a great first topic to discuss, a topic we have been discussing a few times in the NLG SIG before.

Recent Changes in the software

Wikifunctions before using the Codex table (this is the table of tests on join two strings (Z10000))
Wikifunctions using the Codex table

A few bug fixes this week, whilst we're working on the longer-term priorities for the Quarter as well.

We've tweaked the function editor inputs, which should improve interaction in mixed right-to-left and left-to-right content, especially around aliases (T373746). We corrected the "accordion" in the meta-data dialog to not add together the different duration times; the orchestration time is the total already (T369788). We fixed a bug in the selector for Objects and Wikidata items, where re-selecting the same value wouldn't update the shown value (T382755).

To make the language clearer, we've tweaked the wording of the labels for the new "renderable" API we created for the Wikipedia integration (T382140). We have replaced our original version of the table component used on Function pages with Codex's version, now that it exists (T373197). We've re-worked all our UX event names to be consistent across the application.

Recording of Volunteers' Corner

The recording of Monday’s Volunteers’ Corner is now available on Wikimedia Commons. We thank all volunteers who joined us, and wish you happy watching!

News in Types: Kleenean

In order to get back into creating more Types, we have kicked the year off with implementing the Type proposal for Kleenean values. This is used to represent values for a three-valued logic. Unlike Boolean logic, which has two values (True and False), the Kleenean logic has three values: True, False, and Maybe.

We expect to create many more Types this year, so we are looking forward to seeing the work on Type proposals. We thank everyone who has contributed to these proposals in the past, and has helped us create the first few types last year!

Function of the Week: Kleenean and

The Function of the Week is a column written by the community. Planning the column and submissions can be made here. This week’s entry was written by 99of9 with edits by Feeglgeef.

This week we are discussing: and (Kleenean), a good demonstration of the new Kleenean Type, which gives logical rigour to situations where there is sometimes uncertainty between a value of True and False.

The function takes two Kleenean inputs and returns a Kleenean. It generalises the Boolean and function to incorporate the possibility of one or both values being unknown (Kleenean value "Maybe").

Six tests are available. The first three are as you would expect from Boolean logic:

Then there are three tests with the "Maybe" value together with each of the options.

Three more tests are possible, switching the order of unequal parameters, but this is a reasonably complete demonstration of what the "and" function is supposed to do for Three-valued logic.

Five implementations are available:

  • Using the Python min() function because our in-code values of (True=1, Maybe=0, False=-1) are ordered such that the smallest argument is always the confidence we have that both ("x and y") are true.
  • The JavaScript version of the above, using Math.min()
  • A composition relying on the N-if function, the closest we have to a case statement. This goes straightforwardly through all possibilities, first checking for and returning any False, then checking for and returning any Maybe, and only defaulting to True if there were no False or Maybes.
  • not(or(not(x),not(y))) a Boolean equivalence that also works for Kleeneans once we ensure that not(Maybe)=Maybe, and translate the or(x,y) function, which in Python can be represented as max(x,y).
  • An algebraic formula in Python x+y-x2-y2+xy+x2y2. This seems like a very unlikely way to evaluate "and." The formula is specific to the numerical representation in code (options set to -1, 0, and 1). Such representations and transformations are studied in three-valued logic. Although the code is more complex, and it appears to have many more operations than the other implementations, it is interesting to note that the performance is similar or better, perhaps because the operations are all straightforward arithmetic without any branching.

This function is actually one of 19,683 possible binary functions of Kleeneans. It's not yet clear how useful this data type will be in the Wikifunctions ecosystem, where functions usually have clear and decidable outcomes. But when we begin to deal with real data, the prospect of missing or unknown values is likely to become more important. And maybe there will be a few maybes in our answers.

Fresh Functions Weekly

Here is a list of new functions that have been created since last week, with connected implementations and (mostly) passing tests. This week we had more functions without implementations or tests than usual, but we still had a good number of new functions to celebrate.

We can see a rich variety of functions – and there were even more who 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.