fidel


Namefidel JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython package that translite Geez character to Latin character and vice versa.
upload_time2024-09-17 17:33:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords amharic english to amharic ethiopia fidel python translate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **Fidel / ፊደል**
## What is **Fidel / ፊደል** ?
**Fidel** is a Python package that can transliterate Latin characters to Geez characters and vice versa. <br>
> **For example: abebe beso bela -> አበበ በሶ በላ**


## **Dependencies**
* [Symspellpy](https://github.com/mammothb/symspellpy)


## **Installation** 
```
pip install fidel
```
## **Upgrade**
```
pip install --upgrade fidel
```
#

## **Usage**

### **Basic Usage**
``` python
from fidel import Transliterate 
text = "bexam xru sew new"
translated = Transliterate(text).transliterate()
print(translated)
```
output
```
በጣም ጥሩ ሰው ነው
```

### **Autocorrect**
``` python
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**
``` python 
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 "``" 
``` python
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.
``` python
from fidel import Transliterate
text = "ljtua t|sewer" # Without "|" the output is "ልጅቷ ጸወር"
transliterated = Transliterate(text).transliterate()
print(transliterated)
```
output
```
ልጅቷ ትሰወር
```

### **Reverse Translate**
``` python
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** <br>
|Alphabets |ሸ| ኘ| ዥ| ጸ| 
|-----|-----|-----|-----|------|
|Prefix |sh |gn |zh| ts|

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fidel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "amharic, english to amharic, ethiopia, fidel, python, translate",
    "author": null,
    "author_email": "ny <ny.dev0.em@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/5c/38/cc89c517e2a8c44f185898f3abefc67916423207920073528df1b8d7afbc/fidel-0.1.0.tar.gz",
    "platform": null,
    "description": "# **Fidel / \u134a\u12f0\u120d**\n## What is **Fidel / \u134a\u12f0\u120d** ?\n**Fidel** is a Python package that can transliterate Latin characters to Geez characters and vice versa. <br>\n> **For example: abebe beso bela -> \u12a0\u1260\u1260 \u1260\u1236 \u1260\u120b**\n\n\n## **Dependencies**\n* [Symspellpy](https://github.com/mammothb/symspellpy)\n\n\n## **Installation** \n```\npip install fidel\n```\n## **Upgrade**\n```\npip install --upgrade fidel\n```\n#\n\n## **Usage**\n\n### **Basic Usage**\n``` python\nfrom fidel import Transliterate \ntext = \"bexam xru sew new\"\ntranslated = Transliterate(text).transliterate()\nprint(translated)\n```\noutput\n```\n\u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1290\u12cd\n```\n\n### **Autocorrect**\n``` python\nfrom fidel import Transliterate \ntext = \"betam tiru sew nw\"\ntranslated = Transliterate(text=text, auto_correct=False).transliterate() # The default is False\ncorrected = Transliterate(text=text, auto_correct=True).transliterate()\nprint(f\"Translated : {translated}\")\nprint(f\"Corrected: {corrected}\")\n\n```\noutput\n```\nTranslated: \u1260\u1273\u121d \u1272\u1229 \u1230\u12cd \u1295\u12cd\nCorrected: \u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1290\u12cd\n```\n### **Amharic Symbol**\n``` python \nfrom fidel import Transliterate \ntext = \"abebe, kebede ena ayele bexam xru sew nachew.\"\nsymbol_true = Transliterate(text=text, symbol=True).transliterate() # The default is True\nsymbol_false = Transliterate(text=text, symbol=False).transliterate()\nprint(f\"True symbol: {symbol_true}\")\nprint(f\"False symbol: {symbol_false}\")\n```\noutput\n```\nTrue symbol:  \u12a0\u1260\u1260\u1363 \u12a8\u1260\u12f0 \u12a5\u1293 \u12a0\u12e8\u1208 \u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1293\u1278\u12cd\u1362\nFalse symbol: \u12a0\u1260\u1260, \u12a8\u1260\u12f0 \u12a5\u1293 \u12a0\u12e8\u1208 \u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1293\u1278\u12cd.\n```\n### **Exclude words** and **Split words**\n**Exclude words** from being translated.\n- To prevent words from being translate, put the words inside \"``\" \n``` python\nfrom fidel import Transliterate\ntext = \"`Alex` xru sew new\"\ntransliterated = Transliterate(text).transliterate()\nprint(transliterated)\n\n```\noutput\n```\nAlex \u1325\u1229 \u1230\u12cd \u1290\u12cd\n```\n**Split words**\n- To prevent words from being \u12f2\u1243\u120b (The eigth letters) we should put \"|\" between consonants.\n``` python\nfrom fidel import Transliterate\ntext = \"ljtua t|sewer\" # Without \"|\" the output is \"\u120d\u1305\u1277 \u1338\u12c8\u122d\"\ntransliterated = Transliterate(text).transliterate()\nprint(transliterated)\n```\noutput\n```\n\u120d\u1305\u1277 \u1275\u1230\u12c8\u122d\n```\n\n### **Reverse Translate**\n``` python\nfrom fidel import Transliterate\ntext = \"\u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1290\u12cd\u1362\"\nreversed = Transliterate(text, symbol=True).reverse_transliterate() # The default symbol value is True \nprint(reversed)\n```\noutput\n```\nbetam xru sew new.\n```\n\n## **Rules** \nThere are some **rules** that should be apply when writing a text.\n 1. For **1st alphabets (\u1208\u130d\u12d5\u12dd)** use \"e\" example: \"le\" - \u1208\n 2. For **2nd alphabets (\u1208\u12ab\u12a5\u1265)** use \"u\" example: \"lu\" - \u1209\n 3. For **3rd alphabets (\u1208\u1233\u120d\u1235)** use \"i\" example: \"li\" - \u120a\n 4. For **4rh alphabets (\u1208\u122b\u12d5\u1265)** use \"a\" example: \"la\" - \u120b\n 5. For **5th alphabets (\u1208\u1200\u121d\u1235)** use \"ie\" example: \"lie\" - \u120c\n 6. For **6th alphabets (\u1208\u1233\u12f5\u1235)** use only vowel example: \"l\" - \u120d\n 7. For **7th alphabets (\u1208\u1233\u1265\u12d5)** use \"o\" example: \"lo\" - \u120e\n 8. For **8th alphabets(\u1208\u12f2\u1243\u120b \u1243\u120b\u1275)** use \"ua\" example: \"ua\" -  \u120f \n\n**Note** The above rules may be violated for some alphabets families. Check out ambiguous alphabets.\n## **Ambiguous alphabets**\n\n| \u130d\u12d5\u12dd | \u12ab\u12a5\u1265 | \u1233\u120d\u1235 | \u122b\u12d5\u1265 | \u1200\u121d\u1235 | \u1233\u12f5\u1235 | \u1233\u1265\u12d5 |\n|-----|-----|-----|-----|------|-----|-----|\n|  **\u1200**  |  **\u1201**  |  **\u1202**  |  **\u1200**  |  **\u1204**   |  **\u1205**  |  **\u1206**  |\n| ha  | hu  | hi  | ha  | hie  |  h  |  ho |\n|  **\u12a0**  |  **\u12a1**  |  **\u12a2**  |  **\u12a3**  |  **\u12a4**   |  **\u12a5**  |  **\u12a6**  |\n|  a  |  u  |  i  |  a   |  ie  |  e  |  o  |\n|  **\u1270**  |  **\u1271**  |  **\u1272**  |  **\u1273**  |  **\u1274**   |  **\u1275**  |  **\u1276**  |\n|  te |  tu  |  ti  |  ta  |  tie   |  t  |  to  |\n|  **\u1320**  |  **\u1321**  |  **\u1322** | **\u1323**  |  **\u1324**   |  **\u1325**  |  **\u1326**  |\n|  xe  |  xu  |  xi  |  xa  |  xie   |  x  |  xo  |\n|  **\u1278**  | **\u1279**  |  **\u127a**  |  **\u127b**  |  **\u127c**   |  **\u127d**  |  **\u127e**  |\n|  che  |  chu  |  chi  |  cha  |  chie   |  ch  |  cho  |\n|  **\u1328**  |  **\u1329** |  **\u132a**  |  **\u132b**  |  **\u132c**   | **\u132d** |  **\u132e**  |\n|  ce  |  cu  |  ci  |  ca  |  cie   |  c  |  co  |\n|  **\u1330**  |  **\u1331**  |  **\u1332**  |  **\u1333**  |  **\u1334**   |  **\u1335**  |  **\u1336**  |\n|  phe  |  phu  |  phi  |  pha  |  phie   |  ph  |  pho  |\n|  **\u1350**  |  **\u1351**  |  **\u1352**  |  **\u1353**  |  **\u1354**   |  **\u1355**  |  **\u1356**  |\n|  pe  |  pu |  pi  |  pa  |  pie   |  p  |  po  |\n\n**Addition** <br>\n|Alphabets |\u1238| \u1298| \u12e5| \u1338| \n|-----|-----|-----|-----|------|\n|Prefix |sh |gn |zh| ts|\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python package that translite Geez character to Latin character and vice versa.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/nypava/Fidel",
        "Repository": "https://github.com/nypava/Fidel"
    },
    "split_keywords": [
        "amharic",
        " english to amharic",
        " ethiopia",
        " fidel",
        " python",
        " translate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d69ccb0bbfbed2c011d19cb723072558b9b38f75a5cfde1815a4124ffcd539b9",
                "md5": "88a2655057726f536bc3ae61af85e143",
                "sha256": "6e5ae655444149bf5b54dadeabbfd190b4af07582d8a4fe9b13d12465147baaf"
            },
            "downloads": -1,
            "filename": "fidel-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88a2655057726f536bc3ae61af85e143",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 298416,
            "upload_time": "2024-09-17T17:33:05",
            "upload_time_iso_8601": "2024-09-17T17:33:05.857939Z",
            "url": "https://files.pythonhosted.org/packages/d6/9c/cb0bbfbed2c011d19cb723072558b9b38f75a5cfde1815a4124ffcd539b9/fidel-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c38cc89c517e2a8c44f185898f3abefc67916423207920073528df1b8d7afbc",
                "md5": "7a431a382ede61796248aabbc41d06fd",
                "sha256": "686805832f6086d3b97881304ce3ccaa9e1de317d29dc0e72a1e26ff4a3b9a07"
            },
            "downloads": -1,
            "filename": "fidel-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7a431a382ede61796248aabbc41d06fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 296146,
            "upload_time": "2024-09-17T17:33:09",
            "upload_time_iso_8601": "2024-09-17T17:33:09.263471Z",
            "url": "https://files.pythonhosted.org/packages/5c/38/cc89c517e2a8c44f185898f3abefc67916423207920073528df1b8d7afbc/fidel-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-17 17:33:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nypava",
    "github_project": "Fidel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fidel"
}
        
Elapsed time: 4.53263s