Skip to main content

Low Resource NLTK

Project description

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('আমি ভালো আছি')

Model Configuration

Default model paths:

  • POS Tagger: ~/.lowresnltk/POSModel/
  • Classifier: ~/.lowresnltk/ClassifierModel/

Installation

pip install lowresnltk

License

MIT License

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

lowresnltk-1.1.8.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lowresnltk-1.1.8-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file lowresnltk-1.1.8.tar.gz.

File metadata

  • Download URL: lowresnltk-1.1.8.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lowresnltk-1.1.8.tar.gz
Algorithm Hash digest
SHA256 7cf1a832ea8a2f35b7cb9928b1161ab031f5b3b8f2b40c955d0ead60eaaa9b86
MD5 3a96a57c09ffd5fb7637d664cb78cc0b
BLAKE2b-256 6374bf7e0cf63364ac16698c92ed56605492acc81b5e48a6afebb1a1a4bb8024

See more details on using hashes here.

Provenance

The following attestation bundles were made for lowresnltk-1.1.8.tar.gz:

Publisher: main.yml on abkafi1234/lowresnltk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lowresnltk-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: lowresnltk-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lowresnltk-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4453279bbe77192ae15989cb5c41912743ff4571536decab28ddc9be01fa52b4
MD5 4e95af25bd660273b4b6f6b35d90c855
BLAKE2b-256 db756d0e791ef64f99a21fe89f0b526d0f5feec476c408ff5634ea96cae925a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for lowresnltk-1.1.8-py3-none-any.whl:

Publisher: main.yml on abkafi1234/lowresnltk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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