2
$\begingroup$

For example in the following two tweets, we can see the first one seems to be more negative than the second one:

  1. "You are not required to come here now!!!"

  2. "You are not required to come here now"

What are some ways to count the effect of exclamation marks so that we get better results?

In the following tweet:

"He is angry!!!"

We can keep "angry" two times, i.e., the tweet becomes:

"He is angry angry."

So suppose we are using positive/negative frequency model for sentiment analysis, then it's more likely that the word "angry" will be considered negatively because of its higher frequency in negative tweets.

$\endgroup$
1
$\begingroup$

When tokenizing, separate and keep the exclamation points. Then use a count-based vectorization to create exclamation points feature with the number of occurrences.

The model will then have the opportunity to learn to weigh how the frequency of exclamation points contribute to positive/negative sentiment.

$\endgroup$
0
$\begingroup$

It really depends on the model you use for classification, or better for sentence vectorisation. you can for sure add a special token for the exclamation mark in order to make the model understand that your first sentence is worse than the second one.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.