Skip to main content

Shared replacement map data for transliterating Tibetan-encoded Sanskrit mantras

Project description

Tibetan Sanskrit Transliteration Data

Shared replacement map data for transliterating Tibetan-encoded Sanskrit mantras to IAST and phonetics.

Available as both an npm and Python package.

Installation

JavaScript/Node.js

npm install tibetan-sanskrit-transliteration-data

Python

pip install tibetan-sanskrit-transliteration-data

Data Format

The replacements.csv file contains three columns:

Column Description
tibetan Tibetan Unicode pattern (may include regex)
transliteration IAST transliteration output
phonetics Phonetic output (optional, defaults to normalized transliteration)

Usage

JavaScript/Node.js

import { loadReplacements } from "tibetan-sanskrit-transliteration-data";

// Get parsed data (works in both Node.js and browser)
const replacements = loadReplacements();
// Returns: [{ tibetan: "...", transliteration: "...", phonetics: "..." }, ...]

// You can also import the data directly
import { replacements } from "tibetan-sanskrit-transliteration-data";

Note: This package is compatible with both Node.js and browser environments (including Vite/Webpack builds).

Python

from tibetan_sanskrit_transliteration_data import load_replacements, get_replacements_path

# Get parsed data
replacements = load_replacements()

# Or get the path to the CSV file
csv_path = get_replacements_path()

Contributing

To add or modify transliteration rules:

  1. Edit replacements.csv
  2. Test changes in both JS and Python implementations
  3. Submit a pull request

Order Matters

Entries are processed in order from top to bottom. More specific patterns should come before more general ones.

License

MIT License - Copyright Padmakara, 2025-present.

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

tibetan_sanskrit_transliteration_data-0.1.3.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file tibetan_sanskrit_transliteration_data-0.1.3.tar.gz.

File metadata

File hashes

Hashes for tibetan_sanskrit_transliteration_data-0.1.3.tar.gz
Algorithm Hash digest
SHA256 57b846af8f4bb5ecc1b0fc43fc8a5807fd6c6df52a156b0746a1db1b4c9b1de2
MD5 11197581be01745ca28d83bbcc2aa1d0
BLAKE2b-256 c1c6ce9add046ce98eee7953e7518fcbd684d2a29797ce7a4abb2306f146a760

See more details on using hashes here.

File details

Details for the file tibetan_sanskrit_transliteration_data-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for tibetan_sanskrit_transliteration_data-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bb79ac733ce66fd919b19a4419aff733d8aa98148498ae3159869c2c356ba7dc
MD5 f9933eb162d66eddf256bb07060b52eb
BLAKE2b-256 2b3dd818266d9fd823d3c07db012a83aae70d6ce5b2bb0157d180b1e898fcf7d

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