anvaad-py :: ਅਨੁਵਾਦ-ਪੀਵਾਏ
This is python version of anvaad-js
Installation
# pip
pip install anvaad-py
API Documentation
Usage
import unicode from anvaad_py
unicode('ਆਇ ਮਿਲੁ ਗੁਰਸਿਖ ਆਇ ਮਿਲੁ ਤੂ ਮੇਰੇ ਗੁਰੂ ਕੇ ਪਿਆਰੇ ॥', True)
// => 'Awie imlu gurisK Awie imlu qU myry gurU ky ipAwry ]'
Table of Contents
ascii
Returns a comma-separated string of ascii codes for a string of Gurmukhi characters
Parameters
stringstring The string of letters
Examples
ascii('AmgAmqmgkp')
// => ',065,109,103,065,109,113,109,103,107,112,'
Returns string Returns a single string of comma-separated ascii codes
firstLetters
Retrieve the first letter of each word from a string
Parameters
wordsstring The string from which to get first lettersengboolean Whether the string is English (optional, defaultfalse)simplifyboolean Whether to simplify embedded vowels and other characters (eg. E to a, ^ to K)
Examples
firstLetters('Awie imlu gurisK Awie imlu qU myry gurU ky ipAwry ]')
// => 'AmgAmqmgkp'
Returns string Returns a single string of characters
mainLetters
Removes vowel symbols from a Gurmukhi string
Parameters
wordsstring The string from which to get main letterssimplifyboolean Whether to simplify embedded vowels/nasal sounds (eg. E to a, ^ to K)simplifyConsonantsboolean Whether to simplify half characters to full characters (eg. R to r)
Examples
mainLetters('Awie imlu gurisK Awie imlu qU myry gurU ky ipAwry ]')
// => 'Ae ml grsK Ae ml q mr gr k pAr'
Returns string Returns a single string of characters
unicode
Convert Gurmukhi script to Unicode and back again.
Parameters
textstring Gurbani Akhar or Unicode script to be convertedreverseboolean Whether to convert ASCII to unicode (false by default)simplifyboolean Whether to simplify extended characters to single code points (eg. sæ to ਸ਼ (u0A36), ਸ਼ (u0A38u0A3C) to S) (false by default)
Examples
unicode('Awie imlu gurisK Awie imlu qU myry gurU ky ipAwry ]')
// => 'ਆਇ ਮਿਲੁ ਗੁਰਸਿਖ ਆਇ ਮਿਲੁ ਤੂ ਮੇਰੇ ਗੁਰੂ ਕੇ ਪਿਆਰੇ ॥'
Returns string Returns unicode text
* unicode('ਆਇ ਮਿਲੁ ਗੁਰਸਿਖ ਆਇ ਮਿਲੁ ਤੂ ਮੇਰੇ ਗੁਰੂ ਕੇ ਪਿਆਰੇ ॥', True)
* // => 'Awie imlu gurisK Awie imlu qU myry gurU ky ipAwry ]'
Returns string Returns gurbani akhar ascii text
a 0xharkirat (Harkirat Singh) production.
Release files for anvaad-py 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anvaad_py-0.0.7.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anvaad_py-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.0 kB
Release files / anvaad_py-0.0.7.tar.gz
| Download URL | anvaad_py-0.0.7.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d198bd27a02a9ccd0e1d72847dadbbd83dabbcb7bc40d077ae6c73d7cd5bdf1d
|
|
BLAKE2b-256 checksum How to use checksums |
3c15651525aac1891ef51360ebb6631d3d5ec44e2ac3074ebc1103bdbe59c3b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|
Release files / anvaad_py-0.0.7-py3-none-any.whl
| Download URL | anvaad_py-0.0.7-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e2c476ab224dfaa83b3dfa15b4cfaff24b3029939b62185722365017cb15fea
|
|
BLAKE2b-256 checksum How to use checksums |
477d921e92e9e9897a82f571fcec02056cdda28a9d50b21406e518952ed4fab6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.1
|