All Projects → nikicc → Twitter Emotion Recognition

nikicc / Twitter Emotion Recognition

Licence: agpl-3.0
Models for predicting emotions from English tweets.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Twitter Emotion Recognition

Datastories Semeval2017 Task4
Deep-learning model presented in "DataStories at SemEval-2017 Task 4: Deep LSTM with Attention for Message-level and Topic-based Sentiment Analysis".
Stars: ✭ 184 (+65.77%)
Mutual labels:  lstm, twitter
Sarcasmdetection
Sarcasm detection on tweets using neural network
Stars: ✭ 99 (-10.81%)
Mutual labels:  lstm, twitter
Stock Market Prediction Web App Using Machine Learning And Sentiment Analysis
Stock Market Prediction Web App based on Machine Learning and Sentiment Analysis of Tweets (API keys included in code). The front end of the Web App is based on Flask and Wordpress. The App forecasts stock prices of the next seven days for any given stock under NASDAQ or NSE as input by the user. Predictions are made using three algorithms: ARIMA, LSTM, Linear Regression. The Web App combines the predicted prices of the next seven days with the sentiment analysis of tweets to give recommendation whether the price is going to rise or fall
Stars: ✭ 101 (-9.01%)
Mutual labels:  lstm, twitter
Vue Twitter Client
Twitter client created with Vue.js + Electron
Stars: ✭ 103 (-7.21%)
Mutual labels:  twitter
React Native Segmented Text Input
A wickedly customizable <TextInput /> for React Native. Useful for tags, spellchecking, whatever.
Stars: ✭ 104 (-6.31%)
Mutual labels:  twitter
Twitterbot
Several PHP scripts for making Twitter bots that retweet certain terms, or post from a data source (rss, database, markov body, picture folder).
Stars: ✭ 106 (-4.5%)
Mutual labels:  twitter
Deep Learning Based Ecg Annotator
Annotation of ECG signals using deep learning, tensorflow’ Keras
Stars: ✭ 110 (-0.9%)
Mutual labels:  lstm
Socialcount
Unmaintained (see the README): Simple barebones project to show share counts from various social networks.
Stars: ✭ 1,382 (+1145.05%)
Mutual labels:  twitter
Tesseract
This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM) based OCR engine which is focused on line recognition, but also still supports the legacy Tesseract OCR engine of Tesseract 3 which works by recognizing character patterns. Compatibility with Tesseract 3 is enabled by using the Legacy OCR Engine mode (--oem 0). It also needs traineddata files which support the legacy engine, for example those from the tessdata repository.
Stars: ✭ 43,199 (+38818.02%)
Mutual labels:  lstm
Hyprpulse
Brute force multiple accounts at once
Stars: ✭ 105 (-5.41%)
Mutual labels:  twitter
Awesome Deep Learning Resources
Rough list of my favorite deep learning resources, useful for revisiting topics or for reference. I have got through all of the content listed there, carefully. - Guillaume Chevalier
Stars: ✭ 1,469 (+1223.42%)
Mutual labels:  lstm
Socialcounters
jQuery/PHP - Collection of Social Media APIs that display number of your social media fans. Facebook Likes, Twitter Followers, Instagram Followers, YouTube Subscribers, etc..
Stars: ✭ 104 (-6.31%)
Mutual labels:  twitter
Ml Ai Experiments
All my experiments with AI and ML
Stars: ✭ 107 (-3.6%)
Mutual labels:  lstm
Repo 2016
R, Python and Mathematica Codes in Machine Learning, Deep Learning, Artificial Intelligence, NLP and Geolocation
Stars: ✭ 103 (-7.21%)
Mutual labels:  lstm
Year On Github
🐙 Share your Github stats for 2020 on Twitter
Stars: ✭ 108 (-2.7%)
Mutual labels:  twitter
See Rnn
RNN and general weights, gradients, & activations visualization in Keras & TensorFlow
Stars: ✭ 102 (-8.11%)
Mutual labels:  lstm
Numpy Ml
Machine learning, in numpy
Stars: ✭ 11,100 (+9900%)
Mutual labels:  lstm
Chatgirl
ChatGirl is an AI ChatBot based on TensorFlow Seq2Seq Model. ChatGirl 一个基于 TensorFlow Seq2Seq 模型的聊天机器人。(包含预处理过的 twitter 英文数据集,训练,运行,工具代码,来波 Star 。)QQ群:167122861
Stars: ✭ 105 (-5.41%)
Mutual labels:  twitter
Jlm
A fast LSTM Language Model for large vocabulary language like Japanese and Chinese
Stars: ✭ 105 (-5.41%)
Mutual labels:  lstm
Forget
Continuous post deletion for twitter and mastodon
Stars: ✭ 104 (-6.31%)
Mutual labels:  twitter

