A comprehensive Sindhi NLP Suite (Lemmatizer & Spellchecker)
Project description
Sindhi NLP Suite (Aadil Nazar)
👤 About the Author
Aadil Nazar is a Data Engineer and Computational Linguistics Researcher . This suite is the result of intensive research into low-resource language digitization, designed to provide the same level of NLP sophistication for Sindhi that exists for major global languages.
🛠 Project Overview
The Sindhi NLP Suite is a high-performance, integrated toolkit for processing the Sindhi language. It moves beyond simple string matching by incorporating Morphological Analysis , Orthographic Confusion Mapping , and Levenshtein Edit Distance algorithms.
Core Capabilities:
1. The Sindhi Lemmatizer (Morphological Engine)
This isn't just a stemmer; it’s a rule-based lemmatizer that understands the grammatical structure of Sindhi.
- Verb Stemming: Handles complex suffixes like
ائيندا(future habitual) orيندڙ(habitual participle) to find the base root. - Noun Pluralization Rules: Automatically reverts plurals (ending in
يون,ون,ين) to their singular masculine or feminine forms. - Linguistic Metadata: Returns POS tags, gender (masculine/feminine), and number (singular/plural) for every analyzed token.
- Synonym Support: Integrated WordNet lookup to provide contextual synonyms.
2. The Sindhi Spellchecker (Logic-Driven)
A morphology-aware spellchecker that reduces "False Misspellings" by cross-referencing with the Lemmatizer.
- Confusion Map System: Uses a custom mapping to handle phonetically similar characters that are frequently swapped in digital typing (e.g.,
ھvsح,سvsص,زvsذ). - Edit Distance 1 & 2: Implements optimized algorithms to suggest corrections within one or two character changes.
- Normalization: Strips diacritics (Zabar, Zer, Pesh) automatically to ensure matching is based on core orthography.
🚀 Installation
Bash
pip install aadil-nazar-sindhi-nlp
💻 Technical Usage
Advanced Spellchecking with Suggestions
The spellchecker first checks the dictionary, then the lemma, then the confusion map, and finally calculates edit distances.
Python
from aadil_nazar_sindhi_nlp import SindhiSpellchecker
checker = SindhiSpellchecker()
# Test a word with an orthographic confusion error
# Input: 'اصلاح' (with a common character swap)
result = checker.check("اصلاح")
print(f"Correct: {result['correct']}")
print(f"Suggestions: {result['suggestions']}")
Deep Linguistic Analysis
Use the Lemmatizer to extract the "DNA" of a Sindhi word.
Python
from aadil_nazar_sindhi_nlp import SindhiLemmatizer
lem = SindhiLemmatizer()
# Analyze a plural inflected word: 'ڪتابن'
data = lem.analyze_word("ڪتابن")
print(f"Root: {data['root']}") # Output: ڪتاب
print(f"Tag: {data['tag']}") # Output: noun
print(f"Number: {data['number']}") # Output: plural
📊 Data Engineering & Performance
- O(1) Lookup: Built on Python sets and hash-maps for near-instant validation against massive datasets.
- LRU Caching: Uses
@lru_cachefor variant generation, making repetitive sentence processing lightning-fast. - Unicode Standardized: Built to handle the 52-letter Sindhi alphabet and specific UTF-8 character encodings without corruption.
🗺 The Roadmap (Growing Ecosystem)
This package is the foundation. As a researcher, I am actively building and will soon integrate:
- Sindhi POS Tagger: To identify parts of speech in full sentence contexts.
- Named Entity Recognition (NER): For extracting names, dates, and locations.
- Stopword Filtering: For cleaning Sindhi text for Machine Learning models.
⚖ License
Distributed under the MIT License . See LICENSE.txt for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aadil_nazar_sindhi_nlp-1.1.4.tar.gz.
File metadata
- Download URL: aadil_nazar_sindhi_nlp-1.1.4.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adb6edffc1273cbbd249c6d9a8bfd3301af46a41582a7da429732374673a782f
|
|
| MD5 |
a0fc7cb054cff62cc02cac887ebf8f2a
|
|
| BLAKE2b-256 |
91cad39af8fda9dc769db1bdad9f31e6a902bc0310263eaac3faaad3a61a579d
|
File details
Details for the file aadil_nazar_sindhi_nlp-1.1.4-py3-none-any.whl.
File metadata
- Download URL: aadil_nazar_sindhi_nlp-1.1.4-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
769fb5cc0ddfde63dd528153bb5da9e903c5e1426d2c78207b8d1aae2dfffb16
|
|
| MD5 |
330c8a6a5c1a20463bca903f9b110207
|
|
| BLAKE2b-256 |
7972d0c0c2583819e4f562311321f5f6e73dec2149beaaca30bdcc3ff937cf78
|