Skip to main content

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

Project description

Nade Python Package

This is the Python package version of Nade, a model that allows to infer basic emotions from social media messages (live demo). 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 nade

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

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.3.1.tar.gz (13.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nade-0.3.1-py3-none-any.whl (13.4 MB view details)

Uploaded Python 3

File details

Details for the file nade-0.3.1.tar.gz.

File metadata

  • Download URL: nade-0.3.1.tar.gz
  • Upload date:
  • Size: 13.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nade-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c3fff7bbf886b77470d2f00b97301299cb13048d38fa0d4a8c73dfbda892842f
MD5 c748a88ed877f38f465a2bbd7b2c1343
BLAKE2b-256 f59a8809148f75dc51b8ce292d9ac1595b3c6377c056544c9b86156f7f952f92

See more details on using hashes here.

Provenance

The following attestation bundles were made for nade-0.3.1.tar.gz:

Publisher: release.yml on inkrement/nade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nade-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: nade-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nade-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9759bf26307b0515f54aee3f22d25b263c8a8583cd543aa655cfc8ee125db791
MD5 b377e901ad3ba5abce0b4185b832ddf5
BLAKE2b-256 8ca6cc0db3a79cdf2210aa5a234fadb5e9886f79e472c55e1294912096fc34df

See more details on using hashes here.

Provenance

The following attestation bundles were made for nade-0.3.1-py3-none-any.whl:

Publisher: release.yml on inkrement/nade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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