Skip to main content

A rule-based stemmer for Sanskrit Verbs and Nouns

Project description

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 : nairsooraj2000@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sanstem-1.0.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

sanstem-1.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file sanstem-1.0.1.tar.gz.

File metadata

  • Download URL: sanstem-1.0.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for sanstem-1.0.1.tar.gz
Algorithm Hash digest
SHA256 64190b752e8ae1b99325ccd941c6ea01b2ae0db2049b35f933fc4efc8778e7cc
MD5 b851db6661f35fbceac336e962ee3ec2
BLAKE2b-256 c5f10c823cc7b6ae38aa5fd4a8194ca5194efe7aab229d74b10a12aa552a6b84

See more details on using hashes here.

File details

Details for the file sanstem-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sanstem-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for sanstem-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9477c4ac913e32d28ef1b984b10fe5fc092d87180adf49f20dcebbf2bfa2791a
MD5 9e5d89d441ca3b21cbf10f954470162f
BLAKE2b-256 6615bc229aef7b71acdc2b7b42d6406688c55d9c11b51c97179f5691f8024157

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page