Skip to main content

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_cache for 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


Download files

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

Source Distribution

aadil_nazar_sindhi_nlp-1.1.3.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

aadil_nazar_sindhi_nlp-1.1.3-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file aadil_nazar_sindhi_nlp-1.1.3.tar.gz.

File metadata

  • Download URL: aadil_nazar_sindhi_nlp-1.1.3.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

Hashes for aadil_nazar_sindhi_nlp-1.1.3.tar.gz
Algorithm Hash digest
SHA256 f7988889191fe418f19ac6e834771ba4ce950fc2f130e173d3ddf2c40e6733b9
MD5 260e83fde4caba52c66ab9d9e80dcfe3
BLAKE2b-256 29a8588d031e425a1f1bec5696e222cbe46ff99deb79ab97ed859fee251f99f6

See more details on using hashes here.

File details

Details for the file aadil_nazar_sindhi_nlp-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for aadil_nazar_sindhi_nlp-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 00db1816837f1d7af9283a04939680d4016b39e4df5fdc71f1bef00ea4846b0e
MD5 63db8ac17ec8b9283a12320dd9d97d51
BLAKE2b-256 6790dd3a80addf6624543c55f06289493c7351791860afedee3d4bb094b98840

See more details on using hashes here.

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