nl_processing
Dutch language processing toolkit organized as a multi-package Python repository.
Install
pip install nl_processing
The published nl_processing package is the aggregate build from the repo root. Day-to-day development happens inside the package folders under packages/.
Repository Layout
packages/
core/
extract_text_from_image/
extract_words_from_text/
translate_text/
translate_word/
database/
database_cache/
sampling/
docs/
pyproject.toml # aggregate build for the published nl_processing package
Makefile # repo-wide lint/test entrypoint
Each package has its own:
pyproject.tomlruff.tomlpytest.initests/docs/
Modules
| Module | Class | Description | Docs |
|---|---|---|---|
core |
N/A | Shared models, ports, exceptions, and prompt helpers | docs |
extract_text_from_image |
ImageTextExtractor |
Extract Dutch text from images via Vision API | docs |
extract_words_from_text |
WordExtractor |
Extract and normalize words from markdown text | docs |
translate_text |
TextTranslator |
Translate text (NL -> RU) with markdown preservation | docs |
translate_word |
WordTranslator |
Batch-translate words (NL -> RU) | docs |
database |
DatabaseService |
Remote source of truth and default progress/sync provider | docs |
database_cache |
DatabaseCacheService |
Local-first SQLite cache with injectable remote progress sync | docs |
sampling |
WordSampler |
Weighted word sampling over any compatible scored-pair provider | docs |
Development
Work inside one package when you only touch one module:
cd packages/translate_word
uv sync --all-groups
uv run pytest tests/unit
Run the repo-wide quality gate from the root:
make check
Useful package-local examples:
cd packages/core
uv run pytest tests/unit/core
cd packages/database
doppler run -- uv run pytest tests/integration/database
Dependency Rule
Modules are independent packages. Cross-module dependencies must be explicit in the consuming package's pyproject.toml.
Shared cross-module storage contracts live in nl_processing.core.ports. database and database_cache are concrete implementations and adapters, not the owners of those shared interfaces.
One intentional design change in this layout: database no longer imports translate_word directly. If you want automatic translation on add_words(), compose it explicitly:
from nl_processing.core.models import Language
from nl_processing.database.service import DatabaseService
from nl_processing.translate_word.service import WordTranslator
db = DatabaseService(
user_id="alex",
translator=WordTranslator(
source_language=Language.NL,
target_language=Language.RU,
),
)
Docs
- Repository module spec: docs/module-spec.md
- Environment variables: docs/ENV_VARS.md
- Release workflow: docs/REALEASE_WORKFLOW.md
Release files for nl-processing 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nl_processing-1.0.4.tar.gz | 7.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nl_processing-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 MB
Release files / nl_processing-1.0.4.tar.gz
| Download URL | nl_processing-1.0.4.tar.gz |
|---|---|
| Size | 7.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f13b12da180fe06a1443eabca47805c4927716eae716e47327ad4f59aa07469
|
|
BLAKE2b-256 checksum How to use checksums |
f3e3600b650fbaad2440c459a6d4e41f1b79ba05df56edf51c6c59955bfce0c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / nl_processing-1.0.4-py3-none-any.whl
| Download URL | nl_processing-1.0.4-py3-none-any.whl |
|---|---|
| Size | 7.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47f57f24617f091edc689245dbe40c124cdc11a3f1d447a67e738807df1234a7
|
|
BLAKE2b-256 checksum How to use checksums |
5bda2c5b2f31b5be6b51b5ad882eff96d42d005169d579e04dd49125f9419ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|