NeelShah18 / emot

Open source Emoticons and Emoji detection library: emot

Home Page:https://pypi.org/project/emot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heart emoticon, i.e. <3, is not found

emocibob opened this issue · comments

Describe the bug
The heart emoticon <3, which is listed on Wikipedia, is not found by the emoticons method.

To Reproduce

import emot

emot_obj = emot.core.emot()
test = "<3 :D some text <3 :D"
emot_obj.emoticons(test)
# {'value': [':D', ':D'], 'location': [[3, 5], [19, 21]], 'mean': ['Laughing, big grin or laugh with glasses', 'Laughing, big grin or laugh with glasses'], 'flag': True}
emot_obj.emoticons(test)["value"]
# [':D', ':D']

Expected behavior
In the example above, emot_obj.emoticons(test) should also find <3.

Desktop (please complete the following information):

  • OS: Windows 10
  • emot version: 3.1

Additional context

  • A similar bug was already reported: #6
  • The broken heart emoticon </3 is also not found

Workaround

  • Edit emot\emo_unicode.py by adding u"<3":"Heart" in the EMOTICONS_EMO dictionary.