Pyvarnam provides python bindings for libvarnam
Project description
Pyvarnam
_ _
/ \ / \ |
\_// \_// /\_____|
_ |_ _ _ _
( )_| (|_) ()| | )O
_ _ _
()| | |
===================
Pyvarnam is a python wrapper to the libvarnam library.
Varnam is an open-source transliterator suited for Indian languages and the
main component is a C library called libvarnam. Pyvarnam provides python bindings for libvarnam.
Installation
You need to install libvarnam for pyvarnam to work. You could refer libvarnam installation to find out how to install libvarnam.
You can install it from PyPi using
pip install pyvarnam
Or you can download the archive, un-tar/zip and cd into the directory you unzipped the
archive into, and then run
user@user-pc:~/unzipped-dir$ python setup.py install
Usage
To transliterate with pyvarnam, you just have to run the following.
from pyvarnam import varnam
var_lib = varnam()
var_lib.varnam_init_from_id("ml")
result = var_lib.varnam_transliterate("varnam")
if result is not None:
print result[0][0]
As of now only some of the functions mentioned in libvarnam/api.h has been implemented. You could refer varnam.py to
see which all functions are available.
Running the tests
A basic test suite has been implemented based on the transliteration tests in
libvarnam. To run them, cd to the tests folder in the archive and run
python test.py
Currently pyvarnam has only been tested in Debian. If you find any bugs or would like to suggest some other changes, report the issue here or feel free to contact me.
License & Contact
This project is licensed under the MIT License. For more info, see LICENSE.txt Copyright (c) 2015 Sebin Thomas
You could contact me at me(at)sebin(dot)in or I'm @stc043 on twitter.
Project details
Release history Release notifications | RSS feed
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 pyvarnam-1.0.0.tar.gz.
File metadata
- Download URL: pyvarnam-1.0.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42d25f9d17ccd2128e2b23c3aed3c6258b68b9ae9d19649eb97d2845e9c550d4
|
|
| MD5 |
c08ded5da3fc95c8d38a621a8c2c5912
|
|
| BLAKE2b-256 |
68f12f045730d72efbc2412a6ad3ab914ae0180bd59a6a87646900a7fd2a855f
|
File details
Details for the file pyvarnam-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyvarnam-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
993bcf11cd5871504616d971cd474de99fca682fffe038606f10c5e093b6aee0
|
|
| MD5 |
e121cc0e71fb6f683f1cf6faa4465cae
|
|
| BLAKE2b-256 |
c7eaa28db6e5ac0877078103b778d35203a47040eb4086ba12c3de4f54e7497e
|