Text Classification — Sentiment analysis using Hugging Transformers

A guide to implementing sentiment analysis using Hugging Transformers.

Jayashree domala
3 min readJun 6, 2022
Photo by Hello I’m Nik on Unsplash

Text classification

  • The raw data in form of text has a rich source of information and can be pretty helpful in extracting insights from it and making it meaningful and structured.
  • In machine learning, text classification is used as a technique to assign categories to text. It helps when the text needs to be categorized and organized.
  • For example, news can be assigned different labels like business, sports, and health.

In this article, we will look into the most popular text classification use case which is sentiment analysis.

Sentiment analysis

  • As the name suggests, it is a technique used in natural language processing to determine the positive or negative sentiment of the text.
  • Sometimes, it can be used to label positive, negative, and neutral sentiments as well.
  • For example, sentiment analysis can be used to understand the product/brand sentiment using customer feedback.

We will be using Hugging face’s DistilBERT base model.

--

--

Jayashree domala

Self-driven woman who wishes to deliver creative and engaging ideas and solutions in the field of technology.