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.
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
- Nade Explorer (interactive demo + more information)
- Nade R Package
- Paper (coming soon)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3fff7bbf886b77470d2f00b97301299cb13048d38fa0d4a8c73dfbda892842f
|
|
| MD5 |
c748a88ed877f38f465a2bbd7b2c1343
|
|
| BLAKE2b-256 |
f59a8809148f75dc51b8ce292d9ac1595b3c6377c056544c9b86156f7f952f92
|
Provenance
The following attestation bundles were made for nade-0.3.1.tar.gz:
Publisher:
release.yml on inkrement/nade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nade-0.3.1.tar.gz -
Subject digest:
c3fff7bbf886b77470d2f00b97301299cb13048d38fa0d4a8c73dfbda892842f - Sigstore transparency entry: 335970397
- Sigstore integration time:
-
Permalink:
inkrement/nade@f9cbbf4117bafc078b30b4764c086bed1d55520f -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/inkrement
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f9cbbf4117bafc078b30b4764c086bed1d55520f -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9759bf26307b0515f54aee3f22d25b263c8a8583cd543aa655cfc8ee125db791
|
|
| MD5 |
b377e901ad3ba5abce0b4185b832ddf5
|
|
| BLAKE2b-256 |
8ca6cc0db3a79cdf2210aa5a234fadb5e9886f79e472c55e1294912096fc34df
|
Provenance
The following attestation bundles were made for nade-0.3.1-py3-none-any.whl:
Publisher:
release.yml on inkrement/nade
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nade-0.3.1-py3-none-any.whl -
Subject digest:
9759bf26307b0515f54aee3f22d25b263c8a8583cd543aa655cfc8ee125db791 - Sigstore transparency entry: 335970412
- Sigstore integration time:
-
Permalink:
inkrement/nade@f9cbbf4117bafc078b30b4764c086bed1d55520f -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/inkrement
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f9cbbf4117bafc078b30b4764c086bed1d55520f -
Trigger Event:
push
-
Statement type: