Abstract
Vulgarity is a common linguistic expression used to perform several linguistic functions. Understanding its usage can aid both linguistic and psychological phenomena as well as benefit downstream natural language processing applications such as sentiment analysis. This study performs a large-scale, data-driven empirical analysis of vulgar words using social media data. We analyze the socio-cultural and pragmatic aspects of vulgarity using tweets from users with known demographics. Further, we collect sentiment ratings for vulgar tweets to study the relationship between the use of vulgar words and perceived sentiment and show that explicitly modeling vulgar words can boost sentiment analysis performance.
Introduction
Presented at COLING 2018, this research explores the nuanced role of vulgarity in social media communication. Rather than viewing vulgarity as mere noise or "bad words" to be filtered, the authors argue it is a sophisticated linguistic tool. It varies significantly across demographics and serves as a powerful intensifier for sentiment.
Socio-dynamics of Vulgarity
In many Natural Language Processing (NLP) pipelines, vulgarity is treated as noise or hate speech. However, it appears in approximately 1.15% of tweets, serving various pragmatic functions such as emphasis, idiomatic expression, or sentiment signaling.
The researchers examined the relationship between vulgarity frequency and user traits using partial Pearson correlations, controlling for age and gender to ensure robust findings.
Key demographic insights include:
- Age: The strongest predictor; younger users use profanity significantly more often.
- Socio-economics & Faith: Vulgarity is anti-correlated with religiosity, education, and income.
- Political Ideology: Liberal users are more likely to use vulgarity than conservative ones.
Sentiment Perception and the "Intensifier" Effect
To measure the impact of vulgarity, the researchers compared human sentiment ratings of original tweets versus "censored" versions where vulgar terms were removed.
Removing vulgarity significantly "weakened" the perceived sentiment, proving that these words carry heavy semantic weight. For instance, in positive tweets, younger and less religious users often use vulgarity to amplify positive sentiment (e.g., "this is the sh*t"). Conversely, censorship can destroy meaning entirely; 5% of tweets became unintelligible to human annotators once vulgar words were removed.
Modeling Vulgarity in Sentiment Analysis
The study tested three strategies for incorporating vulgarity into a bidirectional Long Short-Term Memory (Bi-LSTM) network:
- Masking: Replacing vulgar words with a generic
<VG>token. - Token Insertion: Adding a
<VG>token immediately after the original vulgar word. - Concatenation: Appending the count of vulgar words to the final hidden state before classification.
Key Results
Explicitly informing the model about vulgarity consistently improved sentiment prediction performance.
The Concatenation method achieved the best overall MAE of 0.759 on the custom dataset, outperforming the baseline Bi-LSTM (0.791). On the SemEval benchmark, Token Insertion was the top performer, reducing MAE from 1.320 to 1.068. Interestingly, simple masking was found to be suboptimal, suggesting that the specific choice of vulgar word carries unique nuances that a generic mask erases.
Conclusion
Vulgarity is a rich source of pragmatic and sentiment information. By moving beyond simple filtering and explicitly modeling these terms, NLP systems can achieve a deeper understanding of social media discourse. Future work should focus on classifying the specific pragmatic functions of vulgarity in context to further refine sentiment analysis.
Summary updated