Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal Emoji support #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add minimal Emoji support #19

wants to merge 2 commits into from

Conversation

nark
Copy link

@nark nark commented Jan 17, 2018

I'm working on some NLP related stuff with Ruby, and I found the sentimental gem very useful. In my case I have to deal with Emojis, which is today a major way to express feelings in text-based communications.

I tried to catch Emoji unicode symbols with sentimental out-of-the-box (using load_senti_file) but the current regular expressions implementation was kicking unicode out of the tokenized words.

So I updated the regex based on what I found here and I added a emojis.json dictionary with the most common and manful emojis.

I still have to test it more heavily, but currently it perfectly suits my needs.

@jemminger
Copy link
Member

Nice! I'd like to see the Emoji regex extracted to a constant so extract_words is more succinct

@OmerGeva
Copy link

I think a lot of emojis can be interpreted in different ways, so for example 😂 can be used as a positive or sarcastically negative response. This makes interpreting emojis' sentiments pretty challenging.

Also, 🤡 generally is used in a negative way 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants