uznltk 0.0.14
The Uzbek Natural Language Toolkit (NLTK) is a Python package for natural language processing.
License: MIT
Requires Python: >=3.7
Keywords: nltk, morphology, uzbek-language, pos tagging, morphological tagging

# uznltk

**uznltk** — is a lightweight and convenient NLP (Natural Language Processing) library for the Uzbek language. It includes text cleaning, morphological analysis, number and text conversions, syllable splitting, and many other functions.

## 🔗 Links

- [PyPI page](https://pypi.org/project/uznltk)
- [GitHub page](https://github.com/UlugbekSalaev/uznltk)

## 👤 Authors

- **Salaev Ulug'bek** – ulugbek0302@gmail.com
- **Omanov Jasur** – jasuromonov77@gmail.com
- **Zaripboyev Ollabergan** – dewel000per@gmail.com

## 🔧 Install

```bash
pip install uznltk
```

## 🚀 Usage

```python
from uznltk import *
```

## 📚 Functions

### `clean_text(text)`

Corrects characters specific to the Uzbek language (g', o', ( ’ )).

```python
clean_text("O'zbekistonda ta'lim kuchli rivojlanmoqda")
# Result: "O‘zbekistonda ta’lim kuchli rivojlanmoqda"
```

---

### `solid_sign(text)`

Returns words with a ( ’ ) character as a list.

```python
solid_sign("ta'lim bo'lishi oldindan ma'lum edi")
# Result: ['ta’lim', 'ma’lum']
```

---

### `lemmatize(text)` and `stem_word(text)`

Extracts the stem of a word.

```python
lemmatize("mexanizatorlashtirilganlardan")
# Result: "mexanizatorlashtirilgan"
```

---

### `number_to_text(number)`

Converts a number to Uzbek text.

```python
number_to_text(54)
# Result: "ellik to‘rt"
```

---

### `text_to_number(text)`

Converts a number in text to numeric form.

```python
text_to_number("yetmish olti")
# Result: 76
```

---

### `download(name)`

Downloads various resources (e.g. books, news).

```python
download("book")
```

---

### `clean_stopword(text)`

Removes stop words from the text.

```python
clean_stopword("salom dunyo, biz sen va u bilan bugun maktabga bordik")
# Result: "salom dunyo, bugun maktabga bordik"
```

---

### `syllables(text)`

Divides words into syllables.

```python
syllables("Bizga ma’lum ishlar yuz bermoqda!")
# Result: ['Biz-ga', 'ma’-lum', 'ish-lar', 'yuz', 'ber-moq-da!']
```

---

### `hyphenation(text)`

Each word is divided into syllables and presented in a list.

```python
hyphenation("salom dunyo")
# Result: ['sa-lom dunyo', 'salom dun-yo']
```

---

### `count_syllable(text)`

Counts the number of syllables in the text.

```python
count_syllable("Salom Dunyo")
# Result: 4
```

---

### `count_text(text)`

Counts the number of words in the text.

```python
count_text("Salom Dunyo")
# Result: 2
```

---

### `split_sentences(text)`

Sorts the sentences in the text into lists.

```python
split_sentences("Salom Dunyo. Bugun ob-havo qisman bulutli")
# Result: ['Salom Dunyo', 'Bugun ob-havo qisman bulutli']
```

---

### `split_words(text)`

Extracts only words from the text (without IP, email, emoji, URLs) into a list.

```python
split_words("sen 192.168.1.18 va helloworld@example.com elektron manzilidasan. Manba https://pypi.org")
# Result: ['sen', 'va', 'elektron', 'manzilidasan', 'Manba']
```

---

## 💡 Information

- The library is entirely designed for **the Uzbek language**.
- It includes basic NLP components such as number processing, lemmatization, and syntacticization.