Adlandırılmış Varlık Tanıma Modelleri ile Türkçe Sosyal Medya Metinlerinde Küfürlü Sözlerin Sansürlenmesi

Adlandırılmış varlık tanıma problemi, veri çıkarımı, doğal dil işleme ve metin madenciliği gibi alanların alt dalı olarak ele alınmaktadır. Adlandırılmış varlık tanıma, yapılandırılmamış metinlerdeki varlık isimlerinin uygunluklarına göre önceden belirlenen kişi ismi, organizasyon ismi veya yer ismi gibi sınıflara atama yapmak için kullanılan bir araçtır. Gelişen teknoloji ile birlikte sosyal ağlar çok insan tarafından kullanılmaktadır. Sosyal medya kullanan kişiler her türlü resim, metin veya video içeriklerini paylaşabilmektedir. Paylaşılan bu içerikler ise bazen uygunsuz yani aile yapısını etkiler nitelikte olabilmektedir. Bu çalışmada, Twitter’daki Türkçe tweetler kullanılarak küfür, hakaret ve uygunsuz kelimeler adlandırılmış varlık tanıma problemi olarak ele alınmış ve bu kelimeler farklı yöntemler ile tespit edilmeye çalışılmıştır. Çalışmada, önce metinlerde geçen kelime ve kelime öbekleri etiketlenmiş daha sonra ise etiketlenen kelimeler vektörleştirilmiştir. Vektörler, Bi-LSTM ve öneğitimli BERT modelleri kullanılarak eğitim yapılmıştır. Bi-LSTM modeli hem eğitimde hem de test aşamasında %99‘a yakın doğruluk oranı sergilemiştir. BERT modeli ise eğitim aşamasında %99 civarında doğruluk oranı gösterirken, test başarısının %95 civarında olduğu gözlemlenmiştir. Çalışma hızı açısından, Bi-LSTM modelinin BERT modelinden yaklaşık olarak 3 kat daha hızlı olduğu görülmüştür.

Censorship of Profanity Words in Turkish Social Media Texts with Named Entity Recognition Models

Named Entity Recognition problem is considered as a sub-branch of fields such as data extraction, natural language processing and text mining. Named entity recognition is a tool used to assign classes such as predetermined person name, organization name or place name according to the suitability of entity names in unstructured texts. With the developing technology, social networks are used by many people. People using social media can share any image, text or video content. These shared contents may be inappropriate, that is, affect the family structure. In this study, using Turkish tweets on Twitter, swearing, insults and inappropriate words were studied as a named entity definition problem and these words were tried to be determined by different methods. In the study, first the words and phrases in the texts were labeled, and then the labeled words were vectorized. Training was done using vectors, Bi-LSTM and pretrained BERT models. The Bi-LSTM model showed close to 99% accuracy both in training and testing. On the other hand, the BERT model showed a training accuracy of around 99% during the training phase, while the test success was observed around 95%. In terms of operating speed, it has been observed that the Bi-LSTM model is approximately 3 times faster than the BERT model.

