DEV Community

Hrishikesh Terdalkar
Hrishikesh Terdalkar

Posted on

PyCDSL - Python Interface to Cologne Digital Sanskrit Lexicon (CDSL)

GitHub logo hrishikeshrt / PyCDSL

Python Interface to Cologne Digital Sanskrit Lexicon (CDSL)

PyCDSL

https://img.shields.io/pypi/v/PyCDSL?color=success Documentation Status Python Version Support GitHub Issues GitHub Followers Twitter Followers

PyCDSL is a python interface to Cologne Digital Sanskrit Lexicon (CDSL).

Features

  • CDSL Corpus Management (Download, Update, Access)
  • Unified Programmable Interface to access all dictionaries available at CDSL
  • Console Command and REPL Interface for easy dictionary search
  • Extensive support for transliteration using indic-transliteration module

Install

To install PyCDSL, run this command in your terminal:

$ pip install PyCDSL
Enter fullscreen mode Exit fullscreen mode

Usage

PyCDSL can be used in a python project, as a console command and as an interactive REPL interface.

Using PyCDSL in a Project

Import PyCDSL in a project:

import pycdsl
Enter fullscreen mode Exit fullscreen mode

Create a CDSLCorpus Instance:

# Default installation at ~/cdsl_data
CDSL = pycdsl.CDSLCorpus()
# Custom installation path can be specified with argument `data_dir`
# e.g. CDSL = pycdsl.CDSLCorpus(data_dir="custom-installation-path")

# Custom transliteration schemes for input and output can be specified
# with arguments `input_scheme` and `output_scheme`.
# Values
Enter fullscreen mode Exit fullscreen mode

Top comments (0)