The on-wiki version of this newsletter can be found here: https://www.wikifunctions.org/wiki/Wikifunctions:Status_updates/2025-02-06 -- 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 https://www.wikifunctions.org/wiki/Wikifunctions:Project_chat#Natural_language_functions, 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
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 https://phabricator.wikimedia.org/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 https://phabricator.wikimedia.org/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 https://phabricator.wikimedia.org/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 https://phabricator.wikimedia.org/T382140). We have replaced our original version of the table component used on Function pages with Codex's version, now that it exists (T373197 https://phabricator.wikimedia.org/T373197). We've re-worked all our UX event names to be consistent across the application. Recording of Volunteers' Corner https://www.wikifunctions.org/wiki/File:Abstract_Wikipedia_Volunteer_Corner_2025-02.webm
The recording of Monday’s Volunteers’ Corner is now available on Wikimedia Commons https://commons.wikimedia.org/wiki/File:Abstract_Wikipedia_Volunteer_Corner_2025-02.webm. 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 https://www.wikifunctions.org/wiki/Wikifunctions:Type_proposals/Kleenean. This is used to represent values for a three-valued logic https://en.wikipedia.org/wiki/Three-valued_logic#Kleene_and_Priest_logics. 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 https://www.wikifunctions.org/wiki/Wikifunctions: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 https://www.wikifunctions.org/wiki/Special:MyLanguage/Wikifunctions:Function_of_the_Week/submissions. This week’s entry was written by 99of9 https://www.wikifunctions.org/wiki/User:99of9 with edits by Feeglgeef https://www.wikifunctions.org/wiki/User:Feeglgeef.*
This week we are discussing: and (Kleenean) https://www.wikifunctions.org/view/en/Z22143, a good demonstration of the new Kleenean Type https://www.wikifunctions.org/view/en/Z22112, 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 https://www.wikifunctions.org/view/en/Z10174 function to incorporate the possibility of one or both values being unknown (Kleenean value "Maybe https://www.wikifunctions.org/view/en/Z22114").
Six tests are available:
The first three are as you would expect from Boolean logic:
- True and True is True https://www.wikifunctions.org/view/en/Z22144 - False and False is False https://www.wikifunctions.org/view/en/Z22188 - True and False is False https://www.wikifunctions.org/view/en/Z22186
Then there are three tests with the "Maybe" value together with each of the options.
- True and Maybe is Maybe https://www.wikifunctions.org/view/en/Z22146 - Maybe and False is False https://www.wikifunctions.org/view/en/Z22147 - Maybe and Maybe is Maybe https://www.wikifunctions.org/view/en/Z22187
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 https://en.wikipedia.org/wiki/Three-valued_logic.
Five implementations are available:
- Using the Python min() function https://www.wikifunctions.org/view/en/Z22145 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 https://www.wikifunctions.org/view/en/Z22148 of the above, using Math.min() - A composition https://www.wikifunctions.org/view/en/Z22154 relying on the N-if https://www.wikifunctions.org/view/en/Z22154 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))) https://www.wikifunctions.org/view/en/Z22192 a Boolean equivalence that also works for Kleeneans once we ensure that not(Maybe)=Maybe, and translate the or(x,y) https://www.wikifunctions.org/view/en/Z22168 function, which in Python can be represented as max(x,y). - An algebraic formula in Python x+y-x2-y2+xy+x2y2 https://www.wikifunctions.org/view/en/Z22178. 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.
- claims from Wikidata item (Z22220) https://www.wikifunctions.org/view/en/Z22220 - date DMY (ar) (Z22214) https://www.wikifunctions.org/view/en/Z22214 - not (Kleenean) (Z22207) https://www.wikifunctions.org/view/en/Z22207 - if (Kleenean) (Z22202) https://www.wikifunctions.org/view/en/Z22202 - switch (Z22193) https://www.wikifunctions.org/view/en/Z22193 - Circular shift right (Z22179) https://www.wikifunctions.org/view/en/Z22179 - or (Kleenean) (Z22168) https://www.wikifunctions.org/view/en/Z22168 - Translate RNA (Z22162) https://www.wikifunctions.org/view/en/Z22162 - Schrödinger Model sub shell configuration (Z22155) https://www.wikifunctions.org/view/en/Z22155 - and (Kleenean) (Z22143) https://www.wikifunctions.org/view/en/Z22143 - Add verb to indef noun phrase (Z22137) https://www.wikifunctions.org/view/en/Z22137 - is Kleenean True? (Z22131) https://www.wikifunctions.org/view/en/Z22131 - Boolean as Kleenean (Z22126) https://www.wikifunctions.org/view/en/Z22126 - Kleenean identity (Z22120) https://www.wikifunctions.org/view/en/Z22120 - grammatical features list from Wikidata items (Z22107) https://www.wikifunctions.org/view/en/Z22107 - Breton verb form (Z22097) https://www.wikifunctions.org/view/en/Z22097 - futures price (Z22049) https://www.wikifunctions.org/view/en/Z22049 - wrap with code-nowiki XML tags (Z22044) https://www.wikifunctions.org/view/en/Z22044 - area of a circle (rational approximation) (Z22027) https://www.wikifunctions.org/view/en/Z22027 - read floating point number assuming decimal comma (Z22007) https://www.wikifunctions.org/view/en/Z22007 - read floating point number assuming decimal point (Z22002) https://www.wikifunctions.org/view/en/Z22002
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 https://www.wikifunctions.org/wiki/Special:ListObjectsByType?type=Z8&orderby=latestcan be found on-wiki.
On 06/02/2025 09:02 GMT Denny Vrandečić dvrandecic@wikimedia.org wrote:
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 https://www.wikifunctions.org/wiki/Wikifunctions:Type_proposals/Kleenean. This is used to represent values for a three-valued logic https://en.wikipedia.org/wiki/Three-valued_logic#Kleene_and_Priest_logics. Unlike Boolean logic, which has two values (True and False), the Kleenean logic has three values: True, False, and Maybe.
I do find this interesting, from the rather arcane-seeming angle of implication for the Kleenean values (aka lifted Booleans). There appear to be two different versions of "maybe" implication. Back in 2017, as a Wikimedian in Residence, I wrote a blogpost attempting to explain one of those in operational terms:
https://moore.libraries.cam.ac.uk/meet-your-wikimedian-residence/unknown
Charles
abstract-wikipedia@lists.wikimedia.org