skip to main content
research-article

On Obstructing Obscenity Obfuscation

Published:24 April 2017Publication History
Skip Abstract Section

Abstract

Obscenity (the use of rude words or offensive expressions) has spread from informal verbal conversations to digital media, becoming increasingly common on user-generated comments found in Web forums, newspaper user boards, social networks, blogs, and media-sharing sites. The basic obscenity-blocking mechanism is based on verbatim comparisons against a blacklist of banned vocabulary; however, creative users circumvent these filters by obfuscating obscenity with symbol substitutions or bogus segmentations that still visually preserve the original semantics, such as writing shit as $h¡;t or s.h.i.t or even worse mixing them as $.h….¡.t. The number of potential obfuscated variants is combinatorial, yielding the verbatim filter impractical. Here we describe a method intended to obstruct this anomaly inspired by sequence alignment algorithms used in genomics, coupled with a tailor-made edit penalty function. The method only requires to set up the vocabulary of plain obscenities; no further training is needed. Its complexity on screening a single obscenity is linear, both in runtime and memory, on the length of the user-generated text. We validated the method on three different experiments. The first one involves a new dataset that is also introduced in this article; it consists of a set of manually annotated real-life comments in Spanish, gathered from the news user boards of an online newspaper, containing this type of obfuscation. The second one is a publicly available dataset of comments in Portuguese from a sports Web site. In these experiments, at the obscenity level, we observed recall rates greater than 90%, whereas precision rates varied between 75% and 95%, depending on their sequence length (shorter lengths yielded a higher number of false alarms). On the other hand, at the comment level, we report recall of 86%, precision of 91%, and specificity of 98%. The last experiment revealed that the method is more effective in matching this type of obfuscation compared to the classical Levenshtein edit distance. We conclude discussing the prospects of the method to help enforcing moderation rules of obscenity expressions or as a preprocessing mechanism for sequence cleaning and/or feature extraction in more sophisticated text categorization techniques.

