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 transliterate.lao_to_ipa_ref import lao2ipa

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

Function signature:

  • lao2ipa(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/transliterate/lao_to_ipa_ref.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-0.0.2.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

lao2ipa-0.0.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lao2ipa-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d5010c0a2c6cfc884754c8fb65809a1f6398e5bf38faf13796c8d7c45272984a
MD5 30f15db5a0c8528df33d7cbf12d26e72
BLAKE2b-256 429e18cd5657f3c0e5601890c118c99dcfd5d113bfb963845e11a5de98b8eec7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lao2ipa-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ee26131390070520d09cc64928e85b0bdc8e96d3ffb7e21ca2747ed8cc391e3
MD5 f284fcf0666638b1c000fe54da632950
BLAKE2b-256 563a518762b0d24569d2e7e101d8922fd175db7c232716965d39fb026e773fd7

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