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.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sanstem-1.0.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.tar.gz
Algorithm Hash digest
SHA256 f494689d92fdd058fd95795642ae6b5bd1ca9229939c81cb65754f829ff6b594
MD5 00235bcde0a7207c312df698ae7213c0
BLAKE2b-256 ae987917a9cc4ccaa7630e46e29281b4aba8a413d36acf71b165ce5eafed89d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sanstem-1.0-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-py3-none-any.whl
Algorithm Hash digest
SHA256 cd2d7895065fd1789e7ac0fb603e8bf5f9decabf9e08a6be66dc6d78f8e3de19
MD5 03bf58980a09f7b461d8b3920bd36fd2
BLAKE2b-256 7e910df9a3104e3c11082e081e78ac0cb5ec6d0e2a4a67696a91b226a5201b2e

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