Skip to main content

Convert among Devanagari transliteration schemes

Project description

Devanagari Transliterators

Convert among common Devanagari transliteration schemes. The following codecs are currently integrated.

System Code Decoder Encoder
Devanagari dev
IAST iast
WX wx
SLP1 slp
Velthuis vel
(La)TeX tex

Installation

The best method to install is via pip.

pip3 install devtrans

Clone the GitLab repository to install from the source or to contribute.

Usage

As a script

transliterate -d dev -e iast -i input_file -o outputfile

The options

  • -d Decoder system code (defaults todev)
  • -e Encoder system code (defaults to iast)
  • -i Input file (defaults to STDIN)
  • -o Output file (defaults to STDOUT)

See help for more details

transliterate --help

As a module

Import the module.

import devtrans

Call any codec function with appropriate input text

target = devtrans.wx2iast('xevanAgarI')

Devanagari encoders can have an optional boolean argument. If True, which is default, the encoder transliterates digits to Devanagari digits. If False, it leaves digits as it is.

target = devtrans.wx2dev('BagavaxgIwA 18.78', False)

Disclaimer

It has primarily been developed for personal use as a tea-time activity. Some of my colleagues and I are using it since 2015 for general texts from classical literature. I have been tweaking and making modifications whenever we found an issue.

However, the transliterators are not tested exhaustively or thoroughly with various kinds of texts.

Contribute

Find the repo on GitLab. If found bugs, please fix and push them, raise an issue or mail me.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

devtrans-2.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

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