___

  • Bowden, K. K., Wu, J., Oraby, S., Misra, A., and Walker, M., 2018. SlugNERDS: A named entity recognition tool for open domain dialogue systems. arXiv preprint arXiv:1805.03784.
  • Çelik, A. and Yıldırım, B., 2020. Turkish profanity detection enhanced by artificial intelligence. 28th Signal Processing and Communications Applications Conference (SIU), 1-4. IEEE.
  • Deepak, G., Teja, V., and Santhanavijayan, A., 2020. A novel firefly driven scheme for resume parsing and matching based on entity linking paradigm. Journal of Discrete Mathematical Sciences and Cryptography, 23(1), 157-165.
  • Devlin, J., Chang, M. W., Lee, K., and Toutanova, K., 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
  • Grishman, R., 1995. The NYU System for MUC-6 or Where's the Syntax?, New York Unıv, Ny, Dept. Of Computer Scıence.
  • Guo, J., Xu, G., Cheng, X., and Li, H., 2009. Named entity recognition in query. In Proceedings of the 32nd international ACM SIGIR conference on Research and development in information retrieval, 267-274.
  • Güneş, A., and Tantuğ, A. C., 2018. Turkish named entity recognition with deep learning. In 2018 26th Signal Processing and Communications Applications Conference (SIU), 1-4. IEEE.
  • Han, J., Sun, A., Cong, G., Zhao, W. X., Ji, Z., and Phan, M. C., 2017. Linking fine-grained locations in user comments. IEEE Transactions on Knowledge and Data Engineering, 30(1), 59-72.
  • Hochreiter, S., and Schmidhuber, J., 1997. Long short-term memory. Neural computation, 9(8), 1735-1780.
  • Krause, S., Li, H., Uszkoreit, H., and Xu, F., 2012. Large-scale learning of relation-extraction rules with distant supervision from the web. In International Semantic Web Conference, 263-278, Springer, Berlin, Heidelberg.
  • Krupka, G., 1995. SRA: Description of the SRA system as used for MUC-6. In Sixth Message Understanding Conference (MUC-6): Proceedings of a Conference Held in Columbia, Maryland, November 6-8, 1995.
  • Laboreiro, G., and Oliveira, E., 2014. What we can learn from looking at profanity. In International Conference on Computational Processing of the Portuguese Language, 108-113, Springer, Cham.
  • Lafferty J., McCallum A., Pereira F., et al., 2001. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the eighteenth international conference on machine learning, ICML, 1, 282–289.
  • LeCun, Y., Boser, B. E., Denker, J. S., Henderson, D., Howard, R. E., Hubbard, W. E., and Jackel, L. D., 1990. Handwritten digit recognition with a back-propagation network. In Advances in neural information processing systems, 396-404.
  • LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P., 1998. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11), 2278-2324.
  • Lee, H. S., Lee, H. R., Park, J. U., and Han, Y. S., 2018. An abusive text detection system based on enhanced abusive and non-abusive word lists. Decision Support Systems, 113, 22-31.
  • Luo, F., Xiao, H., and Chang, W., 2011. Product named entity recognition using conditional random fields. In 2011 Fourth international conference on business intelligence and financial engineering, 86-89. IEEE.
  • Manning, C. D., Surdeanu, M., Bauer, J., Finkel, J. R., Bethard, S., and McClosky, D., 2014. The Stanford CoreNLP natural language processing toolkit. In Proceedings of 52nd annual meeting of the association for computational linguistics: system demonstrations, 55-60.
  • Meng, X., Wei, F., Liu, X., Zhou, M., Li, S., and Wang, H., 2012. Entity-centric topic-oriented opinion summarization in twitter. In Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining, 379-387.
  • Mikolov T., Chen K., Corrado G., and Dean J., 2013. Efficient estimation of word representations in vector space, arXiv preprint arXiv:1301.3781.
  • Mikolov T., Sutskever I., Chen K., Corrado G.S., and Dean J., 2013. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, 3111–3119.
  • Nasiboglu R. and Gencer M., 2021. Comparison of Spacy And Stanford Libraries' Pre-Traıned Deep Learnıng Models for Named Entıty Recognıtıon, Journal of Modern Technology and Engineering, 6(2), 104-111.
  • Özkaya, S., and Diri, B. 2011. Named entity recognition by conditional random fields from Turkish informal texts. In 2011 IEEE 19th Signal Processing and Communications Applications Conference (SIU), 662-665). IEEE.
  • Pawar, S., Srivastava, R., and Palshikar, G. K., 2012. Automatic gazette creation for named entity recognition and application to resume processing. In Proceedings of the 5th ACM COMPUTE Conference: Intelligent & scalable system technologies, 1-7.
  • Pradhan S., Moschitti A., Xue N., Ng H.T., Björkelund A., Uryupina O., Zhang Y., and Zhong Z., 2013. Towards robust linguistic analysis using ontonotes. In CoNLL, 143–152.
  • Ramshaw, L., and Marcus, M. P., 1995. Text Chunking Using Transformation-Based Learn. ACL Third Workshop on Very Large Corpora, June 1995, 82-94.
  • Ratadiya, P., and Mishra, D., 2019. An attention ensemble based approach for multilabel profanity detection. In 2019 International Conference on Data Mining Workshops (ICDMW), 544-550. IEEE.
  • Rau L.F., 1991. Extracting company names from text, In Proceedings of Seventh IEEE Conference on Artificial Intelligence Applications, 1, 29-32: IEEE.
  • Sang E. F. and Veenstra J., 1999. Representing text chunks, In Proceedings of the ninth conference on European chapter of the Association for Computational Linguistics, 173-179. Association for Computational Linguistics.
  • Sarı, Ö. C., ve Aktaş, Ö., 2018. Türkçe Ders Metinleri İçin Özelleştirilmiş Bir Varlık İsmi Tanıma Yapısı. Türkiye Bilişim Vakfı Bilgisayar Bilimleri ve Mühendisliği Dergisi, 11(2), 52-68.
  • Schiersch, M., Mironova, V., Schmitt, M., Thomas, P., Gabryszak, A., and Hennig, L., 2020. A german corpus for fine-grained named entity recognition and relation extraction of traffic and industry events. arXiv preprint arXiv:2004.03283.
  • Schmid, H., 1999. Improvements in part-of-speech tagging with an application to German. In Natural language processing using very large corpora, 13-25. Springer, Dordrecht.
  • Shen, Y., Yun, H., Lipton, Z. C., Kronrod, Y., and Anandkumar, A., 2017. Deep active learning for named entity recognition. arXiv preprint arXiv:1707.05928.
  • Sienčnik, S. K., 2015. Adapting word2vec to named entity recognition. In Proceedings of the 20th Nordic Conference of Computational Linguistics (NODALIDA 2015), 239-243.
  • Sood, S. O., Antin, J., and Churchill, E., 2012. Using crowdsourcing to improve profanity detection. In 2012 AAAI Spring Symposium Series, 69-74.
  • Sood, S., Antin, J., and Churchill, E., 2012. Profanity use in online communities. In Proceedings of the SIGCHI conference on human factors in computing systems, 1481-1490.
  • Subramaniam, L. V., Faruquie, T. A., Ikbal, S., Godbole, S., and Mohania, M. K., 2009. Business intelligence from voice of customer. In 2009 IEEE 25th International Conference on Data Engineering, 1391-1402). IEEE.
  • Su, H. P., Huang, Z. J., Chang, H. T., and Lin, C. J., 2017. Rephrasing profanity in chinese text. In Proceedings of the First Workshop on Abusive Language Online, 18-24.
  • Teh, P.L., and Cheng, C.B., 2020. Profanity and hate speech detection. International Journal of Information and Management Sciences, 31(3), 227-246.
  • Sang E.F. and Meulder F., 2003. Introduction to the conll-2003 shared task: Language independent named entity recognition. In Proceedings of CoNLL-2003, Edmonton, Canada, 4, 142–145. Association for Computational Linguistics.
  • Wallach, H.M., 2004. Conditional Random Fields: An Introduction, University of Pennsylvania CIS Technical Report.
  • Yılmaz, Ş.Ş., Özer, İ., ve Gökçen, H., 2022. Twitter Platformundan Elde Edilen Türkçe Saldırgan Dil Derlemi. Mühendislik Bilimleri ve Araştırmaları Dergisi, 4(2), 304-316.
  • Yi, M., Lim, M., Ko, H., and Shin, J., 2021. Method of profanity detection using word embedding and LSTM. Mobile Information Systems, Article ID: 6654029, https://doi.org/10.1155/2021/6654029
  • https://github.com/ezgisubasi/turkish-tweets-sentiment-analysis/tree/main/data, (10.05.2022)
  • https://github.com/d35k/Turkish-Swear-Words/blob/master/swears.txt, (10.05.2022)