Skip to content

libindic/chardetails

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LibIndic Chardetails

Build Status Coverage Status

LibIndic's chardetails module may be used to get the details of a given unicode character.

Installation

  1. Clone the repository git clone https://github.com/libindic/chardetails.git
  2. Change to the cloned directory cd chardetails
  3. Run setup.py to create installable source python setup.py sdist
  4. Install using pip pip install dist/chardetails*.tar.gz

Usage

Input: String of Unicode characters
Output: Dictionary containing details of each character

>>> from libindic.chardetails import getInstance
>>> tool = getInstance()
>>> tool.getdetails(u'ആന')

{'Characters': [u'\u0d06', u'\u0d28'],
 u'\u0d06': {'AlphaNumeric': 'True',
  'Alphabet': 'True',
  'Canonical Decomposition': '',
  'Code point': "u'\\u0d06'",
  'Digit': 'False',
  'HTML Entity': '3334',
  'Name': 'MALAYALAM LETTER AA'},
 u'\u0d28': {'AlphaNumeric': 'True',
  'Alphabet': 'True',
  'Canonical Decomposition': '',
  'Code point': "u'\\u0d28'",
  'Digit': 'False',
  'HTML Entity': '3368',
  'Name': 'MALAYALAM LETTER NA'}}

For more details read the docs

Running tests

To run tests,

cd chardetails
python setup.py test

About

Unicode character details Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published