indic-transliteration 2.1.0
Transliteration tools to convert text in one indic script encoding to another
License: MIT
Keywords: indic script transliteration hindi sanskrit samskritam kannada devanagari tamil malayalam telugu gurumukhi gujarati bengali oriya - Harvard-Kyoto IAST Roman-Unicode) SLP1 WX

Indic transliteration tools
===========================

|Build Status| |Documentation Status| |Actions Status| |PyPI version|

For users
=========

-  `Autogenerated Docs on readthedocs (might be
   broken) <http://indic-transliteration.readthedocs.io/en/latest/>`__.
-  Manually and periodically generated docs
   `here <https://sanskrit-coders.github.io/indic_transliteration/build/html/>`__
-  For detailed examples and help, please see individual module files in
   this package.

Installation or upgrade:
------------------------

-  ``sudo pip install indic_transliteration -U``
-  ``sudo pip install git+https://github.com/sanskrit-coders/indic_transliteration/@master -U``
-  `Web <https://pypi.python.org/pypi/indic-transliteration>`__.

Usage
-----

.. code:: py

   In [1]: from indic_transliteration import sanscript
      ...: from indic_transliteration.sanscript import SchemeMap, SCHEMES, transliterate
      ...:

   In [2]: data = 'idam adbhutam'

   In [3]: print(transliterate(data, sanscript.HK, sanscript.TELUGU))
   ఇదమ్ అద్భుతమ్

   In [4]: print(transliterate(data, sanscript.ITRANS, sanscript.DEVANAGARI))
   इदम् अद्भुतम्

   In [5]: scheme_map = SchemeMap(SCHEMES[sanscript.VELTHUIS], SCHEMES[sanscript.TELUGU])

   In [6]: print(transliterate(data, scheme_map=scheme_map))
   ఇదమ్ అద్భుతమ్

Lazy anusvaara-s
~~~~~~~~~~~~~~~~

::

       assert sanscript.SCHEMES[sanscript.ITRANS].fix_lazy_anusvaara("shaMkara") == "sha~Nkara"
       assert sanscript.SCHEMES[sanscript.ITRANS].fix_lazy_anusvaara("saMchara") == "sa~nchara"
       assert sanscript.SCHEMES[sanscript.ITRANS].fix_lazy_anusvaara("saMvara") == "sav.Nvara"
       assert sanscript.SCHEMES[sanscript.ITRANS].fix_lazy_anusvaara("saMyukta") == "say.Nyukta"
       assert sanscript.SCHEMES[sanscript.ITRANS].fix_lazy_anusvaara("saMlagna") == "sal.Nlagna"

Lazy visarga-s
~~~~~~~~~~~~~~

::

       assert sanscript.SCHEMES[sanscript.DEVANAGARI].fix_lazy_visarga("अन्तः पश्य") == "अन्तᳶ पश्य"
       assert sanscript.SCHEMES[sanscript.DEVANAGARI].fix_lazy_visarga("अन्तः कुरु") == "अन्तᳵ कुरु"

Lay Indian search terms
~~~~~~~~~~~~~~~~~~~~~~~

::

       assert sanscript.SCHEMES[sanscript.OPTITRANS].to_lay_indian("taM jitvA") == "tam jitva"
       assert sanscript.SCHEMES[sanscript.OPTITRANS].to_lay_indian("kRShNa") == "krishna"

Dravidian language extension
----------------------------

.. code:: py

   In [1]: from indic_transliteration import xsanscript
      ...: from indic_transliteration.xsanscript import SchemeMap, SCHEMES, transliterate
      ...:

   In [2]: data = 'असय औषधिः ग्रन्थः। ऎ ऒ यॆक्ककॊ?'

   In [3]: print(transliterate(data, xsanscript.DEVANAGARI, xsanscript.KANNADA))
   ಅಸಯ ಔಷಧಿಃ ಗ್ರನ್ಥಃ। ಎ ಒ ಯೆಕ್ಕಕೊ?

Font converters
---------------

::

       converter = tech_hindi.DVTTVedicConverter()
       text_in = "    +<=hÉÂ *1* +EòÉ®úÉä Ê´É´ÉÞiÉ ={ÉÊnù¹]õ& |ÉÉÊGòªÉÉnù¶ÉÉªÉÉÆ SÉäiªÉjÉ \"+ +' (ºÉÚ.8-4-68)  "
       output = converter.convert(text_in)

For contributors
================

Contact
-------

Have a problem or question? Please head to
`github <https://github.com/sanskrit-coders/indic_transliteration>`__.

Packaging
---------

-  ~/.pypirc should have your pypi login credentials.

::

   python setup.py bdist_wheel
   twine upload dist/* --skip-existing

Build documentation
-------------------

-  sphinx html docs can be generated with ``cd docs; make html``

Testing
-------

Run ``pytest`` in the root directory.

Auxiliary tools
---------------

-  |Build Status|
-  |Documentation Status|
-  `pyup <https://pyup.io/account/repos/github/sanskrit-coders/indic_transliteration/>`__

.. |Build Status| image:: https://travis-ci.org/sanskrit-coders/indic_transliteration.svg?branch=master
   :target: https://travis-ci.org/sanskrit-coders/indic_transliteration
.. |Documentation Status| image:: https://readthedocs.org/projects/indic-transliteration/badge/?version=latest
   :target: http://indic-transliteration.readthedocs.io/en/latest/?badge=latest
.. |Actions Status| image:: https://github.com/sanskrit-coders/indic_transliteration/workflows/Python%20package/badge.svg
   :target: https://github.com/sanskrit-coders/indic_transliteration/actions
.. |PyPI version| image:: https://badge.fury.io/py/indic_transliteration.svg
   :target: https://badge.fury.io/py/indic_transliteration