**Sabi** - Translate plain English to Naija pidgin
===================================================
A simple module to translate plain English to Nigerian (Naija) pidgin English.
I had been planning on writing a Python package (academic reasons) and had been researching.
Then I encountered *arrr.py* while doing some Python study - so I decided, why not? And the result? na you *SABI*.
There is the pidginUNMT project, which is more than capable for the job, but then - there's numpy and there's pandas.
*sabi - tok like sabi pesin*
Installation
------------
To install using pip, run:
.. code-block:: shell
$ pip install sabi
Usage Example
--------------
Here are some examples of how to use the `sabi` package:
- **A simple translation**
.. code-block:: python
from sabi import translate
text = "Hello World"
pidgin = translate(text)
print(pidgin)
- **Translating from a file into another file**
.. code-block:: python
from sabi import Translator
with Translator('english.txt', 'pidgin.txt', ajasa=False) as translated:
if translated is True:
print('Translated!')
- **Using a decorator**
.. code-block:: python
from sabi import translator
@translator(ajasa=True)
def word(text: str) -> str:
return text
word("How are you")
*Trivial right? Uuugh! I know.*
Command-line Usage
-------------------
After installing `sabi`, you can run it from your shell as follows:
- **Translate text**
.. code-block:: shell
$ sabi --oyinbo 'how are you'
This command will translate the text *how are you* into its pidgin equivalent.
- **Translate a file**
.. code-block:: shell
$ sabi --long-tok english.txt --out-file pidgin.txt
This command translates the entire file `english.txt` located in the current working directory.
- **Help text**
To print the help text, use:
.. code-block:: shell
$ sabi -h
$ sabi --help
And for a more `sabi boi` help text, use:
.. code-block:: shell
$ sabi
Contribution
------------
This project is still quite buggy and is under active development. Contributing to this project would be greatly appreciated. Currently, there are no codes of conduct (working on it).
The source code for this project is hosted on GitHub: `<https://github.com/techkaduna/sabi>`_. Everyone is free to contribute, and I'd really appreciate it.
Authors
--------
- Kolawole Olalekan (`andrewolakola@gmail.com`)
Release History
===============
0.0.1
=====
* Initial Release.
0.1.1
=====
* Sabi boy don land: sabi package was published.
0.1.2
=====
* Added more sabi boi tunes.
* Added output file as a Translator context manager parameter.
* Added tests.
* Fixed installation requirements bugs.
0.1.3
=====
* Added some more sabi boi tunes, removed some ambigious ones.
* Fixed the actual install_requires *'slip-of-the-mind'*.
* Handled error with *sability*.
* Added version arguments.
Raw data
{
"_id": null,
"home_page": "https://github.com/techkaduna/sabi",
"name": "sabi",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Kolawole Andrew",
"author_email": "andrewolakola@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/01/d0/ad2d838cfa7c274fc40c4ae51db3721c544b4cc3e46be2b9561cd30b0cf1/sabi-0.1.3.tar.gz",
"platform": null,
"description": "**Sabi** - Translate plain English to Naija pidgin\r\n===================================================\r\n\r\nA simple module to translate plain English to Nigerian (Naija) pidgin English.\r\n\r\nI had been planning on writing a Python package (academic reasons) and had been researching.\r\nThen I encountered *arrr.py* while doing some Python study - so I decided, why not? And the result? na you *SABI*.\r\n\r\nThere is the pidginUNMT project, which is more than capable for the job, but then - there's numpy and there's pandas.\r\n\r\n*sabi - tok like sabi pesin*\r\n\r\nInstallation\r\n------------\r\n\r\nTo install using pip, run:\r\n\r\n .. code-block:: shell\r\n\r\n $ pip install sabi\r\n\r\nUsage Example\r\n--------------\r\n\r\nHere are some examples of how to use the `sabi` package:\r\n\r\n- **A simple translation**\r\n\r\n .. code-block:: python\r\n\r\n from sabi import translate\r\n\r\n text = \"Hello World\"\r\n pidgin = translate(text)\r\n print(pidgin)\r\n\r\n- **Translating from a file into another file**\r\n\r\n .. code-block:: python\r\n\r\n from sabi import Translator\r\n\r\n with Translator('english.txt', 'pidgin.txt', ajasa=False) as translated:\r\n if translated is True:\r\n print('Translated!')\r\n\r\n- **Using a decorator**\r\n\r\n .. code-block:: python\r\n\r\n from sabi import translator\r\n\r\n @translator(ajasa=True)\r\n def word(text: str) -> str:\r\n return text\r\n\r\n word(\"How are you\")\r\n\r\n*Trivial right? Uuugh! I know.*\r\n\r\nCommand-line Usage\r\n-------------------\r\n\r\nAfter installing `sabi`, you can run it from your shell as follows:\r\n\r\n- **Translate text**\r\n\r\n .. code-block:: shell\r\n\r\n $ sabi --oyinbo 'how are you'\r\n\r\n This command will translate the text *how are you* into its pidgin equivalent.\r\n\r\n- **Translate a file**\r\n\r\n .. code-block:: shell\r\n\r\n $ sabi --long-tok english.txt --out-file pidgin.txt\r\n\r\n This command translates the entire file `english.txt` located in the current working directory.\r\n\r\n- **Help text**\r\n\r\n To print the help text, use:\r\n\r\n .. code-block:: shell\r\n\r\n $ sabi -h\r\n $ sabi --help\r\n\r\n And for a more `sabi boi` help text, use:\r\n\r\n .. code-block:: shell\r\n\r\n $ sabi\r\n\r\nContribution\r\n------------\r\n\r\nThis project is still quite buggy and is under active development. Contributing to this project would be greatly appreciated. Currently, there are no codes of conduct (working on it).\r\n\r\nThe source code for this project is hosted on GitHub: `<https://github.com/techkaduna/sabi>`_. Everyone is free to contribute, and I'd really appreciate it.\r\n\r\nAuthors\r\n--------\r\n\r\n- Kolawole Olalekan (`andrewolakola@gmail.com`)\r\n\r\n\r\nRelease History\r\n===============\r\n\r\n0.0.1\r\n=====\r\n\r\n* Initial Release.\r\n\r\n0.1.1\r\n=====\r\n\r\n* Sabi boy don land: sabi package was published.\r\n\r\n0.1.2\r\n=====\r\n\r\n* Added more sabi boi tunes.\r\n* Added output file as a Translator context manager parameter.\r\n* Added tests.\r\n* Fixed installation requirements bugs.\r\n\r\n0.1.3\r\n=====\r\n\r\n* Added some more sabi boi tunes, removed some ambigious ones.\r\n* Fixed the actual install_requires *'slip-of-the-mind'*.\r\n* Handled error with *sability*.\r\n* Added version arguments.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple module to translate plain English to Nigerian (Naija) pidgin English.",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/techkaduna/sabi"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f9eac318e3ed731788b5dfd3cc9f29a3f4c6df42fcc0d6599e3ab4491bbff24",
"md5": "11f0bed0dd2f1cca6c212770f5f9a6b7",
"sha256": "d3423d4efaff67a89a4471d923841bec8d1f1c6f10cdc86cc558c5fbdd987678"
},
"downloads": -1,
"filename": "sabi-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "11f0bed0dd2f1cca6c212770f5f9a6b7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6922,
"upload_time": "2024-08-29T13:29:03",
"upload_time_iso_8601": "2024-08-29T13:29:03.048518Z",
"url": "https://files.pythonhosted.org/packages/6f/9e/ac318e3ed731788b5dfd3cc9f29a3f4c6df42fcc0d6599e3ab4491bbff24/sabi-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "01d0ad2d838cfa7c274fc40c4ae51db3721c544b4cc3e46be2b9561cd30b0cf1",
"md5": "50a5df9396a52f477b52d1f1adf315e3",
"sha256": "c646b684a7ec5c63db363d23471c1aad11eb23ba1b78ed5624ba6011d0ff4965"
},
"downloads": -1,
"filename": "sabi-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "50a5df9396a52f477b52d1f1adf315e3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6628,
"upload_time": "2024-08-29T13:29:05",
"upload_time_iso_8601": "2024-08-29T13:29:05.149212Z",
"url": "https://files.pythonhosted.org/packages/01/d0/ad2d838cfa7c274fc40c4ae51db3721c544b4cc3e46be2b9561cd30b0cf1/sabi-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-29 13:29:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "techkaduna",
"github_project": "sabi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "rich",
"specs": [
[
"==",
"13.7.1"
]
]
}
],
"lcname": "sabi"
}