DEV Community

Mrinal Walia
Mrinal Walia

Posted on

Top 5 Open-Source Sentiment Analysis Projects in Python Every NLP Engineer Should Know

Learn about top 5 Open-Source Sentiment Analysis Projects in Python used by all Natural Language Processing(NLP) experts.

Image description

Sentiment Analysis (Also called opinion mining) is an approach to NLP that computationally identifies and categorizes mixed opinions (positive, negative, or neutral) in a piece of text. It is usually done to identify the writer's tone and attitude toward a particular topic, product, object, etc.

Businesses are applying popular sentiment analysis tools to many use cases, like social media monitoring, customer support management, and analyzing customer feedback.

Note: In this article, we will talk about some excellent open-source Sentiment Analysis Projects/Repositories that you can use in your projects in 2023. To read more about each, I recommend following the link given along the project.


Courses from DataCamp

Learning isn’t just about being more competent at your job, it is so much more than that. Datacamp allows me to learn without limits.

Datacamp allows you to take courses on your own time and learn the fundamental skills you need to transition to a successful career.

Datacamp has taught me to pick up new ideas quickly and apply them to real-world problems. While I was in my learning phase, Datacamp hooked me on everything in the courses, from the course content and TA feedback to meetup events and the professor’s Twitter feeds.

Here are some of my favorite courses I highly recommend you to learn from whenever it fits your schedule and mood. You can directly apply the concepts and skills learned from these courses to an exciting new project at work or at your university.

1. Sentiment Analysis in Python

2. Sentiment Analysis in R

3. Introduction to Text Analysis in R

4. Analyzing Social Media Data in R

5. Introduction to Natural Language Processing in Python

6. Introduction to Natural Language Processing in R

Coming back to the topic -


1. Pattern

GitHub: https://github.com/clips/pattern
Official Documentation: https://github.com/clips/pattern/wiki
GitHub Stars: 8.4K
GitHub Forks: 1.6K
Languages: Python (87%), JavaScript (13%)

Image description

Pattern is a web-mining module in Python for performing Data Mining, Natural Language Processing, Machine Learning, and Network Analysis tasks. The library is comprehensively tested with 350+ unit tests and comes bundled with 50+ examples under the BSD license.

Pattern supports Python 2.5+ versions and requires NumPy installed. It can be directly installed using the PyPi package in Python:

$ pip install pattern

Patterns provide support for the following applications:

  • Data Mining on web services like Google, Twitter, Wikipedia, Web Crawler, HTML DOM parser
  • NLP for sentiment analysis, n-gram search, WordNet, part-of-speech taggers
  • Machine Learning algorithms like Clustering, Classification, KNN, SVM, Perceptron, Vector Space Model
  • Network Analysis using Graph Centrality and Visualization

2. ABSA-PyTorch

GitHub: https://github.com/songyouwei/ABSA-PyTorch
GitHub Stars: 1.7K
GitHub Forks: 491
Languages: Python (100%)

Aspect-Based Sentiment Analysis (ABSA) is a sub-technique in sentiment analysis that divides text data to define its sentiments based on its aspects. This project is a PyTorch-Python implementation of ABSA.

You need PyTorch, numpy, sklearn, Python (3.6 or 3.7), and transformers to install this library. All the implemented models are listed in this folder and its recommended to try PyABSA for flexible training, inference, and aspect term extraction.

Note: This sentiment analysis project follows the all-contributors specification. Contributions of any kind are welcome!

3. StockSight

GitHub: https://github.com/shirosaidev/stocksight
Official Documentation: https://shirosaidev.github.io/stocksight/
GitHub Stars: 1.6K
GitHub Forks: 386
Languages: Python (97.9%), Shell(1.4%), Dockerfile(0.7%)

Image description

StockSight is a stock market analyzer and predictor tool that uses Elasticsearch, Twitter, News headlines, NLP, and Sentiment Analysis in Python. This library helps you find out how much emotions on Twitter and different news headlines affect a stock's price by storing and analyzing the data for stocks.

It stores Twitter and news headlines, analyzes the emotions of what the author writes, and then does sentiment analysis on the text to specify what the author feels about the stock.

You can use this project to find not just the sentiments of stocks but also the sentiments of anything.

Note: You can get support and help from the community members by joining their StockSight Slack channel.

Click here to download the StockSight software here.

4. Twitter Sentiment Analysis

GitHub: https://github.com/abdulfatir/twitter-sentiment-analysis
Project Report: https://github.com/abdulfatir/twitter-sentiment-analysis/blob/master/docs/report.pdf
GitHub Stars: 1.3K
GitHub Forks: 560
Languages: Python (100%)

Twitter sentiment analysis is a project for performing sentiment analysis on tweets using various machine learning algorithms and extracted features. This project uses various machine learning algorithms to generate a model ensemble.

The dataset is preprocessed and prepared for the training of the model. The model is trained on the below classifiers:

  • Naive Bayes
  • Maximum Entropy
  • Random Forest
  • Decision Trees
  • XGBoost
  • SVM
  • Multi-Layer Perceptron
  • Convolutional Neural Networks
  • Recurrent Neural Networks

Image description

Some scope to improve the model is handling emotion range, using symbols, and detecting emotions in real-time video.

5. Obsei

GitHub: https://github.com/obsei/obsei
Official Documentation: https://obsei.com/
GitHub Stars: 781
GitHub Forks: 108
Languages: Python (58.5%), Jupyter Notebook (41.1%), Other (0.4%)

Image description

Obsei is a low-code AI-powered automation tool employed in mixed business streams like social listening, AI-based alerting/notification, brand image analysis, comparative study, automatic assignment of tags, automated customer issue creation, extraction of more profound insights, and many more based upon your creativity.

Some cool features of Obsei are listed below:

  1. - Automating tasks where cognitive thinking is required
  2. - Collecting and dispatching data across various channels
  3. - ETL tool for unstructured data
  4. - Low code interface to automate mundane tasks

Obsei allows you to observe (collect unstructured data), analyze (analyze unstructured data), and inform (send analyzed data to various destinations).


If you enjoy reading this article, we intercommunicate similar interests and are/will be in similar industries. So let’s connect via LinkedIn and Github. Please do not hesitate to send a contact request!

Subscribe 📧 For Weekly Tech Nuggets! 💻

Top comments (1)

Collapse
 
derechtefeuerpfeil profile image
DerEchteFeuerpfeil

Great overview article, I really like the layout and concise descriptions!

Sometimes it is necessary to label domain-specific data for sentiment analysis (e.g. product reviews of a certain company) in order to fine-tune larger models. We built a great open-source tool for semi-automated labeling, which helped us bring a few sentiment analysis use cases to life (e.g. stock sentiment).

So if you need any NLP data labeling, check out Kern AI refinery on GitHub :)