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.2.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.2-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aadil_nazar_sindhi_nlp-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ec7b55c233c23b53e3322dcfa58938b8e9a0008b4f632e6af94be1200a8f9894
MD5 9e084202995c18806d3f25e2ea42a21a
BLAKE2b-256 d64511774b9e4adcb34bb95ee14b94a0dd34fa9438495d86c8fd4c474170b77e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aadil_nazar_sindhi_nlp-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ace6690d86ebc165658023c715e1e681ad698862b4ace1e759a2dd69e9bca143
MD5 08de879b5fbb8bcfd9fb0484be1a129a
BLAKE2b-256 26518ae53a38616965f8022f253c8307f4a8a0c970f0d2e5698712dd9b4420ec

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