bnemo
A Python package for translating Emoji and Emoticons into Bengali text.
Background
Normally text corpus or text data contains different type of emoji, emoticons to express emotions and sentiment, specially text collected from social media. But this emojis have hardly any meaning in terms of text analysis if those are not converted into corresponding text. From that observation, we are trying to build a database of translation for common emoji, emoticons in Bengali so that Bengali NLP practitionars can use this database to translate emoji, emoticons into Bengali pharases for better understanding of text data. As the initial step, we have created this python package to easily use the emoji, emoticons to Bengali text database in NLP task.
Installation
Install using the following command -
pip install bnemo
Uninstall using the following command -
pip uninstall bnemo
Getting Started
To use bnemo install it using pip. And make sure you have the required python version in your environment, i.e. python >= 3.5.
Step#1:
Import the Translator class from bnemo module.
from bnemo import Translator
Step#2:
Create an instance of Translator class.
translator = Translator()
Step#3:
Use the translate() method of Translator class to translate any emoji, emoticons in your Bengali text data.
input_text = "তুমি বড় কষ্ট দিলে 😭"
result = translator.translate(input_text)
Step#4:
It will return a Result object, that has four attributes.
| Attribute | Data Type | Explanation |
|---|---|---|
| text | String | This is the translated text from bnemo |
| emo | List | List of all the emoji, emoticons in the given input text |
| pos | List of list | This is the list of start and ending index of each emoji in the input text |
| meaning | List of Strings | This is the list of meanings for each emoji, emoticons in the input text |
Step#5:
If you follow the above steps you might get the output as bellow -
print(f"Translation: {result.text}\nEmoji: {result.emo}\nPositions: {result.pos}\nMeaning: {result.meaning}")
Output:
Translation: তুমি বড় কষ্ট দিলে জোরে জোরে কান্নাকাটি
Emoji: ['😭']
Positions: [[18, 19]]
Meaning: ['জোরে জোরে কান্নাকাটি']
How to Contribute
You can contribute in the following ways -
- You can suggest better translation for any emoji, emoticons and send a pull request.
- You can create notebooks for showing use cases of this package or emoji database.
- Or may be in someother way not listed here
Inspiration
-
The package was inspired by the awesome tool that you can use for translating emoji, emoticons into english phrases. Check out this awesome tool as well. https://github.com/NeelShah18/emot
-
List of unicode emojis https://unicode.org/emoji/charts/full-emoji-list.html
Metadata
Release files for bnemo 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bnemo-1.0.1.tar.gz | 30.2 kB | Without provenance | Details for bnemo-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bnemo-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for bnemo-1.0.1-py3-none-any.whl |
Total release size: 60.0 kB
Release files / bnemo-1.0.1.tar.gz
| Download URL | bnemo-1.0.1.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f40105d412901645eb8b4fd13b61385f20f8356c05c3e999c47cb1ecc61b7f8c
|
|
BLAKE2b-256 checksum How to use checksums |
7b6858dae85b80d17289502d8e40a6060dabc071b0d0c128d9ebae625a6b3d11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5
|
Release files / bnemo-1.0.1-py3-none-any.whl
| Download URL | bnemo-1.0.1-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16d80783cfa3de527a3e535946557e8b46eebad04770af1edd707426a32bedb8
|
|
BLAKE2b-256 checksum How to use checksums |
57e21b07cd157cc30db566c4bfb0a9d3a18936c7b7e6141de4e5cb521d241819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5
|
Security for bnemo 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.