sanskrit-transcoder
v1.2.3
Published
Transcode sanskrit strings to and from the SLP1 transliteration scheme
Downloads
6
Readme
sanskrit-transcoder
Javascript port of the PHP/Python implementation of sanskrit transcoding.
This module provides a single method to transcode a string to and from a number of transliteration schemes:
itrans
- Indian languages TRANSliteration (ITRANS)hk
- Harvard-Kyoto (or Kyoto-Harvard)roman
- Romanized Sanskrit Transliteration (IAST)deva
- Devanagari (Unicode)wx
- WX notation
Usage
npm install --save sanskrit-transcoder
Basic Example
const sanskritTranscoder = require('sanskrit-transcoder')
let transcoded
transcoded = sanskritTranscoder('jYAna', 'slp1', 'deva') // ज्ञान
transcoded = sanskritTranscoder('jYAna', 'slp1', 'roman') // jñāna
transcoded = sanskritTranscoder('jJAna', 'hk', 'slp1') // jYAna
transcoded = sanskritTranscoder('jJAna', 'hk', 'deva') // ज्ञान
API
sanskritTranscoder(sourceString
, sourceScheme
, targetScheme
)
sourceString
- the string to transcode which should be in thesourceScheme
sourceScheme
- the transcoding scheme that yoursourceString
is in.targetScheme
- the transcoding scheme you want your output to be.
License
GPL License
Copyright 2020, Arjun Mehta