All Projects → metalcorebear → NRCLex

metalcorebear / NRCLex

Licence: MIT license
An affect generator based on TextBlob and the NRC affect lexicon. Note that lexicon license is for research purposes only.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to NRCLex

AffectiveTweets
A WEKA package for analyzing emotion and sentiment of tweets.
Stars: ✭ 74 (+76.19%)
Mutual labels:  emotion, lexicon
Deception-Detection-on-Amazon-reviews-dataset
A SVM model that classifies the reviews as real or fake. Used both the review text and the additional features contained in the data set to build a model that predicted with over 85% accuracy without using any deep learning techniques.
Stars: ✭ 42 (+0%)
Mutual labels:  nltk
WWW2021
Official repository to release the code and datasets in the paper "Mining Dual Emotion for Fake News Detection", WWW 2021.
Stars: ✭ 45 (+7.14%)
Mutual labels:  emotion
plexus
Plexus - Interactive Emotion Visualization based on Social Media
Stars: ✭ 27 (-35.71%)
Mutual labels:  emotion
chronist
Long-term analysis of emotion, age, and sentiment using Lifeslice and text records.
Stars: ✭ 23 (-45.24%)
Mutual labels:  emotion
namebot
A company/project name generator for Python. Uses NLTK and diverse techniques derived from existing corporate etymologies and naming agencies for sophisticated word generation and ideation.
Stars: ✭ 44 (+4.76%)
Mutual labels:  nltk
spring-keyframes
✌️1.4kb library to generate css keyframes in css-in-js based on a spring algorithm, with emotion
Stars: ✭ 65 (+54.76%)
Mutual labels:  emotion
facial-expression-recognition
The main purpose of the project - recognition of emotions based on facial expressions. Cohn-Kanade data set (http://www.pitt.edu/~emotion/ck-spread.htm) is used for explorations and training
Stars: ✭ 60 (+42.86%)
Mutual labels:  emotion
udacity-cvnd-projects
My solutions to the projects assigned for the Udacity Computer Vision Nanodegree
Stars: ✭ 36 (-14.29%)
Mutual labels:  nltk
Question-Answering-System
A factoid based question answering system | Python | Flask | NLP
Stars: ✭ 0 (-100%)
Mutual labels:  nltk
css-in-js-media
🎨 Deal with responsive design simply when use CSS-in-JS (styled-components,emotion.js)
Stars: ✭ 137 (+226.19%)
Mutual labels:  emotion
Senti4SD
An emotion-polarity classifier specifically trained on developers' communication channels
Stars: ✭ 41 (-2.38%)
Mutual labels:  emotion
wn
A modern, interlingual wordnet interface for Python
Stars: ✭ 119 (+183.33%)
Mutual labels:  lexicon
EmoticonsBoard
Function keyboard and emotions. Android表情键盘,可动态更新表情。
Stars: ✭ 31 (-26.19%)
Mutual labels:  emotion
rebass
⚛️ React primitive UI components built with styled-system.
Stars: ✭ 7,844 (+18576.19%)
Mutual labels:  emotion
ResumeRise
An NLP tool which classifies and summarizes resumes
Stars: ✭ 29 (-30.95%)
Mutual labels:  nltk
topic modelling financial news
Topic modelling on financial news with Natural Language Processing
Stars: ✭ 51 (+21.43%)
Mutual labels:  nltk
nlp workshop odsc europe20
Extensive tutorials for the Advanced NLP Workshop in Open Data Science Conference Europe 2020. We will leverage machine learning, deep learning and deep transfer learning to learn and solve popular tasks using NLP including NER, Classification, Recommendation \ Information Retrieval, Summarization, Classification, Language Translation, Q&A and T…
Stars: ✭ 127 (+202.38%)
Mutual labels:  nltk
nltk-api-server
API server for NLTK
Stars: ✭ 23 (-45.24%)
Mutual labels:  nltk
lexpy
Python package for lexicon; Trie and DAWG implementation.
Stars: ✭ 47 (+11.9%)
Mutual labels:  lexicon

NRCLex

(C) 2019 Mark M. Bailey, PhD

About

NRCLex will measure emotional affect from a body of text. Affect dictionary contains approximately 27,000 words, and is based on the National Research Council Canada (NRC) affect lexicon (see link below) and the NLTK library's WordNet synonym sets.

Lexicon source is (C) 2016 National Research Council Canada (NRC) and this package is for research purposes only. Source: http://saifmohammad.com/WebPages/NRC-Emotion-Lexicon.htm As per the terms of use of the NRC Emotion Lexicon, if you use the lexicon or any derivative from it, cite this paper: Crowdsourcing a Word-Emotion Association Lexicon, Saif Mohammad and Peter Turney, Computational Intelligence, 29 (3), 436-465, 2013.

NLTK data is (C) 2019, NLTK Project. Source: [NLTK] (https://www.nltk.org/). Reference: Bird, Steven, Edward Loper and Ewan Klein (2009), Natural Language Processing with Python. O’Reilly Media Inc.

Update

  • Finally got around to cleaning this up a bit. Updated PyPI package with current version. Thanks to all the contributors for cleaning up my terrible code!
  • Expanded NRC lexicon from approximately 10,000 words to 27,000 based on WordNet synonyms.
  • Minor bug fixes.
  • Contributor updated NTC library.

Installation

pip install NRCLex

Affects

Emotional affects measured include the following:

  • fear
  • anger
  • anticipation
  • trust
  • surprise
  • positive
  • negative
  • sadness
  • disgust
  • joy

Sample Usage

from nrclex import NRCLex

#Instantiate NRCLex object, you can pass your own dictionary filename in json format.

text_object = NRCLex(lexicon_file='nrc_en.json')

#You can pass your raw text to this method(for best results, 'text' should be unicode).

text_object.load_raw_text(text: str)

#You can pass your already tokenized text as a list of tokens, if you want to use an already tokenized input. This usage assumes that the text is correctly tokenized and does not make use of TextBlob.

text_object.load_token_list(list_of_tokens: list)

#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 raw emotional counts.

text_object.raw_emotion_scores

#Return highest emotions.

text_object.top_emotions

#Return affect frequencies.

text_object.affect_frequencies

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].