Skip to main content

Natural affect detection allows to infer basic emotions from social media messages

Project description

Readme

try it: https://nade.rds.wu.ac.at

Natural affect detection 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 (NADE) 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+git://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.

Links

Project details


Download files

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

Source Distribution

nade-0.1.1.tar.gz (13.3 MB view hashes)

Uploaded Source

Built Distribution

nade-0.1.1-py3-none-any.whl (13.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page