eee-project 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. eee_project-1.0.0/.forgejo/workflows/test.yml +18 -0
  2. eee_project-1.0.0/.github/workflows/publish.yml +17 -0
  3. eee_project-1.0.0/.gitignore +13 -0
  4. eee_project-1.0.0/AGENTS.md +62 -0
  5. eee_project-1.0.0/AUTHORS +1 -0
  6. eee_project-1.0.0/LICENSE +73 -0
  7. eee_project-1.0.0/Makefile +15 -0
  8. eee_project-1.0.0/NOTICE +27 -0
  9. eee_project-1.0.0/PKG-INFO +161 -0
  10. eee_project-1.0.0/README.md +143 -0
  11. eee_project-1.0.0/docs/api-patterns.md +1118 -0
  12. eee_project-1.0.0/docs/api-reference.md +130 -0
  13. eee_project-1.0.0/docs/chains.md +86 -0
  14. eee_project-1.0.0/docs/examples.md +49 -0
  15. eee_project-1.0.0/evaluation/compare_backends.py +145 -0
  16. eee_project-1.0.0/examples/Makefile +55 -0
  17. eee_project-1.0.0/examples/adjectives.tsv +4 -0
  18. eee_project-1.0.0/examples/adverb_adjectives.tsv +7 -0
  19. eee_project-1.0.0/examples/ancient_greek.py +109 -0
  20. eee_project-1.0.0/examples/ancient_greek_notebook.py +247 -0
  21. eee_project-1.0.0/examples/backend_chain.py +61 -0
  22. eee_project-1.0.0/examples/backend_comparison.py +186 -0
  23. eee_project-1.0.0/examples/backend_selection.py +117 -0
  24. eee_project-1.0.0/examples/chain_hooks.py +66 -0
  25. eee_project-1.0.0/examples/config_store_notebook.py +140 -0
  26. eee_project-1.0.0/examples/greek_exercise_notebook.py +902 -0
  27. eee_project-1.0.0/examples/greek_notebook.py +485 -0
  28. eee_project-1.0.0/examples/modern_greek.py +96 -0
  29. eee_project-1.0.0/examples/modern_greek_notebook.py +258 -0
  30. eee_project-1.0.0/examples/nouns.tsv +7 -0
  31. eee_project-1.0.0/examples/unimorph.py +257 -0
  32. eee_project-1.0.0/examples/unimorph_notebook.py +378 -0
  33. eee_project-1.0.0/examples/vocab.tsv +11 -0
  34. eee_project-1.0.0/pyproject.toml +61 -0
  35. eee_project-1.0.0/src/eee_project/__init__.py +460 -0
  36. eee_project-1.0.0/src/eee_project/_chain.py +86 -0
  37. eee_project-1.0.0/src/eee_project/_exceptions.py +46 -0
  38. eee_project-1.0.0/src/eee_project/_grammar_fmt.py +103 -0
  39. eee_project-1.0.0/src/eee_project/_hooks.py +28 -0
  40. eee_project-1.0.0/src/eee_project/_protocol.py +49 -0
  41. eee_project-1.0.0/src/eee_project/_registry.py +246 -0
  42. eee_project-1.0.0/src/eee_project/_results.py +40 -0
  43. eee_project-1.0.0/src/eee_project/_slot_template.py +50 -0
  44. eee_project-1.0.0/src/eee_project/_tag_registry.py +55 -0
  45. eee_project-1.0.0/src/eee_project/backends/__init__.py +0 -0
  46. eee_project-1.0.0/src/eee_project/backends/_mg_features.py +158 -0
  47. eee_project-1.0.0/src/eee_project/backends/modern_greek.py +122 -0
  48. eee_project-1.0.0/src/eee_project/backends/unimorph.py +255 -0
  49. eee_project-1.0.0/src/eee_project/backends/unimorph_tags.py +36 -0
  50. eee_project-1.0.0/src/eee_project/data/__init__.py +0 -0
  51. eee_project-1.0.0/src/eee_project/data/labels/__init__.py +0 -0
  52. eee_project-1.0.0/src/eee_project/data/labels/adj-el.tsv +41 -0
  53. eee_project-1.0.0/src/eee_project/data/labels/adj-en.tsv +41 -0
  54. eee_project-1.0.0/src/eee_project/data/labels/adj-ru.tsv +41 -0
  55. eee_project-1.0.0/src/eee_project/data/labels/noun-el.tsv +41 -0
  56. eee_project-1.0.0/src/eee_project/data/labels/noun-en.tsv +41 -0
  57. eee_project-1.0.0/src/eee_project/data/labels/noun-ru.tsv +41 -0
  58. eee_project-1.0.0/src/eee_project/data/labels/tense-el.tsv +15 -0
  59. eee_project-1.0.0/src/eee_project/data/labels/tense-en.tsv +15 -0
  60. eee_project-1.0.0/src/eee_project/data/labels/tense-ru.tsv +15 -0
  61. eee_project-1.0.0/src/eee_project/data/labels/ui-el.tsv +35 -0
  62. eee_project-1.0.0/src/eee_project/data/labels/ui-en.tsv +35 -0
  63. eee_project-1.0.0/src/eee_project/data/labels/ui-ru.tsv +35 -0
  64. eee_project-1.0.0/src/eee_project/data/labels/verb-el.tsv +193 -0
  65. eee_project-1.0.0/src/eee_project/data/labels/verb-en.tsv +193 -0
  66. eee_project-1.0.0/src/eee_project/data/labels/verb-ru.tsv +193 -0
  67. eee_project-1.0.0/src/eee_project/data/languages.yaml +45 -0
  68. eee_project-1.0.0/src/eee_project/data/unimorph/ell.tsv +211923 -0
  69. eee_project-1.0.0/src/eee_project/data/unimorph/grc.tsv +44026 -0
  70. eee_project-1.0.0/src/eee_project/notebook_utils.py +5686 -0
  71. eee_project-1.0.0/tests/conftest.py +110 -0
  72. eee_project-1.0.0/tests/integration/__init__.py +0 -0
  73. eee_project-1.0.0/tests/integration/test_backend_comparison.py +158 -0
  74. eee_project-1.0.0/tests/integration/test_default_equals_named.py +126 -0
  75. eee_project-1.0.0/tests/integration/test_unimorph_live.py +213 -0
  76. eee_project-1.0.0/tests/test_ancient_greek_backend.py +44 -0
  77. eee_project-1.0.0/tests/test_backend_selection.py +114 -0
  78. eee_project-1.0.0/tests/test_chain.py +301 -0
  79. eee_project-1.0.0/tests/test_exceptions.py +37 -0
  80. eee_project-1.0.0/tests/test_fallback_routing.py +67 -0
  81. eee_project-1.0.0/tests/test_get_tags_backends.py +192 -0
  82. eee_project-1.0.0/tests/test_greek_utils.py +385 -0
  83. eee_project-1.0.0/tests/test_inflect_chain.py +132 -0
  84. eee_project-1.0.0/tests/test_integration.py +15 -0
  85. eee_project-1.0.0/tests/test_language_manifest.py +37 -0
  86. eee_project-1.0.0/tests/test_mg_features.py +200 -0
  87. eee_project-1.0.0/tests/test_modern_greek_backend.py +158 -0
  88. eee_project-1.0.0/tests/test_notebook_utils.py +6459 -0
  89. eee_project-1.0.0/tests/test_package_setup.py +2 -0
  90. eee_project-1.0.0/tests/test_protocol_compliance.py +92 -0
  91. eee_project-1.0.0/tests/test_public_api.py +109 -0
  92. eee_project-1.0.0/tests/test_registry.py +236 -0
  93. eee_project-1.0.0/tests/test_registry_chain.py +57 -0
  94. eee_project-1.0.0/tests/test_results.py +86 -0
  95. eee_project-1.0.0/tests/test_slot_templates.py +253 -0
  96. eee_project-1.0.0/tests/test_traced.py +255 -0
  97. eee_project-1.0.0/tests/test_ud_to_unimorph_tag.py +187 -0
  98. eee_project-1.0.0/tests/test_unimorph_backend.py +125 -0
  99. eee_project-1.0.0/uv.lock +1204 -0