Binder

Twitter Emotion Recognition

Trained recurrent neural network (RNN) models for predicting emotions from English tweets. Our models work on characters hence we pass the whole tweet without any preprocessing as an input to the RNN. We are predicting three emotion classifications:

  • Ekman's six basic emotions,
  • Plutchik's eight basic emotions,
  • Profile of Mood States (POMS) six mood states.

Files and Folders:

  • demo.ipynb: script is showing how to use our models for predicting emotions or embedding tweets in Jupiter Notebook.
  • demo.py: script is showing how to use our models for predicting emotions or embedding tweets in Python.
  • emotion_prediction.py: helper scripts that defines EmotionPredictor class.
  • models/: contains trained RNN models.

Example Usage

Binder

The easiest way to play around is to open Binder.

Notice: Loading a model on Binder can take some time so please be patient!

In Jupyter Notebook

Execute it locally using Jupyter Notebook by opening the demo.ipynb file.

In Python

The following examples show how to predict Ekman's emotions from tweet's content. First let's import EmotionPredictor.

>>> from emotion_predictor import EmotionPredictor

Next we instantiate the model and define our tweets. In this example we will work with Ekman's emotions. Use plutchik to predict Plutchik's emotions or poms for Profile of Mood States. To use models in multilabel setting instead of multiclass provide ml as the setting argument.

>>> model = EmotionPredictor(classification='ekman', setting='mc')

>>> tweets = [
    "Watching the sopranos again from start to finish!",
    "Finding out i have to go to the  dentist tomorrow",
    "I want to go outside and chalk but I have no chalk",
    "I HATE PAPERS AH #AH #HATE",
    "My mom wasn't mad",
    "Do people have no Respect for themselves or you know others peoples homes",
]

We obtain model's predictions by calling predict_classes method:

>>> model.predict_classes(tweets)
                                                                       Tweet   Emotion
0                          Watching the sopranos again from start to finish!       Joy
1                          Finding out i have to go to the  dentist tomorrow      Fear
2                         I want to go outside and chalk but I have no chalk   Sadness
3                                                 I HATE PAPERS AH #AH #HATE     Anger
4                                                          My mom wasn't mad  Surprise
5  Do people have no Respect for themselves or you know others peoples homes   Disgust

To observe probabilities for each class use predict_probabilities method:

>>> model.predict_probabilities(tweets)
                                               Tweet     Anger   Disgust      Fear       Joy   Sadness  Surprise
0  Watching the sopranos again from start to finish!  0.000717  0.000244  0.003829  0.946539  0.005610  0.043061
1  Finding out i have to go to the  dentist tomorrow  0.007705  0.000039  0.783890  0.198629  0.008950  0.000787
2  I want to go outside and chalk but I have no c...  0.002772  0.000095  0.004137  0.025035  0.963712  0.004249
3                         I HATE PAPERS AH #AH #HATE  0.956343  0.006368  0.031387  0.000350  0.004375  0.001176
4                                  My mom wasn't mad  0.063969  0.004990  0.013971  0.079884  0.218708  0.618478
5  Do people have no Respect for themselves or yo...  0.070003  0.801428  0.067724  0.003646  0.038480  0.018718

If you would rather just use the final hidden state representation call embed:

>>> model.embed(tweets)
                                               Tweet      Dim1      Dim2    ...       Dim798    Dim799    Dim800
0  Watching the sopranos again from start to finish! -0.128762 -0.000000    ...    -0.260896 -0.009062 -0.110209
1  Finding out i have to go to the  dentist tomorrow -0.525602  0.407847    ...    -0.000088 -0.001489  0.142871
2  I want to go outside and chalk but I have no c... -0.057850  0.566420    ...    -0.091341 -0.003914 -0.037481
3                         I HATE PAPERS AH #AH #HATE  0.019670 -0.288512    ...     0.100234  0.013350 -0.014305
4                                  My mom wasn't mad -0.004135  0.657584    ...    -0.029319 -0.007455 -0.066208
5  Do people have no Respect for themselves or yo... -0.246179  0.069080    ...     0.029919  0.011467 -0.000520

[6 rows x 801 columns]

Citing:

If you use our models in a scientific publication, we would appreciate citations to the following paper:

Colnerič, N., & Demšar, J. (2018). Emotion Recognition on Twitter: Comparative Study and Training a Unison Model. IEEE Transactions on Affective Computing, PP (99), 1. https://doi.org/10.1109/TAFFC.2018.2807817

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].