Skip to main content

A comprehensive transliteration scheme for Indian languages

Project description

IITHLP

A comprehensive transliteration scheme for Indian languages with a strict one-to-one character mapping.

Overview

IITHLP is a Python package that provides a comprehensive transliteration scheme for 9 major Indian scripts covering 17 scheduled Indian languages. It ensures a strict one-to-one mapping between each Indic character and a single Roman character (with diacritics as needed), ensuring perfect reversibility while maintaining phonetic similarity.

Supported Scripts and Languages

IITHLP v0.2.2 provides comprehensive transliteration support for 9 Indian scripts covering 17 of the 22 scheduled Indian languages:

Script Languages
Devanagari Hindi, Sanskrit, Marathi, Nepali, Konkani, Bodo, Maithili, Dogri
Bengali Bengali, Assamese
Tamil Tamil
Malayalam Malayalam
Telugu Telugu
Kannada Kannada
Gurmukhi Punjabi
Gujarati Gujarati
Odia Odia

Languages Not Covered

The following scheduled Indian languages are not currently supported:

  • Urdu (uses Perso-Arabic script)
  • Kashmiri (primarily uses Perso-Arabic script)
  • Sindhi (uses Perso-Arabic script)
  • Santli (uses Ol Chiki script)
  • Manipuri (uses Meitei Mayek script)

All supported scripts feature a strict one-to-one mapping between each Indic character and a single Roman character (with diacritics as needed), ensuring perfect reversibility while maintaining phonetic similarity.

Features

  • Strict one-to-one mapping: Each Indic character maps to exactly one Roman character (with diacritics as needed)
  • Perfect reversibility: Guaranteed round-trip conversion without information loss
  • Script detection: Automatically detects the script of input text
  • Comprehensive coverage: Supports all characters, including vowels, consonants, matras, and special symbols
  • Easy to use: Simple API for both script-to-Roman and Roman-to-script conversion

Installation

# You can install directly from the provided Python file
pip install iithlp

Usage

Basic Usage

from iithlp import to_roman, to_script

# Transliterate from an Indian script to Roman
roman_text = to_roman("नमस्ते दुनिया")  # Devanagari
print(roman_text)  # "nmsⁿté dúníyā́"

# Transliterate from Roman to an Indian script
devanagari_text = to_script("nmsⁿté dúníyā́", script="devanagari")
print(devanagari_text)  # "नमस्ते दुनिया"

Script Detection

from iithlp import IITHLP

# Create a transliterator instance
transliterator = IITHLP()

# Detect script of text
text = "ಕನ್ನಡ"
detected_script = transliterator.detect_script(text)
print(detected_script)  # 'kannada'

Getting Supported Scripts

from iithlp import get_supported_scripts

# Get all supported scripts
scripts = get_supported_scripts()
print(scripts)  # ['devanagari', 'bengali', 'tamil', ...]

Mapping Scheme

The mapping scheme follows these principles:

  1. Phonetic similarity: Similar sounds have similar representations
  2. Diacritics for disambiguation: Diacritics are used to distinguish between similar sounds
  3. Consistency: Similar patterns across scripts are represented consistently
  4. Reversibility: The scheme ensures perfect round-trip conversion

Example Mappings

Vowels (Independent Form)

Roman Devanagari Bengali Tamil Malayalam Telugu Kannada Gurmukhi Gujarati Odia
a
ā
i
ī
u
ū
e -
ê
o -
ô

Consonants (Sample)

Roman Devanagari Bengali Tamil Malayalam Telugu Kannada Gurmukhi Gujarati Odia
k
g -
c
j
t
p
m
y
l

License

MIT License

Acknowledgements and Ownership

This package is a product of work from the department of Heritage Science and Technology, IIT Hyderabad. It provides comprehensive support for 9 major Indian scripts and a strict one-to-one mapping scheme. For any concerns please raise an issue on the github repository. You may reach out to the author at ramanan93'at'gmail'dot'com.

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

iithlp-0.2.5.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

iithlp-0.2.5-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file iithlp-0.2.5.tar.gz.

File metadata

  • Download URL: iithlp-0.2.5.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for iithlp-0.2.5.tar.gz
Algorithm Hash digest
SHA256 ca8e6d5daad54d5508990aa46b61243ece54a26826487983c388a146d48b2c1c
MD5 dea9d100c1b8c964d86620b8a0c49566
BLAKE2b-256 032e474023f0e4b56e7d4379ebc8dc79093c8977f1f064bb53dbe802bf54b755

See more details on using hashes here.

File details

Details for the file iithlp-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: iithlp-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for iithlp-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2fd927d8246a3990416df8e225ac344338a189418e6352f31f42cd08b4e3bd27
MD5 df7464c6c13217bf45f87309fac23c23
BLAKE2b-256 d3b6b8c6b0b132831fed7bc409d90a6aef9f19e29c21b9518532e2c92b9a27f5

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