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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sanstem-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d4b94fa5e7a23889974065887167d2802d15b6fda260a3c3c8a7ab66786330d3
MD5 970d47990623e79a0a4841cc60988a97
BLAKE2b-256 680840dd663eee4abc44cb548018d824d3ae5e709efeacdb05d5e68198088b12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sanstem-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0712001b7535e69e662d6b585c27cfb3be474ec9cb72abfc5f6af1459c8bcc1c
MD5 028fbadf58aff1e86ef917d75970c667
BLAKE2b-256 287b67d7b96ba22a30ebf0fd974fd2e0c4f4bc5dde9158ed158f7b6fd2170c77

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