Sanskrit Text Utility Functions
Project description
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:
$ pip install sanskrit-text
Usage
Python API
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 skt command provides a small CLI:
# 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.
History
Unreleased
Add a command-line interface (
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sanskrit_text-1.0.0.tar.gz.
File metadata
- Download URL: sanskrit_text-1.0.0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
859af1584dcb156255a008c50b452e625a99360fbaa0bb54c8dad703b6fa0ddc
|
|
| MD5 |
11ac84789bffa393c726f5e3876d868e
|
|
| BLAKE2b-256 |
8e5baa6a7df67ce0404809801b0b37bee6dd9beb3928b5aaa41558329bbb1538
|
File details
Details for the file sanskrit_text-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: sanskrit_text-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26d4eadaea64452fde45b42a31ed63c603ee4e9c3674fd4bde22e692b68e49a7
|
|
| MD5 |
1bc4abea178f00989bb91f7410fc4176
|
|
| BLAKE2b-256 |
360b9eab427b396807541c69515867edf9a7fdee770dfb0c3842e7f2fcd24e52
|