fidel


Namefidel JSON
Version 0.0.10 PyPI version JSON
download
home_page
SummaryPython package that can change Amharic language that written in English alphabet to Amharic alphabet character.
upload_time2023-07-22 16:50:01
maintainer
docs_urlNone
authorNiftalem Yeneneh
requires_python
license
keywords python amharic english to amharic ethiopia translate fidel
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 change Amharic language that written in English alphabet to Amharic alphabet character. <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 Translate

text = "bexam xru sew new"

translated = Translate(text).translate()

print(translated)

```

output

```

በጣም ጥሩ ሰው ነው

```



### **Autocorrect**

``` python

from fidel import Translate

text = "betam tiru sew nw"

translated = Translate(text=text,autoCorrect=False).translate() # The default is False

corrected = Translate(text=text,autoCorrect=True).translate()

print(f"Translated : {translated}")

print(f"Corrected: {corrected}")



```

output

```

Translated : በታም ቲሩ ሰው ንው

Corrected: በጣም ጥሩ ሰው ነው

```

### **Amharic Symbol**

``` python 

from fidel import Translate

text = "abebe, kebede ena ayele bexam xru sew nachew."

symbol_true = Translate(text=text,symbol=True).translate() # The default is True

symbol_false = Translate(text=text,symbol=False).translate()

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 Translate

text = "`Alex` xru sew new"

translated = Translate(text).translate()

print(translated)



```

output

```

Alex ጥሩ ሰው ነው

```

**Split words**

- To prevent words from being ዲቃላ (The eigth letters) we should put "|" between consonants.

``` python

from fidel import Translate

text = "ljtua t|sewer" # Without "|" the output is "ልጅቷ ጸወር"

translated = Translate(text).translate()

print(translated)

```

output

```

ልጅቷ ትሰወር

```



### **Reverse Translate**

``` python

from fidel import Reverse

text = "በጣም ጥሩ ሰው ነው።"

reversed = Reverse(text, symbol=True) # The default symbol value is True 

print(reversed)

```

output

```

betam xru sew nw.

