Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

"no" as a neutral result in Sentiment Analysis

Joel_Mills
6 - Meteoroid

The answer to the following question is being asked of our students.
"do you have any specific comments about your tutor?" and I am looking at using the sentiment analysis tool as part of the Intelligence suite to perform this analysis. However, when the student responds "No" as in, "No I don't have any specific comments to make" it is recording it as a negative result, when, infact, this would normally be classed as a neutral result.

 

Are stop words the correct way to proceed here as in by identifying "No" as a stop word this will be skipped in the sentiment analysis? I would rather "No" was correctly recorded as a neutral response in the analysis however. 

 

Any advice please?

4 REPLIES 4
alexnajm
17 - Castor
17 - Castor

"No" is a negative word generally which is why sentences with it would have a negative impact versus those without it. So I would argue it's not incorrect, it's just one of those things with natural language processing where it's hard for computers to understand context.

 

You can use the text pre-processing tool beforehand to take out specific stop words, but generally you should not use this tool before sentiment analysis. I would only use it to remove specific words. Alternatively, use a regular Formula tool to Replace any instance of No with nothing.

RobertOdera
13 - Pulsar

Hi, @Joel_Mills 

 

Consider the following:

 

1. You might not want to make no a stopword, as it will be stripped from all comments and will likely degrade your output quality

2. Since it is a survey, pre-treat your data to exclude all responses where the answer to that specific question is no or anything to the effect of "No, I do not have any comments."

3. No is not a neutral result - in your use case, it is most likely a n/a result...and there's a difference

4. Pair up the actual rating with the sentiment derived to get a better triangulation (e.g., a 4-star or 5-star rating on a scale of 1 to 5, with the answer no to the question is very different from a 1-star or 2-star rating with no to the same question.

 

I hope you find this helpful - Cheers!

Joel_Mills
6 - Meteoroid

We already have a 1-5 star rating which we use to calculate a scored average rating for the tutors over time. This is helpful, however we also need to analyse the comments. 
Students often don't want to score their tutors badly as they know this has impact, however will provide feedback, some of which is negative. In this case, the response to the question "Do you have any additional comments on your tutor?" is getting responses of "No" which is being flagged as negative. 

I am tinkering with the min Negative Classification and Min Positive Classification fields in the Sentiment Analysis tool reducing the negative to -0.7 to pick up on only the really negative comments and flagging them, and reducing the Positive to 0.2 to increase picking up single word responses like"OK" as positive. This seems to be working, but after every run these settings are returning to default of -0.5 and 0.5 respectively.. which is annoying as I then have no faith in being able to schedule this on the server.

What would be the expression/formula needed to replace all single word "No" responses to something like, "I have no comment at this time"?


alexnajm
17 - Castor
17 - Castor

The ReplaceFirst function would do well - only replacing the first instance of No. Otherwise I would consider a Find Replace tool because you could give a list of what to look for and what to replace it with

 

ReplaceFirst([Answer],"No","I have no comment at this time")

Labels