SAP HANA Sentiment -SQL Procedure
I am a student just testing a once scenario based on sentiment analysis I might need some advise or help to solve my some questions I am having .
Objective : My goal is to analyze the strings and on the basis of my dictionary I can put some sentiment values to the strings such as Strong Positive, Negative, Neutral etc. and write it in my output table.
For that -
a) I have created one dictionary table having three columns ( DID(Pk) , Word , Sentiment)
b) I have also created my input table for the testing purposes named as "Social Data" having columns ( SID (Pk) , SEARCH_TERM ,CHANNEL ,User , Date , Message)
c) I have also created my third Output table where I would like to put my output and having respective columns same like input table but just add one more to it, named as "Sentiment" where I would like to see my final sentiment value whether that message is strong positive or negative or neutral on the basis of my defined criteria.
Evaluation Criteria :
a) I wanted to analyze my "Message Column" in the input table and compare with my dictionary table and then put the right sentiment into the output table column "Sentiment"
b) For example I have given each dictionary "Word" with their "Sentiment Values" in my dictionary so if there are same match words in the message string so those values should be given to my message words then also calculate the sentiments and then do the average of the whole sentiments
c) I have the Different intervals calculated for each sentiment values which I would like to use as a imperative logic in my SQL script procedure so when I have the calculations done on my message sentiments so according to the intervals I can give the "Sentiment" in the output table .
I am having some issues with my sql script procedure as I would like to put some robust solution to my scenario so I can play around with my sentiment values or dictionary categories whenever I feel like and at the end when I will call my procedure I can get the sentiment values individually for my messages in the output table in the "Sentiment" Column.
I already did the necessary CSV test imports into the HANA Studio.I am also attaching some tables which I have created to understand the scenario.