Skip to main content

Python library for normalising Nufi (Fe'éfě'e) text: converts Bana orthography to Komako standard, strips low-tone diacritics, and repairs common encoding issues

Project description

nuficlean

Python library for normalising Nufi (Babanki-Tungo / Nʉ Fì) text: converts Bana orthography to Komako standard, strips low-tone diacritics, and repairs common encoding issues.

Install

pip install nuficlean

Or from source:

pip install -e /path/to/nuficlean

Usage

from nuficlean import clean

clean("kòlə̀'")        # → "kwele'"
clean("tōh mēndɑ̀'")  # → "tōh mēndɑ'"
clean("mbɑ̀ɑ̀")        # → "mbɑɑ"

Batch cleaning:

from nuficlean import clean_lines

clean_lines(["kòlə̀'", "mbɑ̀ɑ̀"])  # → ["kwele'", "mbɑɑ"]

CLI:

nuficlean "kòlə̀'"
echo "mbɑ̀ɑ̀" | nuficlean

Pipeline

  1. Mojibake repair — fixes Latin-1 → UTF-8 misencoding
  2. Apostrophe / quote unification — maps ', `, ʼ, ", «, », etc. to ASCII
  3. Bana → Komako rewrite — longest-match substitution table (e.g. kòlə̀'kwèlè', ɛ̀a)
  4. Low-tone stripping — removes grave-accent tone marks (àa, ɑ̀ɑ, …)
  5. NFC recomposition

License

MIT

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

nuficlean-0.1.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

nuficlean-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file nuficlean-0.1.1.tar.gz.

File metadata

  • Download URL: nuficlean-0.1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for nuficlean-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08a3366d000606277e2a45c623594e8a0003bc8ff1d403bdfeb2ea9b71640ea0
MD5 7b8e78b627a515d5ecc2c676223a8c6a
BLAKE2b-256 5517328502980b14f812be76d3fdfebdd906c3e19eb3a657b1734b0bb4e37790

See more details on using hashes here.

File details

Details for the file nuficlean-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nuficlean-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for nuficlean-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dabfb0f02643b4a8dcd8d41e59af0734f2682ec40af1957a80b5b5cec3cf337
MD5 2d8ed9e07f694a14063823ee6f96fd44
BLAKE2b-256 9ff699e02008487cfafd7c0059071bcd5bd1463c293008a9b3d2a314ca8d835e

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