@@ -0,0 +1,18 @@
1
+ on: [push, pull_request]
2
+
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - name: Clone backend packages
9
+ run: |
10
+ git clone https://codeberg.org/EEE-project/modern-greek-backend-eee.git ../modern-greek-backend-eee
11
+ git clone https://codeberg.org/EEE-project/unimorph-backend-eee.git ../unimorph-backend-eee
12
+ git clone https://codeberg.org/EEE-project/ancient-greek-backend-eee.git ../ancient-greek-backend-eee
13
+ - uses: actions/setup-python@v5
14
+ with:
15
+ python-version: "3.12"
16
+ - run: pip install uv
17
+ - run: uv sync --group dev
18
+ - run: uv run pytest -m "not integration"
@@ -0,0 +1,17 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ publish:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ id-token: write # required for PyPI Trusted Publishing (OIDC)
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: astral-sh/setup-uv@v3
14
+ - name: Build package
15
+ run: uv build
16
+ - name: Publish to PyPI
17
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,13 @@
1
+ CLAUDE.md
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ .pytest_cache/
6
+ dist/
7
+ .venv/
8
+ *.egg-info/
9
+ .coverage
10
+ coverage.json
11
+ htmlcov/
12
+ **/__marimo__/
13
+ .codegraph/
@@ -0,0 +1,62 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI coding agents (and humans) changing `eee-project`'s own
4
+ source. For how to *use* the library from a notebook, see
5
+ [docs/api-patterns.md](docs/api-patterns.md) — that file is the primary
6
+ reference for notebook authors and is checked before source, per the parent
7
+ workspace's own CLAUDE.md ("EEE API Reference Workflow").
8
+
9
+ ## Development
10
+
11
+ ```bash
12
+ make test # run all tests (quiet)
13
+ make test-v # run all tests (verbose)
14
+ make check # ruff, curated rule set — see [tool.ruff.lint] in pyproject.toml
15
+ ```
16
+
17
+ ## Before committing a change to `src/eee_project/`
18
+
19
+ 1. **Tests** — a passing suite isn't enough on its own if it was already
20
+ passing before the change; that only proves nothing broke, not that new
21
+ behavior is covered. Add a test that specifically exercises the new/fixed
22
+ code path (a regression would need to fail it). `tests/test_notebook_utils.py`'s
23
+ existing style: one class per function, one test per behavior.
24
+ 2. **`docs/api-patterns.md`** — any new public method or parameter on
25
+ `GreekUtils`/`notebook_utils.py` needs a worked usage example here, not
26
+ just a docstring or a passing mention elsewhere in the file.
27
+ 3. **README changelog** — this is an internal project, not a
28
+ publicly-tracked release feed. Keep each version's changelog entry to a
29
+ short line or a handful of bullets, not a full narrative — `docs/` is the
30
+ source of truth for current capability; the changelog just marks when
31
+ something landed.
32
+ 4. **Version bump** — `pyproject.toml` and `src/eee_project/__init__.py`'s
33
+ `__version__`, kept in sync. Patch for a fix, minor for a new
34
+ capability/backend, major for a breaking change.
35
+ 5. **Lint** — `make check` on changed files.
36
+
37
+ ## Conventions
38
+
39
+ - **Widget creation and conditional display belong in separate cells.** A
40
+ `mo.ui.*` widget recreated inside a cell that also depends on unrelated
41
+ reactive state (e.g. a part-of-speech switcher) resets to its
42
+ construction-time default on every rerun of that cell — confirmed
43
+ empirically. Build the widget in a cell with no dependency on the
44
+ switching state; display it conditionally in a separate cell that only
45
+ *references* the already-built widget object, never reconstructs it. See
46
+ `examples/greek_exercise_notebook.py`'s `article_toggle_ag`/
47
+ `article_toggle_mg` cells for the pattern.
48
+ - **Never call a backend's `.paradigm()` directly, and never key off a
49
+ backend-internal tag name** (e.g. `paradigm(word, pos)["ADV"]`). Always go
50
+ through `get_slot_templates()` + `inflect_slot()` — see the parent
51
+ workspace CLAUDE.md's tagging rule.
52
+ - Test any notebook change with the `marimo-pair` skill against a real
53
+ running kernel before considering it done — reading the `.py` source is
54
+ not equivalent to seeing it actually render and behave correctly.
55
+
56
+ ## Commit messages
57
+
58
+ One commit per version bump (`vX.Y.Z: ...`), squashed from whatever WIP
59
+ happened during development — not one commit per change. Short single-line
60
+ subject, no body, no attribution trailer. Full detail lives in
61
+ `docs/api-patterns.md` and the README changelog line, not the commit
62
+ message itself.
@@ -0,0 +1 @@
1
+ * Oleg Sadov (EEE Project — Ελληνικά Εκπαιδευτικά Εργαλεία)
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or exemplary damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on your own behalf and on your sole responsibility, not on behalf of any other Contributor, and only if you agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright 2026 sadov
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,15 @@
1
+ .PHONY: help test test-v check
2
+
3
+ help:
4
+ @echo "make test / test-v run tests (quiet / verbose)"
5
+ @echo "make check run ruff (curated rule set - see pyproject.toml)"
6
+ @echo "make -C examples help show example and notebook targets"
7
+
8
+ test:
9
+ uv run python -m pytest -q
10
+
11
+ test-v:
12
+ uv run python -m pytest -v
13
+
14
+ check:
15
+ uv run ruff check
@@ -0,0 +1,27 @@
1
+ EEE-project
2
+ Copyright 2026 sadov
3
+
4
+ This product includes data from the UniMorph project
5
+ (https://unimorph.github.io/), used under the Creative Commons
6
+ Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0).
7
+
8
+ src/eee/data/unimorph/ell.tsv — Modern Greek morphological data
9
+ src/eee/data/unimorph/grc.tsv — Ancient Greek morphological data
10
+
11
+ UniMorph datasets are derived from Wiktionary
12
+ (https://www.wiktionary.org/), © Wiktionary contributors,
13
+ licensed under CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/).
14
+
15
+ UniMorph citation:
16
+ Batsuren et al. (2022). UniMorph 4.0: Universal Morphology.
17
+ In Proceedings of LREC 2022.
18
+ https://unimorph.github.io/
19
+
20
+ The Classical Attic lexicon (lsj_verbs_lexicon.yaml / lsj_nouns_lexicon.yaml
21
+ in greek-inflexion-eee) is hand-authored under the MIT License. Its principal
22
+ parts and noun stems were verified against reference sources — Perseus/Morpheus
23
+ (LSJ-derived, https://www.perseus.tufts.edu/) and Wiktionary
24
+ (https://www.wiktionary.org/) — consulted as references only, not bulk-imported.
25
+ Any future bulk-derived Attic data (e.g. an automated Morpheus/Wiktionary → YAML
26
+ conversion) would inherit CC BY-SA 3.0 ShareAlike obligations and must be shipped
27
+ as a separately-licensed file.
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: eee-project
3
+ Version: 1.0.0
4
+ Summary: Language-agnostic morphology umbrella for the EEE project
5
+ Project-URL: Homepage, https://github.com/EEE-project/eee-project
6
+ Project-URL: Repository, https://github.com/EEE-project/eee-project
7
+ Author-email: Oleg Sadov <oleg.sadov@gmail.com>
8
+ License-Expression: Apache-2.0
9
+ License-File: AUTHORS
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Requires-Python: >=3.12
13
+ Requires-Dist: anywidget>=0.9
14
+ Requires-Dist: marimo>=0.23.13
15
+ Requires-Dist: pyyaml>=6
16
+ Requires-Dist: tomlkit>=0.15.0
17
+ Description-Content-Type: text/markdown
18
+
19
+ # eee-project
20
+
21
+ Part of [Ελληνικά Εκπαιδευτικά Εργαλεία (EEE) — Greek Language Educational Tools](https://github.com/EEE-project).
22
+
23
+ Same API for general Modern/Ancient Greek flavours, with the possibility of
24
+ extending language coverage. Language codes follow
25
+ [ISO 639](https://en.wikipedia.org/wiki/ISO_639).
26
+
27
+ 🔓 Open source:
28
+ - prod — https://github.com/EEE-project/eee-project
29
+ - prod mirror — https://gitlab.com/EEE-project/eee-project
30
+ - dev — https://codeberg.org/EEE-project/eee-project
31
+
32
+ 💬 Community: https://telegram.me/eee_greek
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ pip install eee-project
38
+
39
+ # Install the backends you need:
40
+ pip install modern-greek-backend-eee
41
+ pip install unimorph-backend-eee
42
+ pip install ancient-greek-backend-eee
43
+ ```
44
+
45
+ Development version (latest, from Codeberg) — for any of the above, replace
46
+ with: `pip install "<name> @ git+https://codeberg.org/EEE-project/<name>.git"`
47
+
48
+ Requires Python 3.12+.
49
+
50
+ `eee-project` is a pure framework — no backends are bundled. Install the backend packages you need alongside it.
51
+
52
+ ## Development
53
+
54
+ ```bash
55
+ make test # run all tests (quiet)
56
+ make test-v # run all tests (verbose)
57
+ make check # run ruff (curated rule set - see [tool.ruff.lint] in pyproject.toml)
58
+ ```
59
+
60
+ ## Quick Start
61
+
62
+ Backends register themselves via entry points when installed, so `inflect()` finds them automatically:
63
+
64
+ ```python
65
+ import eee_project as eee
66
+
67
+ # Modern Greek (el) — requires modern-greek-backend-eee
68
+ eee.inflect("λύω", {"Tense": "Pres", "Voice": "Act", "Person": "1", "Number": "Sing"}, "verb", language="el") # → {"λύω"}
69
+ eee.inflect("γυναίκα", {"Gender": "Fem", "Number": "Plur", "Case": "Gen"}, "noun", language="el") # → {"γυναικών"}
70
+
71
+ # Ancient Greek (grc) — requires ancient-greek-backend-eee
72
+ eee.inflect("λύω", {"VerbForm": "Fin", "Tense": "Aor", "Voice": "Act", "Mood": "Ind", "Person": "1", "Number": "Sing"}, "verb", language="grc") # → {"ἔλυσα"}
73
+ eee.inflect("θεός", {"Case": "Gen", "Number": "Sing", "Gender": "Masc"}, "noun", language="grc") # → {"θεοῦ"}
74
+ ```
75
+
76
+ `language=` is required unless `backend` names a single-language backend (e.g. `backend="modern-greek"` infers `language="el"`).
77
+
78
+ Feature keys follow [Universal Dependencies FEATS](https://universaldependencies.org/u/feat/index.html).
79
+
80
+ ### Named backends and chains
81
+
82
+ When multiple backends cover the same language, register them by name and
83
+ configure a chain (e.g. try `modern-greek` first, fall back to `unimorph`).
84
+ See [`docs/chains.md`](docs/chains.md) for the full chain API, `stop="all"`
85
+ union mode, and hook extension points.
86
+
87
+ ## Greek diachronic coverage
88
+
89
+ Greek has a continuous documented history of ~3,500 years, with substantial
90
+ morphological and phonological change across periods and dialects.
91
+
92
+ | Variety | Approx. dates | Status |
93
+ |---------|--------------|--------|
94
+ | Mycenaean (Linear B) | ~1490–1200 BCE | Not covered |
95
+ | Arcado-Cypriot | ~1100–300 BCE | Not covered |
96
+ | Homeric/Epic | 800–500 BCE | Covered |
97
+ | Classical Attic | 480–323 BCE | Covered |
98
+ | Koine/Hellenistic | 323 BCE–400 CE | Covered |
99
+ | New Testament Greek | ~50–100 CE | Covered |
100
+ | Byzantine | 400–1453 CE | Partial |
101
+ | Katharevousa | 1830–1976 CE | Partial |
102
+ | Standard Demotic | 1976–present | Covered |
103
+
104
+ The major alphabetic dialects (Attic, Ionic, Doric, Aeolic) share the same
105
+ morphological paradigms and differ mainly in phonology and orthography;
106
+ Ancient Greek support here follows Classical Attic conventions.
107
+
108
+ ```python
109
+ from ancient_greek_backend_eee import AncientGreekBackend
110
+
111
+ # Query the same lemma under different historical periods
112
+ epic = AncientGreekBackend.for_period("epic") # Homer
113
+ attic = AncientGreekBackend.for_period("attic") # Classical Attic
114
+ koine = AncientGreekBackend.for_period("hellenistic_koine", "roman_koine") # Septuagint + NT
115
+
116
+ # Epic verse allows the unaugmented aorist alongside the standard form;
117
+ # Attic and Koine require the augment.
118
+ form = {"VerbForm": "Fin", "Tense": "Aor", "Voice": "Act", "Mood": "Ind", "Person": "1", "Number": "Sing"}
119
+ epic.inflect("λύω", form, "verb") # {'λῦσα', 'ἔλυσα'}
120
+ attic.inflect("λύω", form, "verb") # {'ἔλυσα'}
121
+ koine.inflect("λύω", form, "verb") # {'ἔλυσα'}
122
+ ```
123
+
124
+ See each backend's own README for exact lexicon-level coverage within each period.
125
+
126
+ ## Examples
127
+
128
+ 13 runnable scripts and notebooks in `examples/` — verbs/nouns/adjectives for
129
+ el and grc, UniMorph, named backends, chains, hooks, and interactive Marimo
130
+ viewers. See [docs/examples.md](docs/examples.md) for the full catalog and how
131
+ to run each one.
132
+
133
+ ## API
134
+
135
+ Core functions: `inflect()` and `inflect_traced()` (shown in Quick Start above),
136
+ `list_lemmas()`/`list_lemmas_traced()`, `analyze()`/`analyze_traced()` (reverse
137
+ lookup), `register_backend()`, `set_chain()`, `set_fallback_backend()`,
138
+ `supported_languages()`, `language_info()` — plus a slot-template system for
139
+ building structured inflection tables, and two exception types
140
+ (`UnsupportedLanguageError`, `BackendLoadError`) with chain-aware failure
141
+ handling. Full signatures, the slot-template API, writing a new backend, and
142
+ exception semantics: [docs/api-reference.md](docs/api-reference.md).
143
+
144
+ ## Backends
145
+
146
+ | Language | Code | Package |
147
+ |----------|------|---------|
148
+ | Modern Greek | `el` | [modern-greek-backend-eee](https://github.com/EEE-project/modern-greek-backend-eee) |
149
+ | Ancient Greek | `grc` | [ancient-greek-backend-eee](https://github.com/EEE-project/ancient-greek-backend-eee) |
150
+
151
+ [unimorph-backend-eee](https://github.com/EEE-project/unimorph-backend-eee) adds
152
+ a second, TSV-lookup rung for both Greek languages, plus several other
153
+ languages (Latin, Russian, Spanish, Turkish, and 187 more on demand) — see its
154
+ own README for bundled coverage and how it compares to the dedicated backends
155
+ above.
156
+
157
+ Each backend's own README is the canonical source for its lexicon flavors,
158
+ period/dialect coverage, lemma counts, and known limitations —
159
+ [modern-greek-backend-eee](https://github.com/EEE-project/modern-greek-backend-eee#readme),
160
+ [ancient-greek-backend-eee](https://github.com/EEE-project/ancient-greek-backend-eee#readme),
161
+ [unimorph-backend-eee](https://github.com/EEE-project/unimorph-backend-eee#readme).
@@ -0,0 +1,143 @@
1
+ # eee-project
2
+
3
+ Part of [Ελληνικά Εκπαιδευτικά Εργαλεία (EEE) — Greek Language Educational Tools](https://github.com/EEE-project).
4
+
5
+ Same API for general Modern/Ancient Greek flavours, with the possibility of
6
+ extending language coverage. Language codes follow
7
+ [ISO 639](https://en.wikipedia.org/wiki/ISO_639).
8
+
9
+ 🔓 Open source:
10
+ - prod — https://github.com/EEE-project/eee-project
11
+ - prod mirror — https://gitlab.com/EEE-project/eee-project
12
+ - dev — https://codeberg.org/EEE-project/eee-project
13
+
14
+ 💬 Community: https://telegram.me/eee_greek
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install eee-project
20
+
21
+ # Install the backends you need:
22
+ pip install modern-greek-backend-eee
23
+ pip install unimorph-backend-eee
24
+ pip install ancient-greek-backend-eee
25
+ ```
26
+
27
+ Development version (latest, from Codeberg) — for any of the above, replace
28
+ with: `pip install "<name> @ git+https://codeberg.org/EEE-project/<name>.git"`
29
+
30
+ Requires Python 3.12+.
31
+
32
+ `eee-project` is a pure framework — no backends are bundled. Install the backend packages you need alongside it.
33
+
34
+ ## Development
35
+
36
+ ```bash
37
+ make test # run all tests (quiet)
38
+ make test-v # run all tests (verbose)
39
+ make check # run ruff (curated rule set - see [tool.ruff.lint] in pyproject.toml)
40
+ ```
41
+
42
+ ## Quick Start
43
+
44
+ Backends register themselves via entry points when installed, so `inflect()` finds them automatically:
45
+
46
+ ```python
47
+ import eee_project as eee
48
+
49
+ # Modern Greek (el) — requires modern-greek-backend-eee
50
+ eee.inflect("λύω", {"Tense": "Pres", "Voice": "Act", "Person": "1", "Number": "Sing"}, "verb", language="el") # → {"λύω"}
51
+ eee.inflect("γυναίκα", {"Gender": "Fem", "Number": "Plur", "Case": "Gen"}, "noun", language="el") # → {"γυναικών"}
52
+
53
+ # Ancient Greek (grc) — requires ancient-greek-backend-eee
54
+ eee.inflect("λύω", {"VerbForm": "Fin", "Tense": "Aor", "Voice": "Act", "Mood": "Ind", "Person": "1", "Number": "Sing"}, "verb", language="grc") # → {"ἔλυσα"}
55
+ eee.inflect("θεός", {"Case": "Gen", "Number": "Sing", "Gender": "Masc"}, "noun", language="grc") # → {"θεοῦ"}
56
+ ```
57
+
58
+ `language=` is required unless `backend` names a single-language backend (e.g. `backend="modern-greek"` infers `language="el"`).
59
+
60
+ Feature keys follow [Universal Dependencies FEATS](https://universaldependencies.org/u/feat/index.html).
61
+
62
+ ### Named backends and chains
63
+
64
+ When multiple backends cover the same language, register them by name and
65
+ configure a chain (e.g. try `modern-greek` first, fall back to `unimorph`).
66
+ See [`docs/chains.md`](docs/chains.md) for the full chain API, `stop="all"`
67
+ union mode, and hook extension points.
68
+
69
+ ## Greek diachronic coverage
70
+
71
+ Greek has a continuous documented history of ~3,500 years, with substantial
72
+ morphological and phonological change across periods and dialects.
73
+
74
+ | Variety | Approx. dates | Status |
75
+ |---------|--------------|--------|
76
+ | Mycenaean (Linear B) | ~1490–1200 BCE | Not covered |
77
+ | Arcado-Cypriot | ~1100–300 BCE | Not covered |
78
+ | Homeric/Epic | 800–500 BCE | Covered |
79
+ | Classical Attic | 480–323 BCE | Covered |
80
+ | Koine/Hellenistic | 323 BCE–400 CE | Covered |
81
+ | New Testament Greek | ~50–100 CE | Covered |
82
+ | Byzantine | 400–1453 CE | Partial |
83
+ | Katharevousa | 1830–1976 CE | Partial |
84
+ | Standard Demotic | 1976–present | Covered |
85
+
86
+ The major alphabetic dialects (Attic, Ionic, Doric, Aeolic) share the same
87
+ morphological paradigms and differ mainly in phonology and orthography;
88
+ Ancient Greek support here follows Classical Attic conventions.
89
+
90
+ ```python
91
+ from ancient_greek_backend_eee import AncientGreekBackend
92
+
93
+ # Query the same lemma under different historical periods
94
+ epic = AncientGreekBackend.for_period("epic") # Homer
95
+ attic = AncientGreekBackend.for_period("attic") # Classical Attic
96
+ koine = AncientGreekBackend.for_period("hellenistic_koine", "roman_koine") # Septuagint + NT
97
+
98
+ # Epic verse allows the unaugmented aorist alongside the standard form;
99
+ # Attic and Koine require the augment.
100
+ form = {"VerbForm": "Fin", "Tense": "Aor", "Voice": "Act", "Mood": "Ind", "Person": "1", "Number": "Sing"}
101
+ epic.inflect("λύω", form, "verb") # {'λῦσα', 'ἔλυσα'}
102
+ attic.inflect("λύω", form, "verb") # {'ἔλυσα'}
103
+ koine.inflect("λύω", form, "verb") # {'ἔλυσα'}
104
+ ```
105
+
106
+ See each backend's own README for exact lexicon-level coverage within each period.
107
+
108
+ ## Examples
109
+
110
+ 13 runnable scripts and notebooks in `examples/` — verbs/nouns/adjectives for
111
+ el and grc, UniMorph, named backends, chains, hooks, and interactive Marimo
112
+ viewers. See [docs/examples.md](docs/examples.md) for the full catalog and how
113
+ to run each one.
114
+
115
+ ## API
116
+
117
+ Core functions: `inflect()` and `inflect_traced()` (shown in Quick Start above),
118
+ `list_lemmas()`/`list_lemmas_traced()`, `analyze()`/`analyze_traced()` (reverse
119
+ lookup), `register_backend()`, `set_chain()`, `set_fallback_backend()`,
120
+ `supported_languages()`, `language_info()` — plus a slot-template system for
121
+ building structured inflection tables, and two exception types
122
+ (`UnsupportedLanguageError`, `BackendLoadError`) with chain-aware failure
123
+ handling. Full signatures, the slot-template API, writing a new backend, and
124
+ exception semantics: [docs/api-reference.md](docs/api-reference.md).
125
+
126
+ ## Backends
127
+
128
+ | Language | Code | Package |
129
+ |----------|------|---------|
130
+ | Modern Greek | `el` | [modern-greek-backend-eee](https://github.com/EEE-project/modern-greek-backend-eee) |
131
+ | Ancient Greek | `grc` | [ancient-greek-backend-eee](https://github.com/EEE-project/ancient-greek-backend-eee) |
132
+
133
+ [unimorph-backend-eee](https://github.com/EEE-project/unimorph-backend-eee) adds
134
+ a second, TSV-lookup rung for both Greek languages, plus several other
135
+ languages (Latin, Russian, Spanish, Turkish, and 187 more on demand) — see its
136
+ own README for bundled coverage and how it compares to the dedicated backends
137
+ above.
138
+
139
+ Each backend's own README is the canonical source for its lexicon flavors,
140
+ period/dialect coverage, lemma counts, and known limitations —
141
+ [modern-greek-backend-eee](https://github.com/EEE-project/modern-greek-backend-eee#readme),
142
+ [ancient-greek-backend-eee](https://github.com/EEE-project/ancient-greek-backend-eee#readme),
143
+ [unimorph-backend-eee](https://github.com/EEE-project/unimorph-backend-eee#readme).