wyrdcraeft 0.1.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.
- wyrdcraeft-0.1.0/AGENTS.md +34 -0
- wyrdcraeft-0.1.0/AUTHORS.txt +8 -0
- wyrdcraeft-0.1.0/CODE_OF_CONDUCT.md +83 -0
- wyrdcraeft-0.1.0/LICENSE.txt +9 -0
- wyrdcraeft-0.1.0/MANIFEST.in +8 -0
- wyrdcraeft-0.1.0/Makefile +31 -0
- wyrdcraeft-0.1.0/PKG-INFO +39 -0
- wyrdcraeft-0.1.0/README.md +1 -0
- wyrdcraeft-0.1.0/THIRD_PARTY_NOTICES.md +14 -0
- wyrdcraeft-0.1.0/data/tools/build_macron_index.py +31 -0
- wyrdcraeft-0.1.0/data/tools/refresh_goldens.py +66 -0
- wyrdcraeft-0.1.0/doc/source/__init__.py +0 -0
- wyrdcraeft-0.1.0/doc/source/conf.py +97 -0
- wyrdcraeft-0.1.0/genesis_a_b.txt +2938 -0
- wyrdcraeft-0.1.0/pyproject.toml +233 -0
- wyrdcraeft-0.1.0/setup.cfg +4 -0
- wyrdcraeft-0.1.0/tests/__init__.py +0 -0
- wyrdcraeft-0.1.0/tests/conftest.py +92 -0
- wyrdcraeft-0.1.0/tests/python_reference/__init__.py +1 -0
- wyrdcraeft-0.1.0/tests/python_reference/conftest.py +106 -0
- wyrdcraeft-0.1.0/tests/python_reference/snapshot_io.py +178 -0
- wyrdcraeft-0.1.0/tests/python_reference/test_form_generation_reference.py +70 -0
- wyrdcraeft-0.1.0/tests/python_reference/test_full_flow_reference.py +92 -0
- wyrdcraeft-0.1.0/tests/python_reference/test_paradigm_reference.py +46 -0
- wyrdcraeft-0.1.0/tests/python_reference/test_preprocess_reference.py +38 -0
- wyrdcraeft-0.1.0/tests/python_reference/test_text_utils_reference.py +137 -0
- wyrdcraeft-0.1.0/tests/test_bosworthtoller.py +202 -0
- wyrdcraeft-0.1.0/tests/test_cli_commands.py +120 -0
- wyrdcraeft-0.1.0/tests/test_cli_convert.py +86 -0
- wyrdcraeft-0.1.0/tests/test_cli_diacritic_disambiguate.py +867 -0
- wyrdcraeft-0.1.0/tests/test_cli_mark_diacritics.py +56 -0
- wyrdcraeft-0.1.0/tests/test_cli_morphology.py +90 -0
- wyrdcraeft-0.1.0/tests/test_cli_utils.py +151 -0
- wyrdcraeft-0.1.0/tests/test_configuration.py +241 -0
- wyrdcraeft-0.1.0/tests/test_deterministic_regression.py +53 -0
- wyrdcraeft-0.1.0/tests/test_exporters.py +95 -0
- wyrdcraeft-0.1.0/tests/test_extractors.py +113 -0
- wyrdcraeft-0.1.0/tests/test_golden_regression.py +114 -0
- wyrdcraeft-0.1.0/tests/test_llm.py +32 -0
- wyrdcraeft-0.1.0/tests/test_loaders.py +102 -0
- wyrdcraeft-0.1.0/tests/test_macron_index_builder.py +40 -0
- wyrdcraeft-0.1.0/tests/test_main.py +34 -0
- wyrdcraeft-0.1.0/tests/test_markup.py +167 -0
- wyrdcraeft-0.1.0/tests/test_pipeline_classes.py +146 -0
- wyrdcraeft-0.1.0/tests/test_pipeline_llm.py +177 -0
- wyrdcraeft-0.1.0/tests/test_preparse_speaker_mixed.py +39 -0
- wyrdcraeft-0.1.0/tests/test_prompt_regression.py +65 -0
- wyrdcraeft-0.1.0/tests/test_settings_llm.py +77 -0
- wyrdcraeft-0.1.0/tests/test_tei_bridge.py +86 -0
- wyrdcraeft-0.1.0/wyrdcraeft/__init__.py +13 -0
- wyrdcraeft-0.1.0/wyrdcraeft/cli/__init__.py +5 -0
- wyrdcraeft-0.1.0/wyrdcraeft/cli/cli.py +1134 -0
- wyrdcraeft-0.1.0/wyrdcraeft/cli/morphology.py +276 -0
- wyrdcraeft-0.1.0/wyrdcraeft/cli/utils.py +78 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/diacritic/c_palatalization_force_non_palatalize.txt +2 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/diacritic/c_palatalization_force_palatalize.txt +4 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/diacritic/g/frontal.txt +23 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/diacritic/oe_bt_macron_index.json +45323 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/morphology/dict_adj-vb-part-num-adv-noun.txt +35490 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/morphology/manual_forms.txt +4524 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/morphology/para_vb.txt +1196 -0
- wyrdcraeft-0.1.0/wyrdcraeft/etc/morphology/prefixes.txt +65 -0
- wyrdcraeft-0.1.0/wyrdcraeft/exc.py +13 -0
- wyrdcraeft-0.1.0/wyrdcraeft/ingest/__init__.py +3 -0
- wyrdcraeft-0.1.0/wyrdcraeft/ingest/exporters.py +251 -0
- wyrdcraeft-0.1.0/wyrdcraeft/ingest/extractors.py +190 -0
- wyrdcraeft-0.1.0/wyrdcraeft/ingest/loaders.py +475 -0
- wyrdcraeft-0.1.0/wyrdcraeft/ingest/normalizers.py +296 -0
- wyrdcraeft-0.1.0/wyrdcraeft/ingest/pipeline.py +1177 -0
- wyrdcraeft-0.1.0/wyrdcraeft/main.py +9 -0
- wyrdcraeft-0.1.0/wyrdcraeft/models/__init__.py +43 -0
- wyrdcraeft-0.1.0/wyrdcraeft/models/diacritics.py +148 -0
- wyrdcraeft-0.1.0/wyrdcraeft/models/llm.py +62 -0
- wyrdcraeft-0.1.0/wyrdcraeft/models/parsing.py +78 -0
- wyrdcraeft-0.1.0/wyrdcraeft/models/source_text.py +216 -0
- wyrdcraeft-0.1.0/wyrdcraeft/py.typed +0 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/__init__.py +0 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/bosworthtoller.py +336 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/markup.py +734 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/__init__.py +5 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/generators/__init__.py +0 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/generators/adj_forms.py +1147 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/generators/common.py +2546 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/generators/noun_forms.py +1343 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/generators/num_forms.py +273 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/loaders.py +204 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/models.py +218 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/processors.py +690 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/reference_snapshots.py +333 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/session.py +114 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/morphology/text_utils.py +315 -0
- wyrdcraeft-0.1.0/wyrdcraeft/services/syllable.py +195 -0
- wyrdcraeft-0.1.0/wyrdcraeft/settings.py +267 -0
- wyrdcraeft-0.1.0/wyrdcraeft/types.py +0 -0
- wyrdcraeft-0.1.0/wyrdcraeft.egg-info/PKG-INFO +39 -0
- wyrdcraeft-0.1.0/wyrdcraeft.egg-info/SOURCES.txt +98 -0
- wyrdcraeft-0.1.0/wyrdcraeft.egg-info/dependency_links.txt +1 -0
- wyrdcraeft-0.1.0/wyrdcraeft.egg-info/entry_points.txt +2 -0
- wyrdcraeft-0.1.0/wyrdcraeft.egg-info/requires.txt +14 -0
- wyrdcraeft-0.1.0/wyrdcraeft.egg-info/top_level.txt +6 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Local Overrides
|
|
4
|
+
|
|
5
|
+
This repository inherits shared defaults from:
|
|
6
|
+
- `../AGENTS.md` (workspace-root shared instructions)
|
|
7
|
+
|
|
8
|
+
## Repository Bootstrap Requirements
|
|
9
|
+
|
|
10
|
+
These requirements apply at the start of every new session in this repository.
|
|
11
|
+
|
|
12
|
+
1. Read `../AGENTS.md` before planning or implementation.
|
|
13
|
+
2. Treat the shared file as mandatory for this repository, not optional guidance.
|
|
14
|
+
3. Confirm in an early progress update that the shared file was read.
|
|
15
|
+
|
|
16
|
+
## Tooling Preflight Evidence (Required)
|
|
17
|
+
|
|
18
|
+
Before planning or implementation, every agent must provide concise evidence of:
|
|
19
|
+
|
|
20
|
+
1. `memory_search` for relevant prior context.
|
|
21
|
+
2. At least one `aidex` call (`aidex_session` plus a query/signature/tree/files/status call as useful).
|
|
22
|
+
3. At least one `code-index` call (search/find/symbol/summary as useful).
|
|
23
|
+
4. `context7` and/or `package-registry-mcp` when external library/package behavior, versioning, or package details are relevant.
|
|
24
|
+
|
|
25
|
+
In an early progress update, include the tool names used and one line on what each returned.
|
|
26
|
+
If a tool is not relevant for the task, state that explicitly in one line.
|
|
27
|
+
|
|
28
|
+
## Post-Implementation Quality Gate (Required)
|
|
29
|
+
|
|
30
|
+
After implementation edits are complete:
|
|
31
|
+
|
|
32
|
+
1. Run `ruff` on the touched files (or broader target if the task requires it).
|
|
33
|
+
2. Run `mypy` on the touched files (or broader target if the task requires it).
|
|
34
|
+
3. Fix all problems reported by those runs before finishing the task.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Contributor Covenant 3.0
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make our community welcoming, safe, and equitable for all.
|
|
6
|
+
|
|
7
|
+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
|
|
8
|
+
|
|
9
|
+
## Encouraged Behaviors
|
|
10
|
+
|
|
11
|
+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
|
|
12
|
+
|
|
13
|
+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
|
|
14
|
+
|
|
15
|
+
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
|
|
16
|
+
2. Engaging **kindly and honestly** with others.
|
|
17
|
+
3. Respecting **different viewpoints** and experiences.
|
|
18
|
+
4. **Taking responsibility** for our actions and contributions.
|
|
19
|
+
5. Gracefully giving and accepting **constructive feedback**.
|
|
20
|
+
6. Committing to **repairing harm** when it occurs.
|
|
21
|
+
7. Behaving in other ways that promote and sustain the **well-being of our community**.
|
|
22
|
+
|
|
23
|
+
## Restricted Behaviors
|
|
24
|
+
|
|
25
|
+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
|
|
26
|
+
|
|
27
|
+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
|
|
28
|
+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
|
|
29
|
+
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
|
|
30
|
+
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
|
|
31
|
+
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
|
|
32
|
+
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
|
|
33
|
+
7. Behaving in other ways that **threaten the well-being** of our community.
|
|
34
|
+
|
|
35
|
+
### Other Restrictions
|
|
36
|
+
|
|
37
|
+
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
|
|
38
|
+
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
|
|
39
|
+
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
|
|
40
|
+
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
|
|
41
|
+
|
|
42
|
+
## Reporting an Issue
|
|
43
|
+
|
|
44
|
+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
|
|
45
|
+
|
|
46
|
+
When an incident does occur, it is important to report it promptly. To report a possible violation, email hello at feldroy dot com.
|
|
47
|
+
|
|
48
|
+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
|
|
49
|
+
|
|
50
|
+
## Addressing and Repairing Harm
|
|
51
|
+
|
|
52
|
+
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
|
|
53
|
+
|
|
54
|
+
1) Warning
|
|
55
|
+
1) Event: A violation involving a single incident or series of incidents.
|
|
56
|
+
2) Consequence: A private, written warning from the Community Moderators.
|
|
57
|
+
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
|
|
58
|
+
2) Temporarily Limited Activities
|
|
59
|
+
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
|
|
60
|
+
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
|
|
61
|
+
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
|
|
62
|
+
3) Temporary Suspension
|
|
63
|
+
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
|
|
64
|
+
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
|
|
65
|
+
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
|
|
66
|
+
4) Permanent Ban
|
|
67
|
+
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
|
|
68
|
+
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
|
|
69
|
+
3) Repair: There is no possible repair in cases of this severity.
|
|
70
|
+
|
|
71
|
+
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
|
|
72
|
+
|
|
73
|
+
## Scope
|
|
74
|
+
|
|
75
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
76
|
+
|
|
77
|
+
## Attribution
|
|
78
|
+
|
|
79
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
|
|
80
|
+
|
|
81
|
+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
|
|
82
|
+
|
|
83
|
+
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Chris Malek <cmalek@placodermi.org>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
VERSION = 0.1.0
|
|
2
|
+
|
|
3
|
+
PACKAGE = wyrdcraeft
|
|
4
|
+
|
|
5
|
+
#======================================================================
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
clean:
|
|
9
|
+
rm -rf *.tar.gz *.egg-info
|
|
10
|
+
find . -path './.venv' -prune -o -name "__pycache__" -exec rm -rf '{}' ';'
|
|
11
|
+
rm -rf .pytest_cache
|
|
12
|
+
rm -rf build
|
|
13
|
+
rm -rf dist
|
|
14
|
+
|
|
15
|
+
dist: clean
|
|
16
|
+
@uv build --sdist --wheel
|
|
17
|
+
|
|
18
|
+
compile:
|
|
19
|
+
@uv pip compile --group=docs pyproject.toml -o requirements.txt
|
|
20
|
+
|
|
21
|
+
release:
|
|
22
|
+
@bin/release.sh
|
|
23
|
+
|
|
24
|
+
docs:
|
|
25
|
+
@echo "Generating docs..."
|
|
26
|
+
@cd doc && rm -rf build && make html
|
|
27
|
+
@open doc/build/html/index.html
|
|
28
|
+
|
|
29
|
+
.PHONY: docs release compile dist clean list
|
|
30
|
+
list:
|
|
31
|
+
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wyrdcraeft
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A tool that processes Old English texts and provides a toolkit for working with the text.
|
|
5
|
+
Author-email: Chris Malek <cmalek@placodermi.org>
|
|
6
|
+
Maintainer-email: Chris Malek <cmalek@placodermi.org>
|
|
7
|
+
Project-URL: Respository, https://github.com/cmalek/oe_json_extractor
|
|
8
|
+
Project-URL: Documentation, https://oe_json_extractor.readthedocs.io
|
|
9
|
+
Project-URL: Issues, https://github.com/cmalek/oe_json_extractor/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: <3.14,>=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE.txt
|
|
22
|
+
License-File: AUTHORS.txt
|
|
23
|
+
Requires-Dist: click>=8.1.7
|
|
24
|
+
Requires-Dist: rich>=13.8.1
|
|
25
|
+
Requires-Dist: pydantic>=2.10.6
|
|
26
|
+
Requires-Dist: pydantic-settings>=2.5.2
|
|
27
|
+
Requires-Dist: build>=1.2.2.post1
|
|
28
|
+
Requires-Dist: unstructured[all-docs]>=0.15
|
|
29
|
+
Requires-Dist: langextract>=0.0.0
|
|
30
|
+
Requires-Dist: any-llm-sdk[gemini,ollama,openai]
|
|
31
|
+
Requires-Dist: httpx>=0.28.1
|
|
32
|
+
Requires-Dist: delb>=0.5.1
|
|
33
|
+
Requires-Dist: acdh-tei-pyutils>=1.6
|
|
34
|
+
Requires-Dist: beautifulsoup4>=4.14.3
|
|
35
|
+
Requires-Dist: pdfminer-six>=20260107
|
|
36
|
+
Requires-Dist: wheel>=0.46.3
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# wyrdcraeft
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# wyrdcraeft
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This morphology generator is based on the work of Ondřej Tichý's thesis,
|
|
4
|
+
Morphological Analyser of Old English (2017)
|
|
5
|
+
https://www.researchgate.net/publication/318926182_Morphological_analyser_of_old_english.
|
|
6
|
+
|
|
7
|
+
The upstream morphological generator Perl code and data is (c) Ondřej Tichý,
|
|
8
|
+
is released under the CC BY 4.0 license.
|
|
9
|
+
|
|
10
|
+
Changes made to in this repository by Christopher Malek are released under the
|
|
11
|
+
MIT license.
|
|
12
|
+
|
|
13
|
+
All other code implemented directly by Christopher Malek, also released under
|
|
14
|
+
the MIT license.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Build a precomputed Bosworth-Toller macron lookup index.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
from wyrdcraeft.services.markup import MacronApplicator
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main() -> None:
|
|
14
|
+
"""
|
|
15
|
+
Build ``wyrdcraeft/etc/diacritic/oe_bt_macron_index.json`` from ``data/oe_bt.txt``.
|
|
16
|
+
"""
|
|
17
|
+
project_root = Path(__file__).resolve().parents[2]
|
|
18
|
+
source_path = project_root / "data" / "oe_bt.txt"
|
|
19
|
+
output_path = (
|
|
20
|
+
project_root / "wyrdcraeft" / "etc" / "diacritic" / "oe_bt_macron_index.json"
|
|
21
|
+
)
|
|
22
|
+
index = MacronApplicator.build_index_from_bt(source_path, output_path)
|
|
23
|
+
print(
|
|
24
|
+
"Wrote "
|
|
25
|
+
f"{output_path} (unique={len(index.unique)}, "
|
|
26
|
+
f"ambiguous={len(index.ambiguous)})"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
if __name__ == "__main__":
|
|
31
|
+
main()
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from wyrdcraeft.ingest.extractors.langextract_runner import (
|
|
8
|
+
AnyLLMConfig,
|
|
9
|
+
run_anyllm_to_canonical,
|
|
10
|
+
)
|
|
11
|
+
from wyrdcraeft.models import AnyLLMConfig
|
|
12
|
+
|
|
13
|
+
from wyrdcraeft.models import TextMetadata
|
|
14
|
+
|
|
15
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
16
|
+
FIX = ROOT / "tests" / "fixtures"
|
|
17
|
+
PROMPTS = ROOT / "oe_ingest" / "prompts"
|
|
18
|
+
|
|
19
|
+
CASES = [
|
|
20
|
+
(
|
|
21
|
+
"fixture_prose.txt",
|
|
22
|
+
"expected_prose.json",
|
|
23
|
+
"qwen_extract_prose_v1.md",
|
|
24
|
+
"Fixture Prose",
|
|
25
|
+
),
|
|
26
|
+
(
|
|
27
|
+
"fixture_verse.txt",
|
|
28
|
+
"expected_verse.json",
|
|
29
|
+
"qwen_extract_verse_v1.md",
|
|
30
|
+
"Fixture Verse",
|
|
31
|
+
),
|
|
32
|
+
(
|
|
33
|
+
"fixture_dialogue.txt",
|
|
34
|
+
"expected_dialogue.json",
|
|
35
|
+
"qwen_extract_verse_v1.md",
|
|
36
|
+
"Fixture Dialogue",
|
|
37
|
+
),
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def main() -> None:
|
|
42
|
+
cfg = AnyLLMConfig(
|
|
43
|
+
provider=os.environ.get("ANYLLM_PROVIDER", "ollama"),
|
|
44
|
+
model_id=os.environ.get("ANYLLM_MODEL", "qwen2.5:14b-instruct"),
|
|
45
|
+
temperature=float(os.environ.get("ANYLLM_TEMPERATURE", "0.0")),
|
|
46
|
+
)
|
|
47
|
+
for txt, out, prompt, title in CASES:
|
|
48
|
+
doc = run_anyllm_to_canonical(
|
|
49
|
+
text=(FIX / txt).read_text(encoding="utf-8").strip(),
|
|
50
|
+
metadata=TextMetadata(title=title, source="tests/fixtures"),
|
|
51
|
+
prompt_path=(PROMPTS / prompt),
|
|
52
|
+
config=cfg,
|
|
53
|
+
)
|
|
54
|
+
(FIX / out).write_text(
|
|
55
|
+
json.dumps(
|
|
56
|
+
doc.model_dump(mode="json", exclude_none=False),
|
|
57
|
+
ensure_ascii=False,
|
|
58
|
+
indent=2,
|
|
59
|
+
),
|
|
60
|
+
encoding="utf-8",
|
|
61
|
+
)
|
|
62
|
+
print("Wrote", out)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
main()
|
|
File without changes
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import sys
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Any
|
|
18
|
+
|
|
19
|
+
import sphinx_rtd_theme # noqa: F401
|
|
20
|
+
|
|
21
|
+
# -- Path setup --------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
24
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
25
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
26
|
+
|
|
27
|
+
sys.path.insert(0, str(Path(__file__).parent.parent.parent.absolute()))
|
|
28
|
+
|
|
29
|
+
# -- Project information -----------------------------------------------------
|
|
30
|
+
|
|
31
|
+
# the master toctree document
|
|
32
|
+
master_doc = "index"
|
|
33
|
+
|
|
34
|
+
project = "wyrdcraeft"
|
|
35
|
+
copyright = "Chris Malek" # noqa: A001
|
|
36
|
+
author = "Chris Malek"
|
|
37
|
+
|
|
38
|
+
# The full version, including alpha/beta/rc tags
|
|
39
|
+
release = "0.1.0"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# -- General configuration ---------------------------------------------------
|
|
43
|
+
|
|
44
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
45
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
46
|
+
# ones.
|
|
47
|
+
extensions = [
|
|
48
|
+
"sphinx.ext.autodoc",
|
|
49
|
+
"sphinx.ext.napoleon",
|
|
50
|
+
"sphinxcontrib.images",
|
|
51
|
+
"sphinx.ext.intersphinx",
|
|
52
|
+
"sphinx_rtd_theme",
|
|
53
|
+
"sphinx.ext.viewcode",
|
|
54
|
+
"autodoc_pydantic",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
source_suffix: str = ".rst"
|
|
58
|
+
|
|
59
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
60
|
+
templates_path: list[str] = ["_templates"]
|
|
61
|
+
|
|
62
|
+
autodoc_member_order: str = "groupwise"
|
|
63
|
+
|
|
64
|
+
# Make Sphinx not expand all our Type Aliases
|
|
65
|
+
autodoc_type_aliases: dict[str, str] = {}
|
|
66
|
+
|
|
67
|
+
# List of patterns, relative to source directory, that match files and
|
|
68
|
+
# directories to ignore when looking for source files.
|
|
69
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
70
|
+
exclude_patterns: list[str] = ["_build"]
|
|
71
|
+
|
|
72
|
+
# the locations and names of other projects that should be linked to this one
|
|
73
|
+
intersphinx_mapping: dict[str, tuple[str, str | None]] = {
|
|
74
|
+
"python": ("https://docs.python.org/3", None),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
# -- Options for HTML output -------------------------------------------------
|
|
78
|
+
|
|
79
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
80
|
+
# a list of builtin themes.
|
|
81
|
+
#
|
|
82
|
+
html_theme: str = "sphinx_rtd_theme"
|
|
83
|
+
|
|
84
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
85
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
86
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
87
|
+
# html_static_path = ['_static'] # noqa: ERA001
|
|
88
|
+
|
|
89
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
90
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
91
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
92
|
+
# html_static_path = ['_static'] # noqa: ERA001
|
|
93
|
+
|
|
94
|
+
html_show_sourcelink: bool = False
|
|
95
|
+
html_show_sphinx: bool = False
|
|
96
|
+
html_show_copyright: bool = True
|
|
97
|
+
html_theme_options: dict[str, Any] = {"collapse_navigation": False}
|