References

  1. Youssef Bassil and Paul Semaan. 2012. ASR context-sensitive error correction based on Microsoft n-gram dataset. arXiv:1203.5262.Google ScholarGoogle Scholar
  2. Djamal Belazzougui and Mathieu Raffinot. 2013. Approximate regular expression matching with multi-strings. Journal of Discrete Algorithms 18, 14--21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Dirk Johannes Brand. 2016. Automatic Prediction of Comment Quality. Ph.D. Dissertation. Stellenbosch University, Stellenbosch, South Africa.Google ScholarGoogle Scholar
  4. Pete Burnap and Matthew L. Williams. 2015. Cyber hate speech on Twitter: An application of machine classification and statistical modeling for policy and decision making. Policy and Internet 7, 2, 223--242. DOI:http://dx.doi.org/10.1002/poi3.85 Google ScholarGoogle ScholarCross RefCross Ref
  5. Pete Burnap and Matthew L. Williams. 2016. Us and them: Identifying cyber hate on Twitter across multiple protected characteristics. EPJ Data Science 5, 11. Google ScholarGoogle ScholarCross RefCross Ref
  6. Erik Cambria, Bjorn Schuller, Bing Liu, Haixun Wang, and Catherine Havasi. 2013. Knowledge-based approaches to concept-level sentiment analysis. IEEE Intelligent Systems 28, 2, 12--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ying Chen, Yilu Zhou, Sencun Zhu, and Heng Xu. 2012. Detecting offensive language in social media to protect adolescent online safety. In Proceedings of the International Conference on Privacy, Security, Risk, and Trust (PASSAT’12) and the International Conference on Social Computing (SocialCom’12). IEEE, Los Alamitos, CA, 71--80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Peter Christen, Ross W. Gayler, Khoi-Nguyen Tran, Jeffrey Fisher, and Dinusha Vatsalan. 2016. Automatic discovery of abnormal values in large textual databases. Journal of Data and Information Quality 7, 1-2, Article No. 7. DOI:http://dx.doi.org/10.1145/2889311 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Yun-Sheng Chung, Wei-Hsun Lee, Chuan Yi Tang, and Chin Lung Lu. 2007. RE-MuSiC: A tool for multiple sequence alignment with regular expression constraints. Nucleic Acids Research 35, S2, W639--W644. Google ScholarGoogle ScholarCross RefCross Ref
  10. David Crystal. 2008. Txtng: The gr8 db8. Oxford University Press, Oxford, UK.Google ScholarGoogle Scholar
  11. Jesse Davis and Mark Goadrich. 2006. The relationship between precision-recall and ROC curves. In Proceedings of the 23rd International Conference on Machine Learning. ACM, New York, NY, 233--240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Luis Fernando D’Haro and Rafael E. Banchs. 2015. Automatic ranking of swear words using word embeddings and pseudo-relevance feedback. In Proceedings of the 2015 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA’15). IEEE, New York, NY, 815--820. Google ScholarGoogle ScholarCross RefCross Ref
  13. Nicholas Diakopoulos. 2016. CommentIQ: Enhancing journalistic curation of online news comments. In Proceedings of the 25th International Conference Companion on World Wide Web (WWW’16 Companion). 715--716. DOI:http://dx.doi.org/10.1145/2872518.2890099 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Marta Dynel. 2012. Swearing methodologically: The (im)politeness of expletives in anonymous commentaries on YouTube. Journal of English Studies 10, 25--50.Google ScholarGoogle ScholarCross RefCross Ref
  15. Anthony Y. Fu, Xiaotie Deng, Liu Wenyin, and Greg Little. 2006. The methodology and an application to fight against Unicode attacks. In Proceedings of the 2nd Symposium on Usable Privacy and Security (SOUPS’06). ACM, New York, NY, 91--101. DOI:http://dx.doi.org/10.1145/1143120.1143132 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Wolf Garbe. 2015. Fast Approximate String Matching with Large Edit Distances in Big Data. Retrieved March 20, 2017, from http://blog.faroo.com/2015/03/24/fast-approximate-string-matching-with-large-edit-distances/.Google ScholarGoogle Scholar
  17. Michael Gauthier and Adrien Guille. 2016. Text mining and Twitter to analyze British swearing habits. In Twitter for Research Handbook 2015, 2016, C. Levallois, M. Marchand, T. Mata, and A. Panisson (Eds.). EMLYON Press, Ecully, France, 27--46.Google ScholarGoogle Scholar
  18. Jose Gordillo and Eduardo Conde. 2007. An HMM for detecting spam mail. Expert Systems with Applications 33, 667--682. DOI:http://dx.doi.org/doi:10.1016/j.eswa.2006.06.016 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Isabelle Guyon and André Elisseeff. 2003. An introduction to variable and feature selection. Journal of Machine Learning Research 3, 1157--1182.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Peter Hannay and Gregory Baatard. 2012. The 2011 IDN homograph attack mitigation survey. In Proceedings of International Conference on Security and Management (SAM’12). 653--657.Google ScholarGoogle Scholar
  21. James N. Helfrich and Rick Neff. 2012. Dual canonicalization: An answer to the homograph attack. In Proceedings of the 2012 eCrime Researchers Summit (eCrime’12). IEEE, Los Alamitos, CA, 1--10.Google ScholarGoogle Scholar
  22. Hal Hodson. 2016. Our future language? English rulz OK. New Scientist. Retrieved March 20, 2017, from https://www.newscientist.com/article/2075668-our-future-language-english-rulz-ok-txtspk-and-mind-reading/Google ScholarGoogle Scholar
  23. Homa Hosseinmardi, Sabrina Arredondo Mattson, Rahat Ibn Rafiq, Richard Han, Qin Lv, and Shivakant Mishra. 2015. Detection of cyberbullying incidents on the Instagram social network. arXiv:1503.03909.Google ScholarGoogle Scholar
  24. Viktor Krammer. 2006. Phishing defense against IDN address spoofing attacks. In Proceedings of the 2006 International Conference on Privacy, Security, and Trust: Bridge the Gap Between PST Technologies and Business Services (PST’06). ACM, New York, NY, Article No. 32. DOI:http://dx.doi.org/10.1145/1501434.1501473 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Gustavo Laboreiro and Eugénio Oliveira. 2014a. Avaliaçao de métodos de desofuscaçao de palavroes. Linguamática 6, 2, 25--43.Google ScholarGoogle Scholar
  26. Gustavo Laboreiro and Eugénio Oliveira. 2014b. What we can learn from looking at profanity. In Proceedings of the International Conference on Computational Processing of the Portuguese Language. 108--113. Google ScholarGoogle ScholarCross RefCross Ref
  27. Seunghak Lee, Iryoung Jeong, and Seungjin Choi. 2007. Dynamically weighted hidden Markov model for spam deobfuscation. In Proceedings of the 20th International Joint Conference on Artificial Intelligence (IJCAI’07). 2523--2529.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Vladimir I. Levenshtein. 1966. Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics Doklady 10, 8, 707--710.Google ScholarGoogle Scholar
  29. Chun Yuan Lin and Yu Shiang Lin. 2014. Efficient parallel algorithm for multiple sequence alignments with regular expression constraints on graphics processing units. International Journal of Computational Science and Engineering 9, 1--2, 11--20.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Max-Emanuel Maurer and Lukas Höfer. 2012. Sophisticated phishers make more spelling mistakes: Using URL similarity against phishing. In Cyberspace Safety and Security. Springer, 414--426. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Yashar Mehdad and Joel Tetreault. 2016. Do characters abuse more than words? In Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue. 299--303. Google ScholarGoogle ScholarCross RefCross Ref
  32. Christian Mogollón Pinzón and Sergio Rojas-Galeano. 2015. A genomics-based profanity-safe Web forum. In Proceedings of the 10th Computing Colombian Conference (10CCC’15). IEEE, Los Alamitos, CA, 425--430. Google ScholarGoogle ScholarCross RefCross Ref
  33. Gonzalo Navarro. 2001. A guided tour to approximate string matching. ACM Computing Surveys 33, 1, 31--88. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Saul B. Needleman and Christian D. Wunsch. 1970. A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology 48, 3, 443--453. DOI:http://dx.doi.org/DOI: 10.1016/0022-2836(70)90057-4 Google ScholarGoogle ScholarCross RefCross Ref
  35. Marius Nicolae and Sanguthevar Rajasekaran. 2015. On string matching with mismatches. Algorithms 8, 2, 248--270. Google ScholarGoogle ScholarCross RefCross Ref
  36. Chikashi Nobata, Joel Tetreault, Achint Thomas, Yashar Mehdad, and Yi Chang. 2016. Abusive language detection in online user content. In Proceedings of the 25th International Conference on World Wide Web (WWW’16). 145--153. DOI:http://dx.doi.org/10.1145/2872427.2883062 Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Peter Norvig. 2007. How to Write a Spelling Corrector. Retrieved March 20, 2017, from http://norvig.com/spell-correct.htmlGoogle ScholarGoogle Scholar
  38. Marco A. F. Pimentel, David A. Clifton, Lei Clifton, and Lionel Tarassenko. 2014. A review of novelty detection. Signal Processing 99, 215--249. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Bite Qiu, Ning Fang, and Liu Wenyin. 2010. Detect visual spoofing in Unicode-based text. In Proceedings of the 2010 20th International Conference on Pattern Recognition (ICPR’10). IEEE, Los Alamitos, CA, 1949--1952. DOI:http://dx.doi.org/10.1109/ICPR.2010.480 Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Sergio A. Rojas-Galeano. 2013. Revealing non-alphabetical guises of spam-trigger vocables. Dyna 80, 182, 50--57.Google ScholarGoogle Scholar
  41. Narges Roshanbin and James Miller. 2011. Finding homoglyphs—a step towards detecting Unicode-based visual spoofing attacks. In Proceedings of the International Conference on Web Information Systems Engineering. 1--14. Google ScholarGoogle ScholarCross RefCross Ref
  42. Narges Roshanbin and James Miller. 2016. ADAMAS: Interweaving Unicode and color to enhance CAPTCHA security. Future Generation Computer Systems 55, 289--310. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Takaya Saito and Marc Rehmsmeier. 2015. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PloS One 10, 3, e0118432.Google ScholarGoogle ScholarCross RefCross Ref
  44. Azianura H. Shaari and Khaleel B. Bataineh. 2015. Netspeak and a breach of formality: Informalization and fossilization of errors in writing among ESL and EFL learners. International Journal for Cross-Disciplinary Subjects in Education 6, 2, 2165--2173. Google ScholarGoogle ScholarCross RefCross Ref
  45. Temple F. Smith and Michael S. Waterman. 1981. Identification of common molecular subsequences. Journal of Molecular Biology 147, 1, 195--197. DOI:http://dx.doi.org/10.1016/0022-2836(81)90087-5 Google ScholarGoogle ScholarCross RefCross Ref
  46. Sara Sood, Judd Antin, and Elizabeth Churchill. 2012a. Profanity use in online communities. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems. ACM, New York, NY, 1481--1490. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Sara Sood, Judd Antin, and Elizabeth Churchill. 2012b. Using crowdsourcing to improve profanity detection. In Proceedings of the AAAI Spring Symposium: Wisdom of the Crowd.Google ScholarGoogle Scholar
  48. Ellen Spertus. 1997. Smokey: Automatic recognition of hostile messages. In Proceedings of the 9th Conference on Innovative Applications of Artificial Intelligence. 1058--1065.Google ScholarGoogle Scholar
  49. Megan Squire and Rebecca Gazda. 2015. FLOSS as a source for profanity and insults: Collecting the data. In Proceedings of the 2015 48th Hawaii International Conference on System Sciences (HICSS’15). IEEE, Los Alamitos, CA, 5290--5298. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Teresa Elizabeth Stone, Margaret McMillan, and Mike Hazelton. 2015. Back to swear one: A review of English language literature on swearing and cursing in western health settings. Aggression and Violent Behavior 25, 65--74. Google ScholarGoogle ScholarCross RefCross Ref
  51. Dennis Venema. 2013. Evolution Basics: Genomes as Ancient Texts, Part 4. Retrieved March 20, 2017, from http://biologos.org/blogs/dennis-venema-letters-to-the-duchess/evolution-basics-genomes-as-ancient-texts-part-4.Google ScholarGoogle Scholar
  52. David Vilares, Miguel A. Alonso, and Carlos Gómez-Rodríguez. 2015. On the usefulness of lexical and syntactic processing in polarity classification of Twitter messages. Journal of the Association for Information Science and Technology 66, 9, 1799--1816. DOI:http://dx.doi.org/10.1002/asi.23284 Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Luis von Ahn. 2014. Offensive/Profane Word List: 1,300+ English Terms That Could Be Found Offensive. Retrieved March 20, 2017, from https://www.cs.cmu.edu/\,biglou/resources/bad-words.txt.Google ScholarGoogle Scholar
  54. Robert A. Wagner and Michael J. Fischer. 1974. The string-to-string correction problem. Journal of the ACM 21, 1, 168--173. DOI:http://dx.doi.org/10.1145/321796.321811 Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Jing Wang, Clement T. Yu, Philip S. Yu, Bing Liu, and Weiyi Meng. 2015. Diversionary comments under blog posts. ACM Transactions on the Web 9, 4, Article No. 18. DOI:http://dx.doi.org/10.1145/2789211 Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Wenbo Wang, Lu Chen, Krishnaprasad Thirunarayan, and Amit P. Sheth. 2014. Cursing in English on Twitter. In Proceedings of the 17th ACM Conference on Computer Supported Cooperative Work and Social Computing. ACM, New York, NY, 415--425. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Zeerak Waseem and Dirk Hovy. 2016. Hateful symbols or hateful people? Predictive features for hate speech detection on Twitter. In Proceedings of North American Chapter of the Association for Computational Linguistics: Human Language Technologies. 88--93. Google ScholarGoogle ScholarCross RefCross Ref
  58. Guang Xiang, Bin Fan, Ling Wang, Jason Hong, and Carolyn Rose. 2012. Detecting offensive tweets via topical feature discovery over a large scale Twitter corpus. In Proceedings of the 21st ACM International Conference on Information and Knowledge Management. ACM, New York, NY. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Zhi Xu and Sencun Zhu. 2010. Filtering offensive language in online communities using grammatical relations. In Proceedings of the 7th Annual Collaboration, Electronic Messaging, Anti-Abuse, and Spam Conference. 1--10.Google ScholarGoogle Scholar
  60. Xiaochun Yang, Tao Qiu, Bin Wang, Baihua Zheng, Yaoshu Wang, and Chen Li. 2016. Negative factor: Improving regular-expression matching in strings. ACM Transactions on Database Systems 40, 4, Article No. 25. DOI:http://dx.doi.org/10.1145/2847525 Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Xinwang Zhong. 2014. Deobfuscation based on edit distance algorithm for spam filtering. In Proceedings of the 2014 International Conference on Machine Learning and Cybernetics, Vol. 1. IEEE, Los Alamitos, CA, 109--114. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. On Obstructing Obscenity Obfuscation

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!