An affect generator based on TextBlob and the NRC affect lexicon. Note that lexicon license is for research purposes only.
Project description
NRCLex
(C) 2019 Mark M. Bailey
About
NRCLex will generate an affect list from a body of text. Affect dictionary is based on the National Research Council Canada (NRC) affect lexicon (see link below).
Lexicon source is (C) 2016 National Research Council Canada (NRC) and this package is for research purposes only. Source: [lexicons for research] (http://sentiment.nrc.ca/lexicons-for-research/)
Affects
Emotional affects measured include the following:
- fear
- anger
- anticipation
- trust
- surprise
- positive
- negative
- sadness
- disgust
- joy
Sample Usage
from nrclex import NRCLex
#Instantiate text object. text_object = NRCLex('text')
#Return words list. text_object.words
#Return sentences list. text_object.sentences
#Return affect list. text_object.affect_list
#Return affect dictionary. text_object.affect_dict
#Return affect frequencies. text_object.affect_frequencies
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 NRCLex-0.0.3.tar.gz.
File metadata
- Download URL: NRCLex-0.0.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f04fb2943896dd3c06ebcb4e78b5fe63e72be7ed8d2f20e335e6db12a5094143
|
|
| MD5 |
c5e4d28a5637ddb4f467fb85628bbfc7
|
|
| BLAKE2b-256 |
493c5933a94f699a6cc88d17504e1e8300a18c0a3aa4c8188b9dff2871dbca75
|
File details
Details for the file NRCLex-0.0.3-py2-none-any.whl.
File metadata
- Download URL: NRCLex-0.0.3-py2-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
987c864c6404fd3e7b977a557f43346710df67806d376f18ac8b8f75fa90bcd2
|
|
| MD5 |
5118b99898d5d2d82e94e43be0e34c34
|
|
| BLAKE2b-256 |
9809b67ca6005c6cdb6c2a206f167a999397c4690acb33a3d7b85ab5301e7261
|