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

How is emotional impact of words highlighted? #60

Closed
amitness opened this issue Apr 8, 2020 · 5 comments
Closed

How is emotional impact of words highlighted? #60

amitness opened this issue Apr 8, 2020 · 5 comments

Comments

@amitness
Copy link

amitness commented Apr 8, 2020

Hi @bfelbo,

On the demo page, there is a section that shows the impact of words on the emoji predictions. How to calculate that?

Screenshot from 2020-04-08 10-49-54

@bfelbo
Copy link
Owner

bfelbo commented Apr 8, 2020

It's a bit hacky so I wouldn't recommend using it in production. We do the predictions w/o each word and see how much the distribution over predicted emojis change.

@amitness
Copy link
Author

amitness commented Apr 9, 2020

@bfelbo I see. So if I understand it correctly, is this how it's done?

  • Say we have a sentence "I loved the application" and we run deepmoji to get top 5 predictions
  • Then, we remove one word at a time and see the predictions
  • The words whose removal changed the top 5 predictions are the important ones

If so, how do you give that score in the screenshot above? The importance reflected by the darker and lighter shades of purple.

@bfelbo
Copy link
Owner

bfelbo commented Apr 9, 2020

Exactly. The shading is simply an interval over the difference. It was picked manually by trying out a couple of sentences and seeing what seemed to make sense.

Note that you can run all the predictions in a single batch, which will make this pretty fast even for long sentences.

@bfelbo
Copy link
Owner

bfelbo commented Apr 9, 2020

I'm closing this for now as it's not related to the functionality of the repo, but to the demo. Hope my response was helpful!

@bfelbo bfelbo closed this as completed Apr 9, 2020
@amitness
Copy link
Author

amitness commented Apr 9, 2020

It was. Thanks a lot.

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

No branches or pull requests

2 participants