Skip to main content

Python library for Nufi (Fe'éfě'e) text: Clafrica keyboard mapping, Bana→Komako normalisation, low-tone stripping, and encoding repair

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.2.0.tar.gz (11.9 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.2.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nuficlean-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a9037903a4681df028a940e0d606dc4207b1f144eb23a0ff400965fef40c822d
MD5 4b047082cc5c0e8dc1141197e2ef9a03
BLAKE2b-256 9d475c0cc1d36fdfd7e835fe09fe98d42f1dd6225397890af051d502d02a6350

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nuficlean-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c36445efcb6c735616083a074cdf27c7596bb997e0e0bc25211e1f516e19a538
MD5 c85a8a6535f17106597b62143f664839
BLAKE2b-256 7fcfdd4de6d872d52e3223a9d5b15f0fd78dd9354e6b8854f0ce2a21c2a85bf2

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