Metadata-Version: 2.4
Name: lowresnltk
Version: 1.1.1
Summary: Low Resource NLTK
Author-email: abkafi1234 <kafi.cse@diu.edu.bd>
License: MIT
Project-URL: Homepage, https://github.com/abkafi1234/lowresnltk
Project-URL: Repository, https://github.com/abkafi1234/lowresnltk
Project-URL: Issues, https://github.com/abkafi1234/lowresnltk/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: torch
Requires-Dist: transformers
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: accelerate
Dynamic: license-file

﻿# LowResNLTK

A low-resource Natural Language Processing toolkit.

## Quick Inference Without Training
Pretrained model acheived an F1 Score of 97% in all classes.

### POS Tagging
```python
from lowresnltk import POSTagger

# Simple usage
tags = POSTagger.tag('আমি ভালো আছি')
```

### Sentence Classification
```python
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
```python
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
```python
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

```bash
pip install lowresnltk
```

## License
MIT License
