LowResNLTK
A low-resource Natural Language Processing toolkit.
Quick Inference Without Training
Pretrained model achieved an F1 Score of 97% in all classes.
POS Tagging
from lowresnltk import POSTagger
# Simple usage
tags = POSTagger.tag('আমি ভালো আছি')
Sentence Classification
from lowresnltk import SentenceClassifier
# Simple usage
label = SentenceClassifier.classify('আমি ভালো আছি')
Training Custom Models
Data Format Requirements
| Column | Description | Example |
|---|---|---|
| Sentence | Full Bengali sentence | সন্ধ্যায় পাখিরা বাসায় ফেরে |
| Labels | Sentence type | Simple |
| POS | List of POS tags | ['ক্রিয়া', 'বিশেষ্য', 'বিশেষ্য', 'অব্যয়'] |
| Words | List of words | ['সন্ধ্যায়', 'পাখিরা', 'বাসায়', 'ফেরে'] |
Example Dataset: https://huggingface.co/datasets/abkafi1234/POS-Sentence-Type
The code is Language Agnostic So Any Language will work. if the proper structure is followed
Train POS Tagger
import pandas as pd
from lowresnltk import POSTagger
# Load your data
data = pd.read_csv('Bangla.csv')
# Initialize and train
pt = POSTagger(data)
pt.train()
# Test prediction
result = pt.predict('আমি ভালো আছি')
Train Sentence Classifier
from lowresnltk import SentenceClassifier
# Load your data
data = pd.read_csv('Bangla.csv')
# Initialize and train
sc = SentenceClassifier(data=data)
sc.train()
result = sc.predict('আমি ভালো আছি')
Text Normalization Evaluator
A Unified Multi-Metric Framework for Evaluating Semantic Fidelity in Text Normalization*
Evaluate how stemming or lemmatization algorithms affect your text both structurally and semantically, beyond just compression ratios.
Python Example
from lowresnltk import NormalizationEvaluator
from sentence_transformers import SentenceTransformer
from sklearn.ensemble import RandomForestClassifier
# 1. Prepare your parallel datasets and labels
original_texts = ["The quick brown foxes are jumping.", "Beautifully painted canvases."]
normalized_texts = ["The quick brown fox be jump.", "Beauti paint canvas."]
labels = [0, 1]
# 2. Setup your evaluation models
classifiers = [RandomForestClassifier()]
embedding_model = SentenceTransformer("csebuetnlp/banglabert")
# 3. Initialize and run the evaluator
evaluator = NormalizationEvaluator(
texts_original=original_texts,
texts_normalized=normalized_texts,
labels=labels,
classifiers=classifiers,
embedding_model=embedding_model
)
# Returns CR, IRS, AES, ANLD, and MPD scores
results = evaluator.evaluate_all()
print(results)
Model Configuration
Default model paths:
- POS Tagger:
~/.lowresnltk/POSModel/ - Classifier:
~/.lowresnltk/ClassifierModel/
Installation
pip install lowresnltk
License
MIT License
Metadata
Release files for lowresnltk 1.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lowresnltk-1.1.11.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lowresnltk-1.1.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.4 kB
Release files / lowresnltk-1.1.11.tar.gz
| Download URL | lowresnltk-1.1.11.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36c17fdfcd175d61f551a95dfc0a7dc1e7ff5436c7af90cf15d39a3b1054c047
|
|
BLAKE2b-256 checksum How to use checksums |
71bd4697d3cb0e09e620f422e59852b281c45a57a5c195d77f8833d686ebe576
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 11, 2026.
Transparency logRelease files / lowresnltk-1.1.11-py3-none-any.whl
| Download URL | lowresnltk-1.1.11-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
002264855d2171f884f72b01270549a38c28656a45c4b82ef1783f1a7d085c16
|
|
BLAKE2b-256 checksum How to use checksums |
c10ca1032513ef91cce2abf6fac239ed091593ceb5e9b64695a450dcd032fa0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 11, 2026.
Transparency log