-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Implement spelled out for Māori #54
base: master
Are you sure you want to change the base?
Conversation
I'm not sure how I was aiming to implement it previously, as it has been a while since I've worked on this project, but I implemented numbers up to 999 this evening. It certainly doesn't feel as though I am doing this the most efficient way, but premature optimisation is the root of all evil; I can optimise once it is working. Overall, this commit has made good progress.
I'm not sure how I was aiming to implement it previously, as it has been a while since I've worked on this project, but I implemented numbers up to 999 this evening. It certainly doesn't feel as though I am doing this the most efficient way, but premature optimisation is the root of all evil; I can optimise once it is working. Overall, this commit has made good progress.
In Māori's (mi) implementation of spelled_out, there is a special case in which 1xx and 1xxx numbers start with _ko_tahi (rather than just tahi, which is the equivalent of one). If the number is > 99 and is not 1xx or 1xxx, we need to use the first digit. I initially wrote the first digit as d being n ÷ 10, however this is not correct when n > 1000, so we have to account for order of magnitude
In Māori's (mi) implementation of spelled_out, there is a special case in which 1xx and 1xxx numbers start with _ko_tahi (rather than just tahi, which is the equivalent of one). If the number is > 99 and is not 1xx or 1xxx, we need to use the first digit. I initially wrote the first digit as d being n ÷ 10, however this is not correct when n > 1000, so we have to account for order of magnitude
Since 7b8e491, doing better still: Test Summary: | Pass Fail Error Total Time
Māori | 52 6 3 61 4.1s Still to do:
Māori: Test Failed at /Users/jakeireland/projects/SpelledOut.jl/test/runtests.jl:114
Expression: spelled_out(1982, lang = :mi) == "kotahi mano, iwa rau, waru tekau mā rua"
Evaluated: "kotahi mano waru tekau mā rua" == "kotahi mano, iwa rau, waru tekau mā rua"
|
Requires heavy cleaning, but still just uncovering patterns etc. In fact, the basic implementation is nearly complete! Aside from a stray comma that may or may not be needed, and some larger number scales, this is done. Then I will be able to clean it up and decouple some patterns. I'm really pleased with how this is turning out. It's neat that I can't find any implementation of this before now, and I'm pleased that it's almost finished, despite my busy schedule (I haven't worked on it in a while, but picked it up again tonight in the spirit of procrastination). Once the basic implementation is done, I will be able to ensure this works for negative numbers, and possibly ordinal numbers (we will see). After that I should be able to merge it into trunk and make a release! There are also a few semantics I need to check on, but these would be minor changes.
The primary questions I have had are:
I have asked some people these questions, but I'm still trying to find kaumātua to provide me with assurance that I am doing this correctly. Some important questions to ask:
The goal of the project as a whole (not te reo specific) is to provide a programmatic interface to writing out numbers in long form. Specifically for te reo Māori, I am proud of our culture and language. I think this functionality is useful in many contexts, from simply providing readable metrics in areas such as report writing or data science, to natural language processing and machine learning. Providing this functionality for te reo Māori enables the use of this library throughout Aotearoa—I particularly see this as being useful in government, where language and accessibility is most important. I think this benefits our whānau/Aotearoa, simply in providing visibility and accessibility to te reo Māori. The numbers output from this programme do not tell a narrative, as it entirely depends on the use case. This programme is a library, to be used in others' programmes. That said, I'm curious to know how this is done in computer science. My intentions with this library are good, and I genuinely think that the accessibility this would enable is beneficial, but you can't necessarily be sure that everyone who uses this library has good intentions, no? Same can be said for any library. I'd be interested to know how this is tackled in computer science. |
Not all spelled out outputs are in Anglo-Saxon form
Other questions:
Note also, regarding big numbers, that if you think of navigation by the many stars, I'm sure there would have been numbers or co-ordinates that map their geographical and spatial dimensions of time to land. So I suspect there are numbers that are large, or in some way relevant in this area. Still unsure about the modifiers question, though. |
We don't use this anymore
Ensure we use spaces over tabs, and consistently
No description provided.