Skip to content

Latest commit

 

History

121 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kaalin

PyPI version Python License: MIT

A Python toolkit for the Karakalpak language. Zero dependencies, Python 3.10+.

Installation

pip install kaalin

Script Conversion

Bidirectional Latin ↔ Cyrillic conversion. Loanwords with special characters (ь, ъ, э, ё, щ) are handled automatically.

from kaalin.converter import latin2cyrillic, cyrillic2latin

latin2cyrillic("Assalawma áleykum")  # Ассалаўма әлейкум
cyrillic2latin("Ассалаўма әлейкум")  # Assalawma áleykum

# You can extend the built-in loanword dictionary with your own entries
latin2cyrillic("stilistika", custom_loanwords={"stilistika": "стилистика"})

Number to Words

Converts numbers to Karakalpak words. Supports integers, floats, and negatives up to 10³⁰.

from kaalin.number import to_word

to_word(123)                   # bir júz jigirma úsh
to_word(999, num_type="cyr")   # тоғыз жүз тоқсан тоғыз

Syllabification

Splits words into syllables. Works with both Latin and Cyrillic input.

from kaalin.syllable import syllabify

syllabify("qaraqalpaqstan")   # ['qa', 'ra', 'qal', 'paq', 'stan']
syllabify("Шарапат")          # ['Ша', 'ра', 'пат']

String Utilities

Karakalpak-aware upper() / lower() that correctly handle the dotless ıÍ pair.

from kaalin.string import upper, lower

upper("Assalawma áleykum")   # ASSALAWMA ÁLEYKUM
lower("ASSALAWMA ÁLEYKUM")   # assalawma áleykum

CLI

Convert text files between scripts from the terminal:

cyr2lat input.txt              # writes input-lat.txt
lat2cyr input.txt              # writes input-cyr.txt

License

MIT

About

Karakalpak language toolkit for Python — Latin/Cyrillic script conversion, number-to-words, and string utilities

Topics

Resources

Contributing

Stars

2 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages