Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.45 KB

README.md

File metadata and controls

51 lines (40 loc) · 1.45 KB

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