Language/Multiple-languages/Culture/Numeration-Tutorial

From Polyglot Club WIKI
Jump to navigation Jump to search
Rate this lesson:
5.00
(one vote)

Finally, the aleph version of Numeration is released! You can practise some Esperanto numerals now!

Address: https://gitlab.com/GrimPixel/Numeration

It is a program to help people to practise reading, writing (hopefully also listening to and speaking) numbers, written in Python and YAML. It would be ridiculous to post this tutorial on GitLab, because this tutorial's target readers include non-programmers, so it may be too detailed for programmers.

What are Python and YAML and why choose them?

Python is one of the most beloved languages:

https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages-loved

Why not Rust or TypeScript, but Python? Well, because Python has a lot of scientific libraries, so it possesses higher relevance to my main area of study. Its code is easy to maintain, which is another important factor for the choice.

Yaml is one of the most beloved data serialization formats:

https://www.zionandzion.com/json-vs-xml-vs-toml-vs-cson-vs-yaml/

And why not JSON or TOML, but YAML? Because YAML possesses the highest readability and is easy to maintain.

How to get started with Numeration?

Download the newest Python, so you can run Python programs; download an integrated development environment (IDE) so you can edit or run the program in source code:

https://www.python.org/downloads/

https://www.jetbrains.com/pycharm/download/

Then download Python's YAML parser “ruamel”, so that Python interpreter can understand YAML format. If you are using Windows, tap WinKey, input "cmd", tap Enter, copy the line starting with "pip" in the following webpage, paste into the command line window, tap Enter. For other ytems, you should already have known how to open command line, I suppose.

https://pypi.org/project/ruamel.yaml/

They are all open-source.

After doing this, go to that Address above. Download the source code (in fact, you just need 'rule/esperanto.py' and 'rule/dictionary/esperanto.yaml' for the time being. Keep the structure unchanged (i.e. don't move the yaml out of "dictionary" directory, or you need to edit the source code).

Open PyCharm, open the project directory to the "Numeration" folder, open esperanto.py.

On the upper-right corner, you can see that green run button. You need to specify the path to the esperanto.py on the left side of it. Click on the button (or tap "Shift + F10") to run the program in the console.

If you are still confused on PyCharm, please watch the first sections of that Mosh's tutorial above.

What's the futural plan?

I need to add the features mentioned in 'about/content.yaml' for Esperanto, then add support to the other 4 languages mentioned in 'about/language.yaml, then I will start supporting other languages. Of course, I will find the common parts in different languages, create modules in 'rule/_common.py'. Maybe I can create a GUI with BeeWare after all of this. I need to accumulate experience through this project, then I can create other ones.

Contributors

GrimPixel, Maintenance script and Vincent


Create a new Lesson