A package to normalize Livonian orthography
Project description
NormLiv
NormLiv is a Python package which quickly normalizes Livonian orthographies based on the chosen standard. It focuses on Unicode normalization to avoid confusions between diacritics and codes.
Properties
Settings below are the default. They can be manually disabled:
- Removes the broken tone
- Replaces the vowels ǭ, y, ȳ, ü, ǖ
- Palatalized letters are normalized as described below
- Uses a Normalization Form Canonical Composition (NFC) Unicode transcription, where all combinable codepoints are composed.
Warning ! Because of the NFC conversion, some other characters might be affected. See more details here
Palatals
Latvian and Livonian palatalized consonants are written with a comma below or above. However, when Latvian (and Livonian) needed to be represented as codepoints in the 90s, the first unicode standard used characters labelled "with cedilla", although they are represented with a comma. Nowadays, the cedilla is still used but displayed as a comma for most consonants except t. The solution adopted here is the following:
- Replace cedilla by comma for t
- Replace comma by cedilla for other consonants.
The use of the comma (the only correct representation) can be enforced. See more on this issue:
- https://www.unicode.org/L2/L2013/13155r-cedilla-comma.pdf
- https://en.wikipedia.org/wiki/Cedilla
- http://diacritics.typo.cz/index.php?id=9
Technical stuff
Install
NormLiv is available through the PyPi repositories and can be installed via:
pip install normliv
Usage
from normliv import normalize
text = '...'
print(normalize(text))
Custom parameters
Parameters for the normalize function:
- text (str): The string to transliterate.
- tone (bool): Whether the tone should be kept. Defaults to False.
- eastern (bool): Whether the distinction between ǭ and ō should be kept. Defaults to False
- rounded (bool): Whether the y/ü and ö should be kept. Defaults to False.
- convention (str): Unicode convention to use. One of:
- NFC (Composed, default)
- NFD (Decomposed).
TODO
- Handle caps
- More options for custom transcriptions
- More tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file normliv-0.1.0.tar.gz.
File metadata
- Download URL: normliv-0.1.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a2784014bac017d3471be9612bd85220d5682346f4b6baacf935e2370ca97a0
|
|
| MD5 |
4eb515fdb43d490be750649c1060abf8
|
|
| BLAKE2b-256 |
ac349f7f8fa67564fe43dd2175d4949a5d2347e6a69055358debe4429cc744f1
|
File details
Details for the file normliv-0.1.0-py3-none-any.whl.
File metadata
- Download URL: normliv-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b4e1fc6ccf229f586cc84279aa795ff2a9528201f7b0bd6462f37af50e109c
|
|
| MD5 |
cd537c7c34dbacb360a2f1bacb63f077
|
|
| BLAKE2b-256 |
c1cd651f7828718afc0d2da299af08dbb0a1e86aec524df2a9257bf87924e840
|