Skip to main content

Emot is a python library to extract the emojis and emoticons from a text(string). All the emojis and emoticons are taken from a reliable source i.e. Wikipedia.org.

Compatibility

It works fine in any Python 2.xx and 3.xx.

Working

The Emot library takes a string as an input and returns a list of dictonary.

Example

>>> import emot
>>> text = "I love python 👨 :-)"
>>> emot.emoji(text)
>>> [{'value': '👨', 'location': [10, 10]}]
>>> emot.emoticons(text)
>>> [{'value': ':-)', 'location': [12, 15]}]

You can loop them as shown below. There are two details in each dictonary (1) Value - Emoji or Emoticons and (2) Location - starting position and the ending position of the emoji and emoticons. Below is the example showing how you can loop it.

>>> text = "I love python 👨 :-) :) "
>>> emot.emoticons(text)
[{'value': ':-)', 'location': [16, 19]}, {'value': ':)', 'location': [20, 22]}]
>>> for data in emot.emoticons(text):
...     print('value ',data['value'])
...     print('starting point: ',data['location'][0])
...     print('ending point: ',data['location'][1])
...
value :-)
starting point:  16
ending point:  19
value :)
starting point:  20
ending point:  22

Installation

Via pip:

$ pip install emot --upgrade

From master branch:

$ git clone https://github.com/NeelShah18/emot.git
$ cd emot
$ python setup.py install

Developing

$ git clone https://github.com/NeelShah18/emot.git
$ cd emot

Authors

Neel Shah / @NeelShah18

Shubham Rohilla / @kakashubham

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emot-1.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emot-1.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file emot-1.0.tar.gz.

File metadata

  • Download URL: emot-1.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for emot-1.0.tar.gz
Algorithm Hash digest
SHA256 d331b494f8384c6b3067d084347a781b41eec7601f945781905c4bcf003d14ec
MD5 63d358512a8bdec064a6893d6f09f560
BLAKE2b-256 f90bb05ffc061cde52b886bb881bddbe01c9729a7a91d67760f4b9a6fa061a4f

See more details on using hashes here.

File details

Details for the file emot-1.0-py3-none-any.whl.

File metadata

  • Download URL: emot-1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for emot-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce8e4a4a964654db626b1f543886ce9723cf005144c036539abc905f925ccccb
MD5 dc317be6ba15b3c15cdf512631e7d49f
BLAKE2b-256 ee349490e4555227f6e17f744f53385e8a9bcdf0ec81d3e578493047bd7aa520

See more details on using hashes here.

Release history Release notifications | RSS feed

3.1

2 files

3.0

2 files

2.1

1 file

2.0

2 files

This release

1.0 This release

2 files

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