Git Product home page Git Product logo

akshara's Introduction

Akshara

Helps you spell!

Linting Tests Code Tests GitHub commit activity GitHub last commit

Akshara is a tool for all your spelling needs. The package offers functions to:

  1. Spell any given word (or any string) in Devanagari script.
  2. Construct a word from a given spelling.
  3. Count the number of svaras in a string.
  4. Count the number of sentences in a string.

Installation

Latest version of akshara can be directly installed from PyPI using

pip3 install akshara

Usage

Load the varnakaarya module

import akshara.varnakaarya as vk

Obtain spelling (vinyaasa) of a word

a = vk.get_vinyaasa("राम")       # a = ['र्', 'आ', 'म्', 'अ']
b = vk.get_vinyaasa("गमॢँ")       # b = ['ग्', 'अ', 'म्', 'ऌँ']
c = vk.get_vinyaasa("स पठति ।")  # c = ['स्', 'अ', ' ', 'प्', 'अ', 'ठ्', 'अ', 'त्', 'इ', ' ', '।']

Create a word (shabda) from a given vinyaasa

d = vk.get_shabda(['स्', 'अ', 'ं', 'स्', 'क्', 'ऋ', 'त्' ,'अ', 'म्'])    # d = 'संस्कृतम्'
e = vk.get_shabda(['श्', 'इ', 'व्', 'अ', 'ः'])                        # e = 'शिवः'
f = vk.get_shabda(['द्', 'ए', 'व्', 'अ', 'द्', 'अ', 'त्', 'त्', 'अ३'])  # f = देवदत्त३

Count svaras, vyanjanas, ayogavaahas and vaakyas

g = "बुद्धं शरणं गच्छामि । धर्मं शरणं गच्छामि । सङ्घं शरणं गच्छामि ॥"

num_svaras = vk.count_svaras(g)            # num_svaras = 24
num_vyanjanas = vk.count_vyanjanas(g)      # num_vyanjanas = 30
num_ayogavaahas = vk.count_ayogavaahas(g)  # num_ayogavaahas = 6
num_varnas = vk.count_varnas(g)            # num_varnas = 60
num_vaakyas = vk.count_vaakyas(g)          # num_vaakyas = 3

akshara's People

Contributors

arindamsaha1507 avatar

Stargazers

Prasanna Venkatesh T S avatar Shantanu Oak avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.