Skip to main content

Aggregate build for the nl_processing multi-package repository

Project description

nl_processing

PyPI

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.toml
  • ruff.toml
  • pytest.ini
  • tests/
  • docs/

Modules

Module Class Description Docs
core N/A Shared models, exceptions, 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 persistence for words, translations, and exercise scores docs
database_cache DatabaseCacheService Local-first SQLite cache over the remote database module docs
sampling WordSampler Weighted word sampling with adversarial distractors 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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nl_processing-1.0.1.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nl_processing-1.0.1-py3-none-any.whl (2.6 MB view details)

Uploaded Python 3

File details

Details for the file nl_processing-1.0.1.tar.gz.

File metadata

  • Download URL: nl_processing-1.0.1.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nl_processing-1.0.1.tar.gz
Algorithm Hash digest
SHA256 68db38ccbcad346c87423dac67f0b5a18d2478af7da7d46af06ba91c443756dc
MD5 7a832cf5209ed61078c0c1761c21592b
BLAKE2b-256 943eba4bd8fa00b81d68ecbb4e3ab74e6e6246b07add4176e7ab0c03b4b14090

See more details on using hashes here.

File details

Details for the file nl_processing-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: nl_processing-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for nl_processing-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0333c73f55f3f8cfd44a906b24e2ba50ba4b6000e1b664866963ec8875e26e
MD5 d5424bbad21c48a6156ef1775cba9f79
BLAKE2b-256 639f3818723834a8a062a91ebb2cc850d8632a688a3004677f498bb5f5dec9d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page