Applying Sentiment Analysis on User Feedback with Java

Naveen Mishra | 8th January 2020

Sentiment analysis is an emerging Artificial Intelligence (AI) technique that combines natural language processing algorithms to analyze emotions connected with textual information. With a diversified audience, it is essential for businesses to capitalize on AI development services that synthesize data from digital channels to extract actionable insights. Customer interactions across digital channels can be channelized using sentiment analysis to strengthen chatbot development services for global businesses. 

 

Let’s explore how we can apply sentiment analysis to gauge the emotional relevance of feedback using IBM Watson. 

Sentiment Analysis Of Manager’s Feedback 

Sentiment analysis Of Manager’s Feedback. Through this document, we can understand how we can do the sentiment analysis of the real data which become very beneficial in today’s market. 

The application does the sentiment analysis of the Manager’s Feedback. The application consists of the following main components:

  1. Text Classifier – Datumbox.
  2. MySQL WorkBench DataBase.
  3. IBM Watson API.
  4. Neuroph – v 2.92.

The main purpose of the task is to do the sentiment analysis of the text and the feedback of the manager’s comments and their feedback. These days there is a need to understand the reviews or any comments that are done on our work or on any product/service as it’s important to get the idea what our users/customers/peers are trying to say. Based on the result of Sentiment Analysis, We can make our business decisions accordingly.

 

In this use case, we’re just scanning the comments provided by Managers for their respective projects and trying to understand if the project is moving towards the direction expected by the Company or against it.

Scope

If we discuss the scope of this Application-

  • We can take it in use of Analysis of any speech or any text value.
  • We can use it for better production and make our work or product according to the reviewers.
  • We can get the maximum profit according to the sentiment analysis of the reviews and get the best result.

System Components 

IBM Watson-7.1.1  

The IBM Watson Assistant service combines natural language understanding and machine learning to create conversation flows between your app and your users.

The Assistant v2 API provides run time methods, the client application can use to send user input to an assistant and receive a response.

DatumBox-0.8.1

The Datumbox API is a web service that allows us to use our Machine Learning platform from our website, software or mobile application. The API gives you access to all of the supported functions of our service. It is designed to be easy to use and you can implement it in any model computer language that allows you to generating web requests.

 

Sentiment Analysis using IBM Watson

Analyzes the general sentiment of our content or sentiment toward specific target phrases. We can analyze sentiment for detected entities with entities.sentiment and for keywords with keywords.sentiment .

Code In Java

IamAuthenticator authenticator = new IamAuthenticator(“{apikey}”);

NaturalLanguageUnderstanding naturalLanguageUnderstanding = new NaturalLanguageUnderstanding(“2019-07-12”, authenticator);

naturalLanguageUnderstanding.setServiceUrl(“{url}”);

String url = “www.wsj.com/news/markets”;

List<String> targets = new ArrayList<>();

targets.add(“stocks”);

SentimentOptions sentiment = new SentimentOptions.Builder()

  .targets(targets)

  .build();

Features features = new Features.Builder()

  .sentiment(sentiment)

  .build();

AnalyzeOptions parameters = new AnalyzeOptions.Builder()

  .url(url)

  .features(features)

  .build();

AnalysisResults response = naturalLanguageUnderstanding

  .analyze(parameters)

  .execute()

  .getResult();

System.out.println(response);

 

Response

{

  “usage”: {

    “text_units”: 1,

    “text_characters”: 1188,

    “features”: 1

  },

  “sentiment”: {

    “targets”: [

      {

        “text”: “stocks”,

        “score”: 0.279964,

        “label”: “positive”

      }

    ],

    “document”: {

      “score”: 0.127034,

      “label”: “positive”

    }

  },

  “retrieved_url”: “https://www.wsj.com/news/markets”,

  “language”: “en”

}

 

Limitations

            There are some limitations to this Application.

  • For more accuracy, there is a need to train the machine by our own data set.
  • If the data is not available in the data set then it will show the wrong result for that case we have to give data dynamically.

About Author

Naveen Mishra

I have a good knowledge in Core Java, and basic knowledge in JDBC, C, HTML, CSS, JavaScript. He is also familiar with Spring Boot Framework.

No Comments Yet.


Leave a Comment

Name is required

Comment is required




Request For Proposal

[contact-form-7 404 "Not Found"]

Ready to innovate ? Let's get in touch

Chat With Us