Metadata-Version: 2.4
Name: sanskrit-text
Version: 1.0.0
Summary: Sanskrit Text Utility Functions
Home-page: https://github.com/hrishikeshrt/sanskrit-text
Author: Hrishikesh Terdalkar
Author-email: hrishikeshrt@linuxmail.org
License: GNU General Public License v3 or later (GPLv3+)
Keywords: sanskrit-text,sanskrit_text,sanskrit,devanagari
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

=============
Sanskrit Text
=============



.. image:: https://img.shields.io/pypi/v/sanskrit-text
        :target: https://pypi.python.org/pypi/sanskrit-text


.. image:: https://readthedocs.org/projects/sanskrit-text/badge/?version=latest
        :target: https://sanskrit-text.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. image:: https://img.shields.io/pypi/pyversions/sanskrit-text
        :target: https://pypi.python.org/pypi/sanskrit-text
        :alt: Python Version Support

.. image:: https://img.shields.io/github/issues/hrishikeshrt/sanskrit-text
        :target: https://github.com/hrishikeshrt/sanskrit-text/issues
        :alt: GitHub Issues

.. image:: https://img.shields.io/github/followers/hrishikeshrt?style=social
        :target: https://github.com/hrishikeshrt
        :alt: GitHub Followers


.. image:: https://img.shields.io/twitter/follow/hrishikeshrt?style=social
        :target: https://twitter.com/hrishikeshrt
        :alt: Twitter Followers



Sanskrit Text (Devanagari) Utility Functions


* Free software: GNU General Public License v3
* Documentation: https://sanskrit-text.readthedocs.io.


Features
========

* Syllabification
* Varṇa Viccheda
* Pratyāhāra Encoding-Decoding
* Uccāraṇa Sthāna Yatna Utility
* Several other utility functions

Install
=======

To install Sanskrit Text, run this command in your terminal:

.. code-block:: console

    $ pip install sanskrit-text

Usage
=====

Python API
----------

.. code-block:: python

    import sanskrit_text as skt

    text = "कवि भारतः"

    # Clean text (keep only Sanskrit letters and spaces)
    clean_text = skt.clean(text)

    # Syllabification
    syllables = skt.get_syllables(text)

    # Varṇa decomposition and join
    viccheda = skt.split_varna(text, technical=True, flat=True)
    reconstructed = skt.join_varna(viccheda)

    # Ucchāraṇa information
    ucchaarana = skt.get_ucchaarana(text)
    signature = skt.get_signature(text)

Command Line Interface
----------------------

After installation, the :code:`skt` command provides a small CLI:

.. code-block:: console

    # Clean text
    $ echo "अ b १।" | skt clean
    अ

    # Get syllables (JSON output)
    $ skt syllables "कवि भारतः"

    # Varṇa decomposition (technical, flat list)
    $ skt split-varna --technical --flat "कवि भारतः"

    # Ucchāraṇa and signature (JSON output)
    $ skt ucchaarana "कवि"
    $ skt signature "कवि"

Credits
=======

This package was created with Cookiecutter_ and the `hrishikeshrt/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`hrishikeshrt/cookiecutter-pypackage`: https://github.com/hrishikeshrt/cookiecutter-pypackage


History
=======

Unreleased
----------

* Add a command-line interface (:code:`skt`) with subcommands for cleaning
  text, obtaining syllables and varṇa decomposition.
* Add a basic unit test suite covering core utilities and the CLI.
* Fix ``marker_to_swara`` for extended mātrā characters.
* Update packaging metadata and Trove classifiers for a production-ready
  release.

0.2.3 (2022-09-14)
------------------

* Clarify documentation for ``join_varna`` and update general project
  documentation.

0.2.2 (2022-09-13)
------------------

* Add two missing nuktā consonants to the alphabet definitions.

0.2.1 (2022-09-07)
------------------

* Resolve a merge issue affecting the codebase.

0.2.0 (2022-09-07)
------------------

* Reformat code with Black and improve documentation.

0.1.1 (2022-07-05)
------------------

* Packaging and release metadata updates.

0.1.0 (2022-07-03)
------------------

* First release on PyPI.
