BookmarkSubscribeRSS Feed
sas_noob_1
Calcite | Level 5

Greetings everyone,

 

I would like to ask you something that might be simple to you.

 

I'm working on a Sentiment Analytics project that requires me to study 5,000 comments. I've never done Sentiment Analytics before in a program, I've only known it by concept hence I'm reaching out to the community for some advice.

 

One of the few things I'm trying to achieve but couldn't figure out how are...

1. Is there a way for me to separate sentences from feedbacks other than using a delimiter of a period (.).

For example:
This is my sentence. I like fruits (eg. Apple, Banana, Watermelon). This is my third sentence.

 

If I use the inbuilt split function and use the period (.) as a delimiter, 2 times it will look like this: 

 

1st split -

This is my sentence.

I like fruits (eg. Apple, Banana, Watermelon). This is my third sentence.

 

2nd split -

This is my sentence.

I like fruits (eg.

Apple, Banana, Watermelon). This is my third sentence.

 

What method do you suggest? Should I just edit the comment and remove the period in front of the eg.? 

 

I don't think doing it in excel would be very practical as there are 5000 records.

 

2. Is there a way for me to remove smileys using the Data Preparation of SAS Viya? 

 

eg. :), :D, 😞

 

3. How can I present a word cloud of the comments without showing them as sentences but rather by the words?

 

Thanks and regards,

 

Andric

3 REPLIES 3
RonAgresta
SAS Employee

Hi Andric,

 

For your first question, assuming you are using SAS Data Preparation in SAS Viya (based on a comment later in the post), have you tried using the "Other" delimiter option? From the documentation:

 

"If you choose Other in the Delimiter drop-down menu, enter the delimiters that you want to use in the text box. There is no limit to the number of delimiters that you can enter in this field. If you enter multiple delimiters, then the split occurs on a cell-by-cell basis according to the delimiters that you indicated, and in the order in which they appear in the Other text box." It may not be flexible enough to meet your needs though.

 

If you have access to the data quality transforms, there are parsing and field extraction transformations too, but they require you to develop some specialized data quality algorithms using a separate knowledge base editing tool.

 

Ron

sas_noob_1
Calcite | Level 5

Hello Ron,

 

Thank you for your kind help and reply.

 

I'm not sure if it's just my SAS Viya version or something but when I use the split option there is no "Other" option for it.

 

Below will be an attachment of what options I have in regards to the split options I can get.

 

f9c35c5e141bbe9ccc9556a811981f07.png

 

Reading on to your reply, and to quote, "There is no limit to the number of delimiters that you can enter in this field." , I believe that option would be "On multiple delimiters"

 

Sadly I only have access to SAS Visual Analytics, SAS Environment Manager and SAS Data Visual Data Builder.

 

Thanks,

 

Andric

RonAgresta
SAS Employee

I see now that I was referencing functionality that was just made available this week as enhancements to the data preparation component of SAS Viya. In the latest version you get this:

 

split.png

 

Ron

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 821 views
  • 0 likes
  • 2 in conversation