indicdictionary

A bilingual dictionary for indic languages.

Usage

>>> from indicdictionary import getInstance
>>> d = getInstance()
>>> print d.getdef("cat","en-ml").encode('utf-8')
'cat\n   \t1. \xe0\xb4\xaa\xe0\xb5\x82\xe0\xb4\x9a\xe0\xb5\x8d\xe0\xb4\x9a\n   \t2. \xe0\xb4\xae\xe0\xb4\xbe\xe0\xb4\xb0\xe0\xb5\x8d\xe2\x80\x8d\xe0\xb4\x9c\xe0\xb5\x8d\xe0\xb4\x9c\xe0\xb4\xbe\xe0\xb4\xb0\xe0\xb4\xa8\xe0\xb5\x8d\xe2\x80\x8d\n'

Dependancies

Indicdictionary requires render module for creating images.This requires you to have pango, cairo,and pangocairo installed in your system.

API reference

class indicdictionary.core.Dictionary[source]

The dictionary class. Instantiate to get access to the methods.

get_info()[source]

Returns more info on the module

get_module_name()[source]

Returns the modules name.

get_wiktionary_def_image(word, dictionary, file_type='png', width=0, height=0, color='Black', fontsize=10)[source]

Returns an image of the definition. Useful for machine independant results

getdef(word, dictionary)[source]
Parameters:
  • word – The word which has to be looked up.
  • dictionary – The convertion needed, format src-dest >>>
getdef_image(word, dictionary, file_type='png', width=0, height=0, color='Black', fontsize=10)[source]

Returns an image of the definition. Useful for machine independant results.

indicdictionary.core.getInstance()[source]
Returns:an instance of the Dictionary

Indices and tables