Metadata-Version: 2.4
Name: uzmorph
Version: 1.1.8
Summary: A rule-based morphological analyzer for the Uzbek language based on CSE (Complete Set of Endings) and annotated morphological tags
Home-page: https://github.com/UlugbekSalaev/uzmorph
Author: Ulugbek Salaev
Author-email: ulugbek.salaev@urdu.uz
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-python
Dynamic: summary

# uzmorph - Uzbek Rule-based Morphological Analyzer using CSE

**uzmorph** is a professional morphological analyzer for the Uzbek language based on **CSE (Complete Set of Endings)** rules and comprehensive morphological tagging. It provides deep linguistic analysis by identifying stems, lemmas, and a wide array of annotated morphological features.

You can try the live demo here: [Hugging Face Space](https://huggingface.co/spaces/ulugbeksalaev/uzmorph)

## Key Features

- **CSE-Based Analysis:** Employs advanced suffix stripping rules (**Complete Set of Endings**) for precise morphological segmentation.
- **Rich Morphological Tagging:** Extracts detailed features including part-of-speech (POS), tense, person, possession, case, and voice.
- **Flat JSON Output:** Returns analysis results in a developer-friendly, flattened JSON-compatible format.

## Installation

```bash
pip install uzmorph
```

## Quick Start

```python
from uzmorph import UzMorph

# Initialize the analyzer
analyzer = UzMorph()

# Analyze a word
results = analyzer.analyze("maktabimda")

# Formatted console print
analyzer.print_result(results)
```

## JSON Result Sample

Each analysis result is a dictionary containing the following structure:

```json
[
    {
        "word": "maktabimda",
        "stem": "maktab",
        "lemma": "maktab",
        "cse": "imda",
        "cse_formula": "(i)mda",
        "pos": "NOUN",
        "possession": "1",
        "cases": "Locative",
        "singular": "1",
        "syntactical_affixes": "(i)m da",
        "note": null,
        "ball": 108
    }
]
```

## API Reference

### `UzMorph` Class
- `analyze(word, pos_filter=None)`: Performs morphological analysis and returns a list of results.
- `print_result(results)`: Prints formatted output to the console.
- `get_pos_list()`: Returns a formatted string of all available POS tags.
- `get_features_list()`: Returns a list of all possible property keys in the result.

## License
MIT
