GithubHelp home page GithubHelp logo

sanstem's Introduction

sanstem

Sanstem is a tool used for stemming Sanskrit Verbs and Nouns. Stemming is a pre-processing procedure applied for many NLP algorithms by which the suffix of a word is removed to obtain its stem/root form. This tool is built using a simple rule-based approach.

Installation

pip install sanstem


Usage

from sanstem import SanskritStemmer

#create a SanskritStemmer object
stemmer = SanskritStemmer()
Stemming a Noun
inflected_noun = 'गजेन' 
stemmed_noun = stemmer.noun_stem(inflected_noun)
print(stemmed_noun)
# output : गज्
Stemming a Verb
inflected_verb = 'गच्छामि'
stemmed_verb = stemmer.verb_stem(inflected_verb)
print(stemmed_verb)
# output : गच्छ्

Please note to only enter a single word in Devanagari text as input to the functions verb_stem() and noun_stem().


Contribute

  • Currently the tool can stem only Sansrkrit Verbs and Noun. It can be extend to more parts of speech like adjective, adverb etc.
  • The tool can be made flexible to accept Sanskrit input in any convention like IAST, HK, iTrans etc.
  • Instead of stemming just a single word, it can be made capable of stemming a sentence or even a whole file.

Issue

Please open an issue here in case any bug was encountered. Mail id : [email protected]

sanstem's People

Contributors

s00rajsnair 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.