Skip to main content

Fidel / ፊደል

What is Fidel / ፊደል ?

Fidel is a Python package that can transliterate Latin characters to Geez characters and vice versa.

For example: abebe beso bela -> አበበ በሶ በላ

Dependencies

Installation

pip install fidel

Upgrade

pip install --upgrade fidel

Usage

Basic Usage

from fidel import Transliterate 
text = "bexam xru sew new"
translated = Transliterate(text).transliterate()
print(translated)

output

በጣም ጥሩ ሰው ነው

Autocorrect

from fidel import Transliterate 
text = "betam tiru sew nw"
translated = Transliterate(text=text, auto_correct=False).transliterate() # The default is False
corrected = Transliterate(text=text, auto_correct=True).transliterate()
print(f"Translated : {translated}")
print(f"Corrected: {corrected}")

output

Translated: በታም ቲሩ ሰው ንው
Corrected: በጣም ጥሩ ሰው ነው

Amharic Symbol

from fidel import Transliterate 
text = "abebe, kebede ena ayele bexam xru sew nachew."
symbol_true = Transliterate(text=text, symbol=True).transliterate() # The default is True
symbol_false = Transliterate(text=text, symbol=False).transliterate()
print(f"True symbol: {symbol_true}")
print(f"False symbol: {symbol_false}")

output

True symbol:  አበበ፣ ከበደ እና አየለ በጣም ጥሩ ሰው ናቸው።
False symbol: አበበ, ከበደ እና አየለ በጣም ጥሩ ሰው ናቸው.

Exclude words and Split words

Exclude words from being translated.

  • To prevent words from being translate, put the words inside "``"
from fidel import Transliterate
text = "`Alex` xru sew new"
transliterated = Transliterate(text).transliterate()
print(transliterated)

output

Alex ጥሩ ሰው ነው

Split words

  • To prevent words from being ዲቃላ (The eigth letters) we should put "|" between consonants.
from fidel import Transliterate
text = "ljtua t|sewer" # Without "|" the output is "ልጅቷ ጸወር"
transliterated = Transliterate(text).transliterate()
print(transliterated)

output

ልጅቷ ትሰወር

Reverse Translate

from fidel import Transliterate
text = "በጣም ጥሩ ሰው ነው።"
reversed = Transliterate(text, symbol=True).reverse_transliterate() # The default symbol value is True 
print(reversed)

output

betam xru sew new.

Rules

There are some rules that should be apply when writing a text.

  1. For 1st alphabets (ለግዕዝ) use "e" example: "le" - ለ
  2. For 2nd alphabets (ለካእብ) use "u" example: "lu" - ሉ
  3. For 3rd alphabets (ለሳልስ) use "i" example: "li" - ሊ
  4. For 4rh alphabets (ለራዕብ) use "a" example: "la" - ላ
  5. For 5th alphabets (ለሀምስ) use "ie" example: "lie" - ሌ
  6. For 6th alphabets (ለሳድስ) use only vowel example: "l" - ል
  7. For 7th alphabets (ለሳብዕ) use "o" example: "lo" - ሎ
  8. For 8th alphabets(ለዲቃላ ቃላት) use "ua" example: "ua" - ሏ

Note The above rules may be violated for some alphabets families. Check out ambiguous alphabets.

Ambiguous alphabets

ግዕዝ ካእብ ሳልስ ራዕብ ሀምስ ሳድስ ሳብዕ
ሀ ሁ ሂ ሀ ሄ ህ ሆ
ha hu hi ha hie h ho
አ ኡ ኢ ኣ ኤ እ ኦ
a u i a ie e o
ተ ቱ ቲ ታ ቴ ት ቶ
te tu ti ta tie t to
ጠ ጡ ጢ ጣ ጤ ጥ ጦ
xe xu xi xa xie x xo
ቸ ቹ ቺ ቻ ቼ ች ቾ
che chu chi cha chie ch cho
ጨ ጩ ጪ ጫ ጬ ጭ ጮ
ce cu ci ca cie c co
ጰ ጱ ጲ ጳ ጴ ጵ ጶ
phe phu phi pha phie ph pho
ፐ ፑ ፒ ፓ ፔ ፕ ፖ
pe pu pi pa pie p po

Addition

Alphabets ሸ ኘ ዥ ጸ
Prefix sh gn zh ts

Metadata

Release files for fidel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fidel 0.1.0
File Size Uploaded
fidel-0.1.0.tar.gz 296.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fidel 0.1.0
File Interpreter ABI Platform
fidel-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 594.6 kB

Release files / fidel-0.1.0.tar.gz

Download URL fidel-0.1.0.tar.gz
Size 296.1 kB
Tags Source
SHA-256 checksum
How to use checksums
686805832f6086d3b97881304ce3ccaa9e1de317d29dc0e72a1e26ff4a3b9a07
BLAKE2b-256 checksum
How to use checksums
5c38cc89c517e2a8c44f185898f3abefc67916423207920073528df1b8d7afbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / fidel-0.1.0-py3-none-any.whl

Download URL fidel-0.1.0-py3-none-any.whl
Size 298.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e5ae655444149bf5b54dadeabbfd190b4af07582d8a4fe9b13d12465147baaf
BLAKE2b-256 checksum
How to use checksums
d69ccb0bbfbed2c011d19cb723072558b9b38f75a5cfde1815a4124ffcd539b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

1 release file

0.0.6

1 release file

0.0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page