Skip to main content

A package to transliterate Lao characters into a number of romanization systems, such as IPA and MoH2020

Project description

lao2ipa

Lightweight rule-based Lao → IPA transliteration utilities.

This package tokenizes Lao text into orthographic units, groups characters into syllables, applies tone-placement heuristics, and renders IPA transliterations (with optional alternate outputs).

Quickstart

Install (from PyPI):

pip install lao2ipa

Install (from source):

pip install -e .

Basic usage (Python):

from lao2ipa import transliterate

print(transliterate('ສະບາຍດີ'))  # example output: IPA transliteration

Function signature:

  • transliterate(lao_source: str, output: str = 'ipa', ignore_tones: bool = False, remove_karan_phonemes: bool = False)

Output keys (valid output values):

  • ipa — Unicode IPA transliteration (default)
  • moh — Ministry of Health (MoH 2020) romanization mapping

Development

  • Run tests with pytest -q.
  • Code lives in src/lao2ipa.py.

Contributing

Please open an issue or PR if you find incorrect mappings or wish to improve heuristics (tone assignment and vowel clusters are the most likely areas to require refinement).

License

See the LICENSE file in the repository root.

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

lao2ipa-1.0.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

lao2ipa-1.0.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file lao2ipa-1.0.0.tar.gz.

File metadata

  • Download URL: lao2ipa-1.0.0.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.21

File hashes

Hashes for lao2ipa-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a4efff5c16068754b0eb84d3110ababb752614532f1c89ee6cf39ff446212168
MD5 5a5467afffdd0971bce51350c1a2cfba
BLAKE2b-256 edfa889850779768b4398d8a1d20171fa13412b2640ca3ad06e0492ccfabd593

See more details on using hashes here.

File details

Details for the file lao2ipa-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lao2ipa-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.21

File hashes

Hashes for lao2ipa-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43d0d2c06d95f86ff5f3fae2c76a2a8f5af3732ef69a32b3cfe384160d6433e5
MD5 8e7c1ea8a6d22ec9c51e9a926336f2ba
BLAKE2b-256 6bac5b5441c64f330013fd16b319c85888618abc8b53069c7a18a365c905e1f3

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