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.2.tar.gz (12.1 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.2.tar.gz.

File metadata

File hashes

Hashes for tibetan_sanskrit_transliteration_data-0.1.2.tar.gz
Algorithm Hash digest
SHA256 842f04046b7577d078ea986a0bbca10e1f45bbf71fa17463eef11427b820fc3c
MD5 07a7c16ef9246de9581dbd3b8ca94441
BLAKE2b-256 bdcec683cb8d41bfed2c565d1c5d51042a3ec81ec9e0482f6c2f49028d1fcce3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tibetan_sanskrit_transliteration_data-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc035e1b3579f60215f6341ce48f69480d3d8552d4820f3ba6b4827033fca60e
MD5 a194e2d5c1996344647449c8c3fb3a95
BLAKE2b-256 2227ef41453ad5c532f8a394437c583b4ff6a8bd5be6c62403cec0e5035ac63b

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