```





## **Rules** 

There are some **rules** that should be apply when writing the 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 violate for some alphabets family 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": "",
    "name": "fidel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,amharic,english to amharic,ethiopia,translate,fidel",
    "author": "Niftalem Yeneneh",
    "author_email": "ny.dev0.em@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5a/86/9fd9c22389fa73690ef55bf174a74948599e8ea8fcae6bd576bd0745ee9e/fidel-0.0.10.tar.gz",
    "platform": null,
    "description": "\r\n# **Fidel / \u134a\u12f0\u120d**\r\n\r\n## What is **Fidel / \u134a\u12f0\u120d** ?\r\n\r\n**Fidel** is a python package that can change Amharic language that written in English alphabet to Amharic alphabet character. <br>\r\n\r\n**| For example: abebe beso bela -> \u12a0\u1260\u1260 \u1260\u1236 \u1260\u120b**\r\n\r\n\r\n\r\n\r\n\r\n## **Dependencies**\r\n\r\n* [Symspellpy](https://github.com/mammothb/symspellpy)\r\n\r\n\r\n\r\n\r\n\r\n## **Installation** \r\n\r\n```\r\n\r\npip install fidel\r\n\r\n```\r\n\r\n## **Upgrade**\r\n\r\n```\r\n\r\npip install --upgrade fidel\r\n\r\n```\r\n\r\n#\r\n\r\n\r\n\r\n## **Usage**\r\n\r\n\r\n\r\n### **Basic Usage**\r\n\r\n``` python\r\n\r\nfrom fidel import Translate\r\n\r\ntext = \"bexam xru sew new\"\r\n\r\ntranslated = Translate(text).translate()\r\n\r\nprint(translated)\r\n\r\n```\r\n\r\noutput\r\n\r\n```\r\n\r\n\u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1290\u12cd\r\n\r\n```\r\n\r\n\r\n\r\n### **Autocorrect**\r\n\r\n``` python\r\n\r\nfrom fidel import Translate\r\n\r\ntext = \"betam tiru sew nw\"\r\n\r\ntranslated = Translate(text=text,autoCorrect=False).translate() # The default is False\r\n\r\ncorrected = Translate(text=text,autoCorrect=True).translate()\r\n\r\nprint(f\"Translated : {translated}\")\r\n\r\nprint(f\"Corrected: {corrected}\")\r\n\r\n\r\n\r\n```\r\n\r\noutput\r\n\r\n```\r\n\r\nTranslated : \u1260\u1273\u121d \u1272\u1229 \u1230\u12cd \u1295\u12cd\r\n\r\nCorrected: \u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1290\u12cd\r\n\r\n```\r\n\r\n### **Amharic Symbol**\r\n\r\n``` python \r\n\r\nfrom fidel import Translate\r\n\r\ntext = \"abebe, kebede ena ayele bexam xru sew nachew.\"\r\n\r\nsymbol_true = Translate(text=text,symbol=True).translate() # The default is True\r\n\r\nsymbol_false = Translate(text=text,symbol=False).translate()\r\n\r\nprint(f\"True symbol: {symbol_true}\")\r\n\r\nprint(f\"False symbol: {symbol_false}\")\r\n\r\n```\r\n\r\noutput\r\n\r\n```\r\n\r\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\r\n\r\nFalse symbol: \u12a0\u1260\u1260, \u12a8\u1260\u12f0 \u12a5\u1293 \u12a0\u12e8\u1208 \u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1293\u1278\u12cd.\r\n\r\n```\r\n\r\n### **Exclude words** and **split words**\r\n\r\n**Exclude words** from being translated.\r\n\r\n- To prevent words from being translate, put the words inside \"``\" \r\n\r\n``` python\r\n\r\nfrom fidel import Translate\r\n\r\ntext = \"`Alex` xru sew new\"\r\n\r\ntranslated = Translate(text).translate()\r\n\r\nprint(translated)\r\n\r\n\r\n\r\n```\r\n\r\noutput\r\n\r\n```\r\n\r\nAlex \u1325\u1229 \u1230\u12cd \u1290\u12cd\r\n\r\n```\r\n\r\n**Split words**\r\n\r\n- To prevent words from being \u12f2\u1243\u120b (The eigth letters) we should put \"|\" between consonants.\r\n\r\n``` python\r\n\r\nfrom fidel import Translate\r\n\r\ntext = \"ljtua t|sewer\" # Without \"|\" the output is \"\u120d\u1305\u1277 \u1338\u12c8\u122d\"\r\n\r\ntranslated = Translate(text).translate()\r\n\r\nprint(translated)\r\n\r\n```\r\n\r\noutput\r\n\r\n```\r\n\r\n\u120d\u1305\u1277 \u1275\u1230\u12c8\u122d\r\n\r\n```\r\n\r\n\r\n\r\n### **Reverse Translate**\r\n\r\n``` python\r\n\r\nfrom fidel import Reverse\r\n\r\ntext = \"\u1260\u1323\u121d \u1325\u1229 \u1230\u12cd \u1290\u12cd\u1362\"\r\n\r\nreversed = Reverse(text, symbol=True) # The default symbol value is True \r\n\r\nprint(reversed)\r\n\r\n```\r\n\r\noutput\r\n\r\n```\r\n\r\nbetam xru sew nw.\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n## **Rules** \r\n\r\nThere are some **rules** that should be apply when writing the text.\r\n\r\n 1. For **1st alphabets (\u1208\u130d\u12d5\u12dd)** use \"e\" example: \"le\" - \u1208\r\n\r\n 2. For **2nd alphabets (\u1208\u12ab\u12a5\u1265)** use \"u\" example: \"lu\" - \u1209\r\n\r\n 3. For **3rd alphabets (\u1208\u1233\u120d\u1235)** use \"i\" example: \"li\" - \u120a\r\n\r\n 4. For **4rh alphabets (\u1208\u122b\u12d5\u1265)** use \"a\" example: \"la\" - \u120b\r\n\r\n 5. For **5th alphabets (\u1208\u1200\u121d\u1235)** use \"ie\" example: \"lie\" - \u120c\r\n\r\n 6. For **6th alphabets (\u1208\u1233\u12f5\u1235)** use only vowel example: \"l\" - \u120d\r\n\r\n 7. For **7th alphabets (\u1208\u1233\u1265\u12d5)** use \"o\" example: \"lo\" - \u120e\r\n\r\n 8. For **8th alphabets(\u1208\u12f2\u1243\u120b \u1243\u120b\u1275)** use \"ua\" example: \"ua\" -  \u120f \r\n\r\n\r\n\r\n**Note** The above rules may violate for some alphabets family check out ambiguous alphabets.\r\n\r\n## **Ambiguous alphabets**\r\n\r\n\r\n\r\n| \u130d\u12d5\u12dd | \u12ab\u12a5\u1265 | \u1233\u120d\u1235 | \u122b\u12d5\u1265 | \u1200\u121d\u1235 | \u1233\u12f5\u1235 | \u1233\u1265\u12d5 |\r\n\r\n|-----|-----|-----|-----|------|-----|-----|\r\n\r\n|  **\u1200**  |  **\u1201**  |  **\u1202**  |  **\u1200**  |  **\u1204**   |  **\u1205**  |  **\u1206**  |\r\n\r\n| ha  | hu  | hi  | ha  | hie  |  h  |  ho |\r\n\r\n|  **\u12a0**  |  **\u12a1**  |  **\u12a2**  |  **\u12a3**  |  **\u12a4**   |  **\u12a5**  |  **\u12a6**  |\r\n\r\n|  a  |  u  |  i  |  a   |  ie  |  e  |  o  |\r\n\r\n|  **\u1270**  |  **\u1271**  |  **\u1272**  |  **\u1273**  |  **\u1274**   |  **\u1275**  |  **\u1276**  |\r\n\r\n|  te |  tu  |  ti  |  ta  |  tie   |  t  |  to  |\r\n\r\n|  **\u1320**  |  **\u1321**  |  **\u1322** | **\u1323**  |  **\u1324**   |  **\u1325**  |  **\u1326**  |\r\n\r\n|  xe  |  xu  |  xi  |  xa  |  xie   |  x  |  xo  |\r\n\r\n|  **\u1278**  | **\u1279**  |  **\u127a**  |  **\u127b**  |  **\u127c**   |  **\u127d**  |  **\u127e**  |\r\n\r\n|  che  |  chu  |  chi  |  cha  |  chie   |  ch  |  cho  |\r\n\r\n|  **\u1328**  |  **\u1329** |  **\u132a**  |  **\u132b**  |  **\u132c**   | **\u132d** |  **\u132e**  |\r\n\r\n|  ce  |  cu  |  ci  |  ca  |  cie   |  c  |  co  |\r\n\r\n|  **\u1330**  |  **\u1331**  |  **\u1332**  |  **\u1333**  |  **\u1334**   |  **\u1335**  |  **\u1336**  |\r\n\r\n|  phe  |  phu  |  phi  |  pha  |  phie   |  ph  |  pho  |\r\n\r\n|  **\u1350**  |  **\u1351**  |  **\u1352**  |  **\u1353**  |  **\u1354**   |  **\u1355**  |  **\u1356**  |\r\n\r\n|  pe  |  pu |  pi  |  pa  |  pie   |  p  |  po  |\r\n\r\n\r\n\r\n**Addition** <br>\r\n\r\n|Alphabets |\u1238| \u1298| \u12e5| \u1338| \r\n\r\n|-----|-----|-----|-----|------|\r\n\r\n|Prefix |sh |gn |zh| ts|\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python package that can change Amharic language that written in English alphabet to Amharic alphabet character.",
    "version": "0.0.10",
    "project_urls": null,
    "split_keywords": [
        "python",
        "amharic",
        "english to amharic",
        "ethiopia",
        "translate",
        "fidel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6141e24bbf9747cba927970d95d3aad24d594933ce86a238119fddcfbb48cd39",
                "md5": "f64229319cf96203b198ae507af08431",
                "sha256": "db3b8355d273511f9202b917101a6d70100c2cb4c6b81fe79da4fe23041bdbda"
            },
            "downloads": -1,
            "filename": "fidel-0.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f64229319cf96203b198ae507af08431",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 303253,
            "upload_time": "2023-07-22T16:49:58",
            "upload_time_iso_8601": "2023-07-22T16:49:58.449899Z",
            "url": "https://files.pythonhosted.org/packages/61/41/e24bbf9747cba927970d95d3aad24d594933ce86a238119fddcfbb48cd39/fidel-0.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a869fd9c22389fa73690ef55bf174a74948599e8ea8fcae6bd576bd0745ee9e",
                "md5": "9596816c965cb69a65a1bf54b4008793",
                "sha256": "910ac22010a979d6211ec141caedd5f338bf9a450ca7a5fb4037ba911bcd2901"
            },
            "downloads": -1,
            "filename": "fidel-0.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "9596816c965cb69a65a1bf54b4008793",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 301861,
            "upload_time": "2023-07-22T16:50:01",
            "upload_time_iso_8601": "2023-07-22T16:50:01.958984Z",
            "url": "https://files.pythonhosted.org/packages/5a/86/9fd9c22389fa73690ef55bf174a74948599e8ea8fcae6bd576bd0745ee9e/fidel-0.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-22 16:50:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fidel"
}
        
Elapsed time: 0.10534s