Movatterモバイル変換


[0]ホーム

URL:


Jump to content
Wikifunctions
Search

Wikifunctions:Community portal

From Wikifunctions

Welcome to thecommunity portal for Wikifunctions!

This is the central place to document Wikifunctions's to-do lists and ongoing project work. [To-do!]

The catalogue of functions is a good place to start.

For discussions, seeWikifunctions:Project chat.

Useful links

Noticeboards

Task centre

Perennial tasks

Tasks listed by users

Example:
Done. Thanks for pointing that out!Example (talk ·contribs)

[signing to enable reply link:--GrounderUK (talk)11:27, 6 May 2024 (UTC)[reply]

I had another go at implementing21809 and again failed, and now I'm thinking I've misunderstood how evaluation works since I wouldn't expectZ882(Z7(...), Z7(...)) to ever appear. In addition to fixing it, would someone please explain my mistake?YoshiRulz (talk)22:17, 19 July 2025 (UTC)[reply]
I don’t thinkZ17534 actually works. When it callsZ882, it passes the function calls toZ16829 as the required types, but these calls are not evaluated, so Z882 returns a generic type function call that contains function calls to Z16829. This might work in theory, but the function calls refer toargument references that cannot be resolved when the Typed pair’s type is subsequently generated by the call to Z882. At least, I think that’s where theinvalid key error is coming from. When I used Try this function onZ882 with a call to Z16829 as one of the required types, it seemed to work as I would expect (with no call to Z16829 in the result). So, yeah… looks like a bug.GrounderUK (talk)09:51, 20 July 2025 (UTC)[reply]
Oh, it never occurred to me that the problem could be with16829. Could you make an alternate implementation for17534 which doesn't have that, since the function's return type is a pair of Z1s anyway? (The values returned by such an implementation would violate a condition of19586, but I think most tests would continue working because the expected values would be made the same way.)YoshiRulz (talk)10:45, 20 July 2025 (UTC)[reply]
Not sure. I think the problem lies withZ17534 relying on something that doesn’t actually happen. And the user interface doesn’t support Typed pairs correctly. Have you considered implementing your function as a Typed list of Typed lists?GrounderUK (talk)12:32, 20 July 2025 (UTC)[reply]
I guess I should so that it's at least usable for other compositions. edit: I can't while the tests are connected.YoshiRulz (talk)14:49, 20 July 2025 (UTC)[reply]
DoneGrounderUK (talk)15:15, 20 July 2025 (UTC)[reply]
Z21396 fails in an edge case, which I've just added a test for. It needs to be implemented asZ876(Z10000, K1, "").YoshiRulz (talk)20:18, 25 July 2025 (UTC)[reply]
DoneGrounderUK (talk)20:45, 25 July 2025 (UTC)[reply]
Hi, I would like to request to connect implementation and the tests for bothIndonesian cardinal (Z18546) andIndonesian ordinal from natural number (Z26821). Thank you!NikolasKHF (talk)14:56, 29 July 2025 (UTC)[reply]
I see thatZ18546 has a failed testcase.Dv103 (talk)14:58, 29 July 2025 (UTC)[reply]
Yes, the 100 should return "seratus" instead of "satu ratus". Besides, I also notice that it will resulted "satu ribu" for 1000 instead of "seribu". I am currently trying to fix the issue and will update if I already solve it. Sorry and thanks in advance.NikolasKHF (talk)16:12, 29 July 2025 (UTC)[reply]
I have revised the code forIndonesian cardinal (Z18546) and have added additional test cases. Please kindly checkNikolasKHF (talk)16:57, 29 July 2025 (UTC)[reply]
Done Connected both functions (and the new testcases).
As a side note, for some reason the testcases you created didn't have the input (I had to add it). What language is your Wikifunctions interface? In which format did you write the numeric values? DoesZ14290 support the format you were using?Dv103 (talk)17:02, 29 July 2025 (UTC)[reply]
Ah sorry, I think I forgot to include the input on the testcases. I use Indonesia as the Wikifunctions interface. When I try to check usingZ14290 it looks like the function support the Indonesia format. While at it, I would like to ask, on the last two test cases inZ26821, I found that they are fail due tono connected implementation yet (Z503). I have purge the page but it seems the error remains. Is it only in my machine? Thank you in advanceNikolasKHF (talk)17:15, 29 July 2025 (UTC)[reply]
I believe those were globally cached errors. The cache is now refreshed and showing the test cases as passed. Please reply if this is not what you see now.GrounderUK (talk)17:39, 29 July 2025 (UTC)[reply]
I understand. It's fixed now. Thank you very muchNikolasKHF (talk)23:29, 29 July 2025 (UTC)[reply]
AndZ26821 has failed all 3 test cases.~/Bunnypranav:<ping>15:01, 29 July 2025 (UTC)[reply]
This is becauseZ18546 isn't connected.Dv103 (talk)15:02, 29 July 2025 (UTC)[reply]
Ah, my bad. Didn't notice the relation.~/Bunnypranav:<ping>16:29, 29 July 2025 (UTC)[reply]
Hi, can anyone connect the implementationPython implementation of simplified Luxembourgish (Z27275) to the functionSimplified Luxembourgish Eifel rule (Z27254) please? --Volvox (talk)12:46, 8 August 2025 (UTC)[reply]
I see there is no test for it. It's better to add some tests to the function before connecting the implementation, so we can see if it actually works as intended.Dv103 (talk)12:49, 8 August 2025 (UTC)[reply]
They added some tests. The function was also created twice for some reason:Z27255YoshiRulz (talk)12:02, 11 August 2025 (UTC)[reply]
Done. I've changed the input and output type to String (since it's very difficult to work with monolingual texts in Python code, and given that the definition of function already implies to work with Luxembourgish text, the language indicator is useless) and I've connected everything. Now I'll signalZ27255 for deletion.Dv103 (talk)13:07, 11 August 2025 (UTC)[reply]
Thank you all for your help and for cleaning up. --Volvox (talk)07:17, 17 August 2025 (UTC)[reply]
Hi, could anyone connectsimple implementation for Z27267 (Z27272) implementation tolocation from entity and class (Indonesian) (Z27267) function, please? Thanks!NikolasKHF (talk)12:57, 8 August 2025 (UTC)[reply]
It seems to fail the only testcase.Dv103 (talk)13:05, 8 August 2025 (UTC)[reply]
I see. When I test thelabel of item reference in language (Z23753), it always returnvoid (Z24) error when usingIndonesia(Q252). I think that's the problem. I have created another test case that used another Wikidata item. Please kindly check. Thanks!NikolasKHF (talk)13:25, 8 August 2025 (UTC)[reply]
It's just a known problem with large items (like ones referring to nations). Please try with testcases not involving nations (or big cities).Dv103 (talk)13:36, 8 August 2025 (UTC)[reply]
I see. I useKenya(Q114) as the location inUnlabelled (Z27277) and it seems to work. Previous attempt is correct, it's just lack of spaces and I have added those. It works now, please kindly check. Thanks!NikolasKHF (talk)13:43, 8 August 2025 (UTC)[reply]
ConnectedDv103 (talk)14:48, 8 August 2025 (UTC)[reply]
Thank you!NikolasKHF (talk)14:51, 8 August 2025 (UTC)[reply]
Hi, could anyone please connectLuxembourgish article-less instantiating, compose (Z27493) toLuxembourgish article-less instantiating sentence (Z27490) please? I added three test cases, two of which passed, but the first one failed withError in evaluation (Z507) and output resultvoid (Z24), which I don't really understand. Is this an inherent problem of my implementation, or is it an artifact of the execution? Also, regarding the tip "Something not working? Try Wikifunctions.Debug to trace your code." that I'm shown, how would I go about doing this? --Volvox (talk)07:23, 17 August 2025 (UTC)[reply]
Done Now all 3 tests work. When working with Wikidata, it's possible that sometimes functions don't work for unknown reasons.Dv103 (talk)09:04, 17 August 2025 (UTC)[reply]
Could someone change the expected output to "engmilliounst" (and thus also the label) for the test case1000000 → "engmilliounst" (Z27679), as this is also an acceptable form for the ordinal of 1.000.000 (corresponding to "millionth" vs "one millionth") and coincides with the function output? --Volvox (talk)19:40, 25 August 2025 (UTC)[reply]
Also, the JavaScript implementationLuxembourgish cardinal javascript (Z19415) is now working just fine. --Volvox (talk)20:05, 25 August 2025 (UTC)[reply]
Done Connected (but there is a “ghost”Z20 causing all tests to fail on the implementation pagesSpecial:Search/Z16422)GrounderUK (talk)21:23, 25 August 2025 (UTC)[reply]
Thank you. But I don't really understand the "ghost" Z20. Is this a general bug or is it related to how I created the implementation and/or test cases? Because I noticed that in my experience test cases seem to always fail on implementation pages, but on function pages they work as intended. --Volvox (talk)07:13, 26 August 2025 (UTC)[reply]
Sorry. Yes, it’s ageneral bug. Test cases generally pass or fail the same way on the function and implementation pages. But if a connectedZ20 has been deleted, you can get failures on the implementation pages. I think it just needs a small edit to the function’s JSON, but I’m not set up to do that. Hopefully, someone who is able to will make the necessary change soon (which is the only reason I mentioned it).GrounderUK (talk)07:37, 26 August 2025 (UTC)[reply]
Not doneGrounderUK (talk)07:48, 26 August 2025 (UTC)[reply]
Done --99of9 (talk)11:07, 26 August 2025 (UTC)[reply]
DoneGrounderUK (talk)21:10, 25 August 2025 (UTC)[reply]
Hi! I just created two functions:days since last Easter (Z28498) anddays until next Easter (Z28495). Both functions already have test cases and implementation. The first function have an implementation that already pass all the tests. The implementation for the second function, however, have not passed any test case. When I check, I specify a wrong output type asNatural number (Z13518) instead ofInteger (Z16683). I cannot change the output type since there are test cases that already connected to the functions.
Therefore, I would like to ask for help to connect the test cases and implementation fordays since last Easter (Z28498), then maybe change the output type ofdays until next Easter (Z28495) toInteger (Z16683), while also change the validation functions for all test cases (192 days to Easter 2026 (from 2025-09-25) (Z28497) andGood Friday until Easter Sunday 2026 is 2 days (Z28502), so that they are validated bysame Integer (Z16688) instead ofequality of natural numbers (Z13522))
Sorry for the trouble. Thank you very much in advance!
NikolasKHF (talk)07:21, 25 September 2025 (UTC)[reply]
Why isInteger (Z16683) the right type? This function could output negative values?Dv103 (talk)07:31, 25 September 2025 (UTC)[reply]
These functions should not output negative values. As the whyInteger (Z16683), I usedays until (Z20744) to calculate days passed from the date provided by the user and the next or previous easter date, which hasInteger (Z16683) as the output type. Which means that, the implementation on bothdays since last Easter (Z28498) anddays until next Easter (Z28495) outputInteger (Z16683). Now, because of that, the test cases givesReturn type mismatch (Z517) error, I believe because it tries to compareInteger (Z16683) withNatural number (Z13518). If you have any suggestion regarding this, I would love to know.
Thank you!
NikolasKHF (talk)07:45, 25 September 2025 (UTC)[reply]
I think it’s better to keep the function “honest”. If it’s not supposed to return negative values, it would be better to have aNatural number (Z13518) return type. I think your logic ensures you have a non-negative integer, so you can just convert that to a Natural number withabsolute value of integer as natural number (Z17144). I know that’s easier said than done, once it’s all defined, but if you start with the “honest” type in the function definition, the user interface should prevent you from selecting functions with a different type in your composition (until you’ve selected an appropriate converter function).GrounderUK (talk)09:10, 25 September 2025 (UTC)[reply]
Oh, that makes more sense. I will try implement that on the implementation. Thank you!
NikolasKHF (talk)09:14, 25 September 2025 (UTC)[reply]
Done! Implementation (next Easter (composition) (Z28496)) fordays until next Easter (Z28495) is now working! Thank you!
NikolasKHF (talk)10:23, 25 September 2025 (UTC)[reply]
You’re welcome… and congratulations!
DoneGrounderUK (talk)10:33, 25 September 2025 (UTC)[reply]
Hi, could anyone please connectGregorian year in Luxembourgish, Composition (Z28873)? --Volvox (talk)18:07, 16 October 2025 (UTC)[reply]
DoneGrounderUK (talk)18:53, 16 October 2025 (UTC)[reply]
Hi, could anyone please connectextractInitials (Z28902)?--GrimRob (talk)16:17, 21 October 2025 (UTC)[reply]
DoneGrounderUK (talk)16:38, 21 October 2025 (UTC)[reply]
Hi, I added a test case and fixed a bug which pases in my V2 implementation (V1 passes 6/7 but is showing 0/7 for some reason). Could anyone please connect the V2 instead of the currently connected implementationinitials from full name of person (Z28917)? --GrimRob (talk)17:47, 21 October 2025 (UTC)[reply]
DoneDv103 (talk)19:04, 21 October 2025 (UTC)[reply]
Heya, I tried to make aSuperlative definition, in English (Z29010) implementation in composition(Superlative definition in English, composition (Z29012)), but it errors out:Unable to convert to canonical form (path to the problem: "Z22K2.K1.K1.K2.Z5K2.Z528K1.Z99K1.Z7K1.Z8K4.[ 1 ].Z14K2.Z26107K2.Z21394K1.[ 1 ].Z10771K1.Z23753K2.Z18K1.{"Z1K1":"Z18","Z6K1":"Z29010K5","Z18K1":""}") - why does this happen, and how would I fix it? I tried to usedefining role sentence in English, Composition (Z28030) as a guide, but for a first dive into composition I may have taken on something a bit large.infernostars(talk) (contribs)02:49, 23 October 2025 (UTC)[reply]
When you go toSuperlative definition in English, composition (Z29012) you'll see two red words "Function" and "Wikidata item". Both of those were not set in the composition, so it is missing information. There may be more deeper problems, but fix this first. --99of9 (talk)03:33, 23 October 2025 (UTC)[reply]
Retrieved from "https://www.wikifunctions.org/w/index.php?title=Wikifunctions:Community_portal&oldid=224984"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp