Skip to main content
image Classify customer reviews or support tickets as positive, negative, or neutral to analyze the satisfaction of customers. A sentiment model analyzes text data to determine expressed sentiment. It is trained on a labeled dataset of positive, negative, or neutral examples. These models are used in e.g. social media and customer feedback analysis. They can provide valuable insights into customer opinions and preferences, allowing businesses to improve their products**.** Here is an example on how to build an ML model in Peliqan.io with a few lines of Python code.

Import required modules

Load a dataset

Load data from a table into a dataframe (df), e.g. support tickets on which we want to apply sentiment analysis.

Using Streamlit to build an app

We use the Streamlit module (st), built into Peliqan.io, to build a UI and show data.
image image

Data Pre-processing

Let’s start with cleaning the text by removing punctuations and repeating common words (these are called stop words in NLP) to make it ready for future use.
image To learn more about data pre-processing in NLP visit this guide or here.

Model Training & Evaluation

image To learn more about vectorizing sentences click here. Expand this to see the full code

Next Steps

  1. Using Peliqan you can create an app for business users to consume the model you have created in a simple and intuitive UI. Learn more about creating apps for users to consume your model.
  2. You can make predictions on real-time incoming data using the saved model. Learn more about making real-time predictions on new incoming data.
  3. You can make real-time predictions on new incoming data and send alerts to Slack if the model makes a prediction above a certain threshold.