Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arshitarora/online-psycologist-sentiment-analysis-
Online Psychologist is an AI sentiment analysis tool that understands your emotion in the form of input sentences and helps you analyze your emotions by categorizing them into anger, fear, joy, sadness or neutral.
https://github.com/arshitarora/online-psycologist-sentiment-analysis-
Last synced: 24 days ago
JSON representation
Online Psychologist is an AI sentiment analysis tool that understands your emotion in the form of input sentences and helps you analyze your emotions by categorizing them into anger, fear, joy, sadness or neutral.
- Host: GitHub
- URL: https://github.com/arshitarora/online-psycologist-sentiment-analysis-
- Owner: ArshitArora
- Created: 2022-12-01T06:08:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-01T06:16:34.000Z (about 2 years ago)
- Last Synced: 2024-09-18T10:49:17.199Z (4 months ago)
- Language: Jupyter Notebook
- Size: 28.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Online-Psycologist-Sentiment-Analysis-
Online Psychologist is an AI sentiment analysis tool that understands your emotion in the form of input sentences and helps you analyze your emotions by categorizing them into anger, fear, joy, sadness or neutral.# Emotion Classification in Short Messages
Multi-class sentiment analysis problem to classify texts into five emotion categories: joy, sadness, anger, fear, neutral. A fun weekend project to go through different text classification techniques. This includes dataset preparation, traditional machine learning with scikit-learn, LSTM neural networks and transfer learning using BERT (tensorflow keras).
# Datasets
**Summary Table**
| Dataset | Year | Content | Size | Emotion categories | Balanced |
| :--------------: | :--: | :-------: | ------------ | ------------------ | :-------: |
|dailydialog| 2017 | dialogues |102k sentences|neutral, joy, surprise, sadness, anger, disgust, fear| No |
|emotion-stimulus|2015|dialogues|2.5k sentences|sadness, joy, anger, fear, surprise, disgust| No |
|isear|1990|emotional situations|7.5k sentences|joy, fear, anger, sadness, disgust, shame, guilt| Yes |links: [dailydialog](http://yanran.li/dailydialog.html), [emotion-stimulus](http://www.site.uottawa.ca/~diana/resources/emotion_stimulus_data), [isear](http://www.affective-sciences.org/index.php/download_file/view/395/296/)
## Combined dataset
Dataset was combined from dailydialog, isear, and emotion-stimulus to create a balanced dataset with 5 labels: joy, sad, anger, fear, and neutral. The texts mainly consist of short messages and dialog utterances.
# Experiments
### Traditional Machine Learning:
* Data preprocessing: noise and punctuation removal, tokenization, stemming
* Text Representation: TF-IDF
* Classifiers: Naive Bayes, Random Forrest, Logistic Regrassion, SVM| Approach | F1-Score |
| :------------------ | :------: |
| Naive Bayes | 0.6702 |
| Random Forrest | 0.6372 |
| Logistic Regression | 0.6935 |
| SVM | 0.7271 |### Neural Networks
* Data preprocessing: noise and punctuation removal, tokenization
* Word Embeddings: pretrained 300 dimensional word2vec ([link](https://fasttext.cc/docs/en/english-vectors.html))
* Deep Network: LSTM, biLSTM, CNN| Approach | F1-Score |
| :------------------ | :------: |
| LSTM + w2v_wiki | 0.7395 |
| biLSTM + w2v_wiki | 0.7414 |
| CNN + w2v_wiki | 0.7580 |### Transfer learning with BERT
Finetuning BERT for text classification| Approach | F1-Score |
| :------------------ | :------: |
| finetuned BERT | 0.8320 |