Skip to content
/ nade Public

Allows to infer basic emotions from social media messages

License

Notifications You must be signed in to change notification settings

inkrement/nade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

try it

This package allows to infer basic emotions from social media messages. While human raters are often too resource-intensive, lexical approaches face challenges regarding incomplete vocabulary and the handling of informal language. Even advanced machine learning-based approaches require substantial resources (expert knowledge, programming skills, annotated data sets, extensive computational capabilities) and tend to gauge the mere presence, not the intensity, of emotion. This package solves this issue by predicting a vast array of emojis based on the surrounding text, then reduces these predicted emojis to an established set of eight basic emotions.

Architecture

Usage

After installation, the module can be loaded and the predict method can be used for inference.

from nade import Nade

n = Nade()
n.predict('I love this')

The method returns a dictionary containing the scores for all eight basic emotions.

{
 'anger': [0.004],
 'anticipation': [0.15],
 'disgust': [0.017],
 'fear': [0.027],
 'joy': [0.451],
 'sadness': [0.02],
 'surprise': [0.142],
 'trust': [0.242]
}

Installation

The package can be installed as follows:

pip install git+https://github.com/inkrement/nade.git

Performance

The prediction method features a lleaves option that provides much faster inference. However, you will have to install lleaves first.

Notes

  • Usage on Apple M1 chips require additional dependencies (i.e., brew install cmake libomp)

Links

About

Allows to infer basic emotions from social media messages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages