Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kwokhing/sentimentanalysis-python-demo
Submission of an in-class NLP sentiment analysis competition held at Microsoft AI Singapore group. This submission entry explores the performance of both lexicon & machine-learning based models
https://github.com/kwokhing/sentimentanalysis-python-demo
bert-model cross-validation data-analysis decision-trees deep-learning lexicon-based lstm-sentiment-analysis machine-learning machine-learning-algorithms naive-bayes naive-bayes-classifier random-forest sentiment-analysis sentiment-classification sklearn supervised-learning supervised-machine-learning support-vector-machines svm vader-sentiment-analysis
Last synced: about 2 months ago
JSON representation
Submission of an in-class NLP sentiment analysis competition held at Microsoft AI Singapore group. This submission entry explores the performance of both lexicon & machine-learning based models
- Host: GitHub
- URL: https://github.com/kwokhing/sentimentanalysis-python-demo
- Owner: KwokHing
- License: unlicense
- Created: 2019-09-13T03:13:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-10T12:53:07.000Z (over 2 years ago)
- Last Synced: 2023-08-19T08:42:09.610Z (over 1 year ago)
- Topics: bert-model, cross-validation, data-analysis, decision-trees, deep-learning, lexicon-based, lstm-sentiment-analysis, machine-learning, machine-learning-algorithms, naive-bayes, naive-bayes-classifier, random-forest, sentiment-analysis, sentiment-classification, sklearn, supervised-learning, supervised-machine-learning, support-vector-machines, svm, vader-sentiment-analysis
- Language: Jupyter Notebook
- Homepage:
- Size: 11.9 MB
- Stars: 12
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Exploration of Sentiment Analysis
This repo provides the submission entry for an in-class NLP sentiment analysis competition held at Microsoft AI Singapore group using techniques learned in class to classify text in identifying positive or negative sentiment.
![jpg](images/inclass-competition.jpg)
Recommended to install [Anaconda](https://www.anaconda.com/products/distribution), a pre-packaged Python distribution that contains all of the necessary libraries and software for this project. Alternatively, you can make use of [Google Colaboratory](https://colab.research.google.com/), which allows you to write and execute Python codes in your browser.
**Data**
Data for this in-class competition comes from the [Sentiment140](https://www.kaggle.com/datasets/kazanova/sentiment140) dataset where the training and test data consists of randomly sampled 10% and 5% of the dataset.
## Getting started using Lexicon and Machine Learning (ML) based methods
Open `SentimentAnalysis.ipynb` on a jupyter notebook environment, or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/KwokHing/SentimentAnalysis-Python-Demo/blob/master/SentimentAnalysis.ipynb)- VADER (VALENCE based sentiment analyzer) [67%]
- Naive Bayes
- Linear SVM (Support Vector Machine) [80%]
- Decision Tree
- Random Forest
- Extra Trees
- SVC [80%]## Exploring using Deep Learning Techniques (LSTM)
Open `SentimentAnalysis_RNN.ipynb` on a jupyter notebook environment, or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/KwokHing/SentimentAnalysis-Python-Demo/blob/master/SentimentAnalysis_RNN.ipynb)The LSTM deep learning method [79%] did not perform better than SVC/SVM method
## How about the BERT Transformers model?
Open `SentimentAnalysis_BERT.ipynb` on a jupyter notebook environment, or [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/KwokHing/SentimentAnalysis-Python-Demo/blob/master/SentimentAnalysis_BERT.ipynb)The State-of-the-Art transformer model performs slightly better at [82%] accuracy