Skip to main content

No project description provided

Project description

Bangla Lemmatizer (BnLemma)

BnLemma is a powerful tool for getting the root words of the words used in any Bangla sentence. There is a pretrained model available with this package. This page gives a basic introduction to the package.

Installation:

pip install BnLemma

In Python a BnLemma is typically written as:

Usage:

>>>  import BnLemma as lm
>>>  s = "মানুষের জীবনটা পাচ্ছেন তাই কাজে লাগানো দরকার আমাদেরকে"  
>>>  bl = lm.Lemmatizer()
>>>  s = bl.lemma(s)
>>>  print(s)

Output:

মানুষ জীবন পাওয়া তাই কাজ লাগা দরকার আমাদের

If you want to use your own Root Word List/Word Mapping just load it while initiaizing thw BnLemma class

Usage:

>>>  import BnLemma as lm
>>>  s = "মানুষের জীবনটা পাচ্ছেন তাই কাজে লাগানো দরকার আমাদেরকে"  
>>>  bl = lm.Lemmatizer(root_file='root.txt', mapping_file='map.txt')
>>>  s = bl.lemma(s)
>>>  print(s)

Output:

মানুষ জীবন পাওয়া তাই কাজ লাগা দরকার আমাদের

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

BnLemma-2.1-py3-none-any.whl (57.6 kB view hashes)

Uploaded Python 3

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