Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

This is very strong and important features of SAP HANA.

Follow some steps to implement Sentimental analysis.I am using my previous Blog  data for Sentimental analysis

Following are the steps to implement Sentimental analysis.

1.Create a column table

Sentimental Analysis only takes VARCHAR,NVARCHAR,NCLOB,CLOB,BLOB for applying analysis on the text or document column.


Sentimental Analysis supported  only for English, French , German, Spanish , Chinese.

CREATE COLUMN TABLE "TEST"."TEST" (ID NVARCHAR(50), TEXTANA NVARCHAR(5000), PRIMARY KEY(ID))


"TEST"."TEST"-- > SchemaName.TableName

2.Insert some records into Test table


insert into "TEST"."TEST" values('1','Barely hours after sitting on a hunger strike at the Jantar Mantar in Delhi')

insert into "TEST"."TEST" values('2','off-spinner Ravichandran Ashwin admitted that India have been below par in the ODIs against New Zealand and they want to avoid another series defeat when they face the Black Caps in the fourth ODI here Tuesday.')

insert into "TEST"."TEST" values('3','Ashwin said the tied match at the Eden Park in Auckland was disappointing.')

insert into "TEST"."TEST" values('4','Pune weather is good')

insert into "TEST"."TEST" values('5','Bangalore weather is also good')

insert into "TEST"."TEST" values('6','good better best')


3.

a.Create FullText Index "TEST"."SENTIMENT" On "TEST"."TEST"("TEXTANA")

TEXT ANALYSIS ON

CONFIGURATION 'EXTRACTION_CORE_VOICEOFCUSTOMER';


b.Create FullText Index "TEST"."SENTIMENT" On "TEST"."TEST"("TEXTANA") ASYNC FLUSH EVERY 1 MINUTES LANGUAGE DETECTION ('EN') TEXT ANALYSIS ON;

Both above SQL query are same in one we are asking to SAP HANA engine to put the synchronization by default and in second we are using ASYNC<Asynchronous>  .Don't confuse  when you are trying to execute the query.

4. Once you will execute the query which is mention in Step 3, SAP HANA will generate the Analysis table in the same schema where your source table reside.

5.You will find another table with the prefix $TA_TEST_ANA which will contain the results. Please check the attachment for result table.

6.This analysis will give you the positive,negative,neutral sentiment of your text or document. Just for example take below text

'bad good best'

bad- StrongNegativeSentiment

good-WeakPositiveSentiment

best-StrongPositiveSentiment


We can use sentimental Analysis to read the customer's sentiment about the products or etc.

Please check the out put table.

3 Comments
Labels in this area