Metadata-Version: 2.4
Name: uzbek_morph
Version: 1.0.0
Summary: Rule-based morphological analyzer and lemmatizer for the Uzbek language
Home-page: http://uzmorph.uz/models/uzbek_morph
Author: Ulugbek Salaev
License: MIT
Project-URL: Documentation, http://uzmorph.uz/models/uzbek_morph
Project-URL: Source Code, http://uzmorph.uz/models/uzbek_morph
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# `uzbek_morph` — Rule-based morphological analyzer for the Uzbek language

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Author:** Ulugbek Salaev
**Model Page:** 🌐 [http://uzmorph.uz/models/uzbek_morph](http://uzmorph.uz/models/uzbek_morph)

**`uzbek_morph`** is a high-precision hybrid morphological analyzer and lemmatizer for the Uzbek language. It features a rule-based engine and a corpus of 145,844 unique surface forms.

---

## 🌟 Key Features

1. **📏 Rule-Based Analysis Engine:**

   * Step-by-step affix stripping using linguistic and morphophonemic rules to accurately extract canonical lemmas for out-of-vocabulary words.
2. **📚 Extensive Vocabulary Coverage (145,844+ Unique Forms):**

   * Comprehensive grammatical and lexical coverage across Nouns, Verbs, Adjectives, Adverbs, Pronouns, Numerals, and Conjunctions.
3. **🔄 Morphophonemic Sound Change Rules:**

   * **Consonantal Lenition:**
     * `g'` ➔ `q`: *qulog'im* ➔ **`quloq`**, *tarmog'i* ➔ **`tarmoq`**, *qobig'ida* ➔ **`qobiq`**
     * `g` ➔ `k`: *eshigim* ➔ **`eshik`**, *yuragida* ➔ **`yurak`**, *bilagidan* ➔ **`bilak`**
   * **Vowel Syncope / Elision:**
     * *burni* ➔ **`burun`**, *shahrimizga* ➔ **`shahar`**, *qornida* ➔ **`qorin`**, *ko'nglimiz* ➔ **`ko'ngil`**, *og'zidan* ➔ **`og'iz`**
4. **🔗 Compound & Auxiliary Verb Contextual Parser:**

   * Intelligent rule chain for Uzbek **converb (`-ib/-b`) + auxiliary verb** constructions (`uxlab oldi`, `aytib keldi`, `yozib berdi`, `kulib yubordi`), disambiguating auxiliary verbs like `oldi` into **`olmoq` (verb)** rather than noun or adjective.
5. **👤 Pronoun & Numeral Paradigms:**

   * Complete inflected personal/demonstrative pronouns (*menga*, *senga*, *unga*, *bunga*, *shunga*, *bunda*, *shunda*, *bundan*, *shundan*) and numerals (*birinchi*, *ikkinchi*, *ikkala*, *uchala*).
6. **⚡ Flexible & Unified API (`analyze`):**

   * Single `analyze()` entry point that seamlessly processes single words, compound phrases, or complete sentences.

---

## 📦 Installation

```bash
pip install uzbek_morph
```

---

## 💻 Usage Code Snippets

### 1. Quickstart (Default Tabular Display):

```python
import uzbek_morph

# Single Word:
uzbek_morph.analyze("kitoblarimizga")

# Compound Phrase:
uzbek_morph.analyze("uxlab oldi")

# Full Sentence:
uzbek_morph.analyze("Men kecha go'zal shahrimizga kitob sotib olgani bordim")
```

---

### 2. Programmatic Data Processing:

Set `print_result=False` to receive a list of structured dictionaries without printing the console table:

```python
from uzbek_morph import analyze

data = analyze("Men kecha go'zal shahrimizga bordim", print_result=False)

for item in data:
    print(f"Word: {item['word']} | Lemma: {item['lemma']} | Tag: {item['tags']} | Source: {item['source']}")
```

---

## 📄 License & Author

**Author:** Ulugbek Salaev
Distributed under the **MIT License**.

---

*Note: Data schema adheres to UniMorph morphosyntactic specifications.*
