Skip to main content

A package to transliterate from mni-Mtei to mni-Beng

Project description

PyPI

MeiteiToBangla

This Python module was created to facilitate the conversion of the Manipuri Language (mni) from the Meitei Mayek script to the Bengali script. The module is based on the Unicode standard for the Meitei Mayek script and the Unicode standard for the Bengali script. The module is designed to be used with Python 3.6 or later. I kindly thank the following people for their help in creating this module:

  1. Haoreima for the Meitei Mayek to Bangla rules and the Meitei Mayek Unicode standard.

Background

Meitei Mayek is the script used to write the Meitei language, which is spoken in the Indian state of Manipur. The script is based on the Bengali script, and the two scripts share many characters. However, there are some differences between the two scripts, and the Meitei Mayek script has some characters that are not present in the Bengali script.

Installation

You can install this module via pip as:

pip install -U meiteitobangla

Usage

The module is accessible as mtei2bangla.

from mtei2bangla import MeiteitoBangla
input_text = input('Please enter an example text')
output = MeiteitoBangla.transliterate(input_text)

Since version, 1.1.0, the MeiteitoBangla has two methods setpreprocess and setpostprocess to set the pre and post process functions. The setpreprocess method takes a function as an argument and the setpostprocess method takes a function as an argument. The function should take a string as an argument and return a string. The transliterate method will call the pre-process function before transliterating the text and the post-process function after transliterating the text.

from mtei2bangla import MeiteitoBangla
def custom_preprocess(text):
    return text
def custom_postprocess(text):
    return text
MeiteitoBangla.setpreprocess(custom_preprocess)
MeiteitoBangla.setpostprocess(custom_postprocess)
input_text = input('Please enter an example text')
output = MeiteitoBangla.transliterate(input_text)

Known Limitations

  1. It adds an at the end of consonants if no diacritics are added. In most cases these are correct but in some foreign loan words, it is not correct. But as this module does not have any capability to distinguish between these words, it would add at the end. Please use custom_end_func (not implemented yet) to handle these correctly.

License

Copyright (C) 2024 by Nokib Sarkar. This module is licensed under the terms of the AGPLv3 license. However, there is no restriction to use this module for the initial developer. A copy of the license is included in the file LICENCE.md. If not, see https://www.gnu.org/licenses/agpl-3.0.html.

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

meiteitobangla-1.1.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

meiteitobangla-1.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file meiteitobangla-1.1.0.tar.gz.

File metadata

  • Download URL: meiteitobangla-1.1.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for meiteitobangla-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4de1809f18970ca06b6943433ee200c96c95de9c08fd84c9ff8f64d1a48373d3
MD5 ad96014e2a2c5dc501ff9de8a86f4fc6
BLAKE2b-256 415873dc33fa0b5502d173268e16424c84ebdeb9e442acbd7c7b5a3e99031df2

See more details on using hashes here.

File details

Details for the file meiteitobangla-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meiteitobangla-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a385fd8fe58039316503a2eccf1e78e7fd2d2b3e8ba6576f7c67e27ee103cfa2
MD5 cd64526fb9b3eb3f6e8f859838320682
BLAKE2b-256 e3505cde7a837a2af0f0d5936fdfff048e7ed9787ba9159273ca13c8d00a4524

See more details on using hashes here.

Supported by

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