{"id":26591605,"url":"https://github.com/tsvikas/hebrew-numbers","last_synced_at":"2025-06-30T00:03:00.728Z","repository":{"id":269500950,"uuid":"869798730","full_name":"tsvikas/hebrew-numbers","owner":"tsvikas","description":"convert numbers to hebrew","archived":false,"fork":false,"pushed_at":"2025-03-11T17:18:12.000Z","size":178,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T17:24:19.674Z","etag":null,"topics":["python-package"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsvikas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-08T22:57:45.000Z","updated_at":"2025-03-11T17:17:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"5803097e-9d54-461c-87fe-0f286b506a40","html_url":"https://github.com/tsvikas/hebrew-numbers","commit_stats":null,"previous_names":["tsvikas/hebrew_numbers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fhebrew-numbers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fhebrew-numbers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fhebrew-numbers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvikas%2Fhebrew-numbers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsvikas","download_url":"https://codeload.github.com/tsvikas/hebrew-numbers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245111880,"owners_count":20562511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-package"],"created_at":"2025-03-23T14:18:46.248Z","updated_at":"2025-03-23T14:18:46.688Z","avatar_url":"https://github.com/tsvikas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hebrew-numbers\n\n[![Tests][tests-badge]][tests-link]\n[![uv][uv-badge]][uv-link]\n[![Ruff][ruff-badge]][ruff-link]\n[![Black][black-badge]][black-link]\n[![codecov][codecov-badge]][codecov-link]\n\\\n[![PyPI version][pypi-version-badge]][pypi-link]\n[![PyPI platforms][pypi-platforms-badge]][pypi-link]\n[![Total downloads][pepy-badge]][pepy-link]\n\\\n[![Made Using tsvikas/python-template][template-badge]][template-link]\n[![GitHub Discussion][github-discussions-badge]][github-discussions-link]\n[![PRs Welcome][prs-welcome-badge]][prs-welcome-link]\n\n## Overview\n\nThis library provides a comprehensive solution for working with Hebrew numbers in various contexts.\nHebrew has unique and complex rules for number representation that vary based on gender, definiteness, and usage context.\nThis library aims to simplify these complexities by providing intuitive functions for converting numerical values to their proper Hebrew textual representation.\n\n## Usage\n\nInstall the package using pip, or with a dependency manager like uv:\n\n```bash\npip install hebrew-numbers\n```\n\nand import the package in your code:\n\n```python\nimport hebrew_numbers\n```\n\n### Indefinite Number -- מספר סתמי\n\nWhen counting without specific nouns, but rather in a general sense, we use the indefinite number.\n\n```pycon\n\u003e\u003e\u003e [indefinite_number(n) for n in [1, 2, 3]]\n['אחת', 'שתיים', 'שָלוש']\n\u003e\u003e\u003e indefinite_number(0)\n'אפס'\n\u003e\u003e\u003e indefinite_number(-3)\n'מינוס שָלוש'\n\u003e\u003e\u003e indefinite_number(1234567890)\n'מיליארד מאתיים שלושים וארבעה מיליון חמש מאות שישים ושבעה אלף שמונֶה מאות ותשעים'\n```\n\n### Ordinal Number -- מספר סודר\n\nA number that describes the position of an object in a series is called an ordinal number.\nThis number can be masculine (זכר) or feminine (נקבה).\n\n```pycon\n\u003e\u003e\u003e [ordinal_number(n, \"M\") for n in [1, 2, 3]]\n['ראשון', 'שני', 'שלישי']\n\u003e\u003e\u003e [ordinal_number(n, \"F\") for n in [1, 2, 3]]\n['ראשונה', 'שנייה', 'שלישית']\n```\n\n### Cardinal Number -- מספר מונה\n\n#### Usage with noun\n\nCardinal numbers are used to indicate quantities. Their form depends on the following factors:\n\n- The gender of the noun (masculine or feminine).\n- Whether the noun is definite (מיודע) or indefinite (סתמי).\n\nTo specify a quantity with a noun, use `count_noun(n, singular_form, plural_form, gender, definite)`.\n\n| Number | Masculine, Indefinite                                | Masculine, Definite                                   | Feminine, Indefinite                                  | Feminine, Definite                                     |\n| ------ | ---------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------ |\n| `n`    | `count_noun(n, \"ילד\", \"ילדים\", \"M\", definite=False)` | `count_noun(n, \"הילד\", \"הילדים\", \"M\", definite=True)` | `count_noun(n, \"ילדה\", \"ילדות\", \"F\", definite=False)` | `count_noun(n, \"הילדה\", \"הילדות\", \"F\", definite=True)` |\n| 1      | ילד אֶחָד                                              | הילד האֶחָד                                             | ילדה אחת                                              | הילדה האחת                                             |\n| 2      | שני ילדים                                            | שני הילדים                                            | שתי ילדות                                             | שתי הילדות                                             |\n| 3      | שלושה ילדים                                          | שלושת הילדים                                          | שָלוש ילדות                                            | שְלוש הילדות                                            |\n\nIf you only need the numerical prefix, use `count_prefix(n, gender, definite)`.\n\n#### Absolute and Construct Forms\n\nThe number itself can be masculine (זכר) or feminine (נקבה), and absolute (נפרד) or construct (נסמך).\nIf you know the gender and construct state, you can the number itself with `cardinal_number(n, gender, construct)`\n\n| Number | Masculine, Absolute                        | Masculine, Construct                      | Feminine, Absolute                         | Feminine, Construct                       |\n| ------ | ------------------------------------------ | ----------------------------------------- | ------------------------------------------ | ----------------------------------------- |\n| `n`    | `cardinal_number(n, \"M\", construct=False)` | `cardinal_number(n, \"M\", construct=True)` | `cardinal_number(n, \"F\", construct=False)` | `cardinal_number(n, \"F\", construct=True)` |\n| 1      | אֶחָד                                        | אַחַד                                       | אחת                                        | אחת                                       |\n| 2      | שניים                                      | שני                                       | שתיים                                      | שתי                                       |\n| 3      | שלושה                                      | שלושת                                     | שָלוש                                       | שְלוש                                      |\n\n##### Notes\n\n- The indefinite number is the feminine-absolute form.\n- The form of the number following \"פי\" (times/multiplied by) to be in the masculine-absolute form: פי שניים, פי שלושה, פי ארבעה.\n- Use the masculine-absolute form to indicate the days of the month: אחד בכסלו, עשרה בטבת, אחד באפריל, שניים ביוני.\n\n## Development\n\n### Getting started\n\n- install [git][install-git], [uv][install-uv].\n- git clone this repo: `git clone tsvikas/hebrew-numbers.git`\n- run `uv run just prepare`\n\n### Tests and code quality\n\n- use `uv run just format` to format the code.\n- use `uv run just lint` to see linting errors.\n- use `uv run just test` to run tests.\n- use `uv run just check` to run all the checks (format, lint, test, and pre-commit).\n- Run a specific tool directly, with `uv run pytest`/`ruff`/`mypy`/`black`/...\n\n\u003c!---\nBadges to add, when needed:\n[![Documentation Status][rtd-badge]][rtd-link]\n\n[rtd-badge]: https://readthedocs.org/projects/hebrew-numbers/badge/?version=latest\n[rtd-link]: https://hebrew-numbers.readthedocs.io/en/latest/?badge=latest\n--\u003e\n\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[black-link]: https://github.com/psf/black\n[codecov-badge]: https://codecov.io/gh/tsvikas/hebrew-numbers/graph/badge.svg\n[codecov-link]: https://codecov.io/gh/tsvikas/hebrew-numbers\n[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions\u0026message=Ask\u0026color=blue\u0026logo=github\n[github-discussions-link]: https://github.com/tsvikas/hebrew-numbers/discussions\n[install-git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git\n[install-uv]: https://docs.astral.sh/uv/getting-started/installation/\n[pepy-badge]: https://img.shields.io/pepy/dt/hebrew-numbers\n[pepy-link]: https://pepy.tech/project/hebrew-numbers\n[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[prs-welcome-link]: http://makeapullrequest.com\n[pypi-link]: https://pypi.org/project/hebrew-numbers/\n[pypi-platforms-badge]: https://img.shields.io/pypi/pyversions/hebrew-numbers\n[pypi-version-badge]: https://img.shields.io/pypi/v/hebrew-numbers\n[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n[ruff-link]: https://github.com/astral-sh/ruff\n[template-badge]: https://img.shields.io/badge/%F0%9F%9A%80_Made_Using-tsvikas%2Fpython--template-gold\n[template-link]: https://github.com/tsvikas/python-template\n[tests-badge]: https://github.com/tsvikas/hebrew-numbers/actions/workflows/ci.yml/badge.svg\n[tests-link]: https://github.com/tsvikas/hebrew-numbers/actions/workflows/ci.yml\n[uv-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json\n[uv-link]: https://github.com/astral-sh/uv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsvikas%2Fhebrew-numbers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsvikas%2Fhebrew-numbers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsvikas%2Fhebrew-numbers/lists"}