<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>An Ensemble Approach for Hate and Ofensive Language Identification in English and Indo-Aryan Languages</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Abhinav Kumar</string-name>
          <email>abhinavanand05@gmail.com</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pradeep Kumar Roy</string-name>
          <email>pradeep.roy@iiitsurat.ac.in</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sunil Saumya</string-name>
          <email>sunil.saumya@iiitdwd.ac.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Workshop Proceedings</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science &amp; Engineering, Indian Institute of Information Technology Dharwad</institution>
          ,
          <country country="IN">India</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Computer Science &amp; Engineering, Indian Institute of Information Technology Surat</institution>
          ,
          <addr-line>Gujarat</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Department of Computer Science &amp; Engineering, Siksha 'O' Anusandhan Deemed to be University</institution>
          ,
          <addr-line>Bhubaneswar</addr-line>
          ,
          <country country="IN">India</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The freedom to upload and the lack of efective social media monitoring have resulted in a slew of societal issues such as cyberbullying, ofensive content, and hate speech. Due to this, identifying hate and abusive language on social media is one of the trendiest research topics these days. This work proposes an ensemble-based model for detecting hate and ofensive language in English and Hindi social media postings, which combines a support vector machine, logistic regression, random forest, gradient boosting, and Adaboost classifiers. The use of word-level n-gram features performed significantly well in the English dataset, with macro  1-scores of 0.79 and 0.59 for two diferent tasks, while character-level n-gram features performed significantly well in the Hindi dataset, with macro  1-scores of 0.75 and 0.47 for two diferent tasks.</p>
      </abstract>
      <kwd-group>
        <kwd>Hate speech</kwd>
        <kwd>Ofensive content</kwd>
        <kwd>Deep learning</kwd>
        <kwd>Machine learning</kwd>
        <kwd>Ensemble learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The rise of mobility and the accessibility of the Internet has enticed people all over the world to
utilize social media platforms for communication [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. The majority of Internet users used
at least one social media network today, such as Facebook, Twitter, Instagram, YouTube, or
others. Because communication on these platforms is inexpensive, people are publishing an
endless amount of content [3, 4]. In recent years, the freedom to upload and the lack of efective
monitoring has led to a slew of societal issues, including cyberbullying, ofensive content, and
hate speech [5, 6, 7, 8, 9]. Because of anonymity and mobility provided by the social platforms,
the cultivation and spread of hate speech eventually leading to hate crime has become easy in a
virtual landscape beyond the reach of traditional law enforcement. Hate speech may be defined
as “any communication that disparages a person or a group on the basis of their gender, sexual
orientation, nationality, religion, or other characteristics” [10, 11, 12].
      </p>
      <p>Hate speech is considered harmful by several online forums, including Facebook1, YouTube2,
and Twitter3, which have policies in place to delete hate speech content. There is significant
motivation to explore automatic hate speech detection because of societal concern and how
ubiquitous hate speech is becoming on the Internet [5, 13, 14]. The distribution of nasty content
can be prevented by automating its identification. Automatic detection of hate speech over the
social platform is needed in the current scenario; however, it has several challenges starting
from the definition of hate speech itself. Recent social posts containing code-mixed languages,
such as English-Hindi, English-Malayalam, or any other code-mixed languages. If a model was
developed with a unimodal dataset like English, it might not detect the hate speech post having
code-mixed languages efectively.</p>
      <p>Several works [13, 14, 10, 8, 15, 16, 17] have been proposed by researchers to identify hate
speech from social media. Kumari and Singh [15] presented a model based on convolutional
neural networks for detecting hate, obscenity, and abusive language in English and Hindi tweets.
To recognize hatred, ofensive, and profanity in English, Hindi, and German tweets, Mishra
and Pal [16] developed an attention-based bidirectional long-short-term memory network.
Mujadia et al. [17] developed an ensemble-based model comprised of a support vector machine,
random forest, and Adaboost classifiers to identify hate content in tweets written in English,
Hindi, and German. Roy et al. [10] proposed a convolutional neural network-based model for
the identification of hate content from social media. Kumar et al. [ 13] proposed a fine-tuned
BERT model whereas [14] used conventional machine learning models for the hate speech
identification. Saumya et al. [ 8] experimented with several conventional machine learning and
deep learning models for the hate speech identification from Dravidian social media posts. They
found character N-gram features with conventional machine learning classifiers performing
better than the complex deep learning models.</p>
      <p>In line with these works, the current paper proposes an ensemble-based machine learning
model for the identification of hate and ofensive content from English and Hindi social media
posts. The dataset published for the FIRE-2021 workshop [18, 19] is used to validate the proposed
ensemble-based model.</p>
      <p>The rest of the sections are organized as follows: Section 2 discusses the proposed
methodology in detail. Section 3 lists the findings and finally the paper is concluded in section 4.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Methodology</title>
      <p>The detailed diagram of the proposed ensemble-based model can be seen in Figure 1. The
proposed ensemble-based model consists of five diferent classifiers: (i) Support Vector Machine
(SVM), (ii) Logistic Regression (LR), (iii) Random Forest (RF), (iv) Gradient Boosting (GB), and
(v) AdaBoost. The proposed model is validated with the dataset published in FIRE-2021 [18].
Two diferent sub-tasks were given: (i) a coarse-grained binary classification of tweets in Hate
and Ofensive (HOF) and Non-Hate and ofensive (NOT) classes, (ii) the further classification of
Hate and Ofensive (HOF) tweets into Hate (HATE), profane (PRFN) and ofensive (OFFN) posts.
1https://www.facebook.com/communitystandards/objectionable .
2https://support.google.com/youtube/answer/2801939.
3https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy.</p>
      <sec id="sec-2-1">
        <title>Social Media Posts</title>
        <p>)
cny ecny
e u
u q
eq re
-rF tF s
n re
(eFTm ceoum teaF
r u
ID eD
- s
FT revn</p>
        <p>I</p>
      </sec>
      <sec id="sec-2-2">
        <title>Support Vector</title>
      </sec>
      <sec id="sec-2-3">
        <title>Machine</title>
      </sec>
      <sec id="sec-2-4">
        <title>Logistic</title>
      </sec>
      <sec id="sec-2-5">
        <title>Regression</title>
      </sec>
      <sec id="sec-2-6">
        <title>Random Forest</title>
      </sec>
      <sec id="sec-2-7">
        <title>Gradient</title>
      </sec>
      <sec id="sec-2-8">
        <title>Boosting</title>
      </sec>
      <sec id="sec-2-9">
        <title>AdaBoost</title>
        <p>F
O
H
T
O
N</p>
      </sec>
      <sec id="sec-2-10">
        <title>HATE</title>
      </sec>
      <sec id="sec-2-11">
        <title>OFFN</title>
        <p>The overall data statistic for both the task can be seen in Table 1.</p>
        <p>In the experimentation, the aforementioned classifiers performed well individually in the
identification of hate and ofensive content, due to this, we utilized them to construct an
ensemble-based model that can train eficiently to identify hate and ofensive content on social
media. To provide input to the proposed model, we experimented with diferent combinations
of word and character n-gram TF-IDF (Term-Frequency Inverse Document Frequency) features
for both English and Hindi datasets.</p>
        <p>• English Task-A and Task-B: TF-IDF is retrieved from the textual contents of the social
media post to provide input to the suggested ensemble-based model. In the case of English
language posts, we found that the first 50,000 uni-gram, bi-gram, and tri-gram word-level
TF-IDF features performed well with the model in classifying posts into the various hate
classes, compared to other n-gram combinations of word-level and character-level TF-IDF
features.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Results</title>
      <p>The performance of the proposed model is measured in terms of macro precision, macro recall,
macro  1-score, and accuracy. The results for both the sub-tasks for the English and Hindi
dataset are listed in Table 2. In the case of English Task-A, the proposed ensemble-based model
achieved a macro precision of 0.78, macro recall of 0.75, macro  1-score of 0.76, and accuracy of
78.22%. The confusion matrix for English Task-A can be seen in Figure 2.</p>
      <p>In the case of English Task-B, the proposed ensemble-based model achieved a macro precision
of 0.63, macro recall of 0.59, macro  1-score of 0.59, and accuracy of 65.96%. The confusion
matrix for English Task-B can be seen Figure 3. For Hindi Task-A, the proposed model achieved
a macro precision of 0.80, a macro recall of 0.74, macro  1-score of 0.75, and accuracy of 80.22%.
The confusion matrix for the Hindi Task-B can be seen in Figure 4. Similarly, for Hindi Task-B,
the proposed model achieved a macro precision of 0.62, macro recall of 0.44, macro  1-score of
0.47, and accuracy of 73.56%. The confusion matrix for the Hindi Task-B can be seen in Figure 5.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>The detection of hate speech on social media poses significant problems. This paper investigates
the usefulness of TF-IDF features at the word and character levels using an ensemble-based
machine learning approach. The proposed ensemble-based model achieved macro  1 -scores
of 0.79 and 0.59 for English task-A and task-B, respectively, and 0.75 and 0.47 for Hindi task-A
and task-B, respectively. In the future, some other deep learning-based ensemble models can be
implemented for the identification of hate and ofensive content from social media posts.
HOF
[3] A. Priya, A. Kumar, Deep ensemble approach for COVID-19 fake news detection from
social media, in: 2021 8th International Conference on Signal Processing and Integrated
Networks (SPIN), IEEE, 2021, pp. 396–401.
[4] A. Kumar, J. P. Singh, S. Saumya, A comparative analysis of machine learning techniques
for disaster-related tweet classification, in: 2019 IEEE R10 Humanitarian Technology
Conference (R10-HTC)(47129), IEEE, 2019, pp. 222–227.
[5] M. Mondal, L. A. Silva, F. Benevenuto, A measurement study of hate speech in social
media, in: Proceedings of the 28th ACM conference on hypertext and social media, 2017,
pp. 85–94.
[6] G. Kumar, J. P. Singh, A. Kumar, A deep multi-modal neural network for the identification
of hate speech from social media, in: Conference on e-Business, e-Services and e-Society,
Springer, 2021, pp. 670–680.
[7] A. K. Mishra, S. Saumya, A. Kumar, IIIT_DWD@ HASOC 2020: Identifying ofensive
content in Indo-European languages, in: FIRE (Working Notes), 2020.
[8] S. Saumya, A. Kumar, J. P. Singh, Ofensive language identification in Dravidian code
mixed social media text, in: Proceedings of the First Workshop on Speech and Language
Technologies for Dravidian Languages, 2021, pp. 36–45.
[9] P. Badjatiya, S. Gupta, M. Gupta, V. Varma, Deep learning for hate speech detection
in tweets, in: Proceedings of the 26th international conference on World Wide Web
companion, 2017, pp. 759–760.
[10] P. K. Roy, A. K. Tripathy, T. K. Das, X.-Z. Gao, A framework for hate speech detection
using deep convolutional neural network, IEEE Access 8 (2020) 204951–204962.
[11] P. Burnap, M. L. Williams, Cyber hate speech on Twitter: An application of machine
classification and statistical modeling for policy and decision making, Policy &amp; internet 7
(2015) 223–242.
[12] R. Jain, D. Goel, P. Sahu, A. Kumar, J. Singh, Profiling Hate Speech Spreaders on Twitter—
Notebook for PAN at CLEF 2021, in: G. Faggioli, N. Ferro, A. Joly, M. Maistro, F. Piroi
(Eds.), CLEF 2021 Labs and Workshops, Notebook Papers, CEUR-WS.org, 2021. URL:
http://ceur-ws.org/Vol-2936/paper-175.pdf.
[13] A. Kumar, S. Saumya, J. P. Singh, NITP-AI-NLP@ HASOC-FIRE2020: Fine tuned BERT for
the hate speech and ofensive content identification from social media., in: FIRE (Working
Notes), 2020, pp. 266–273.
[14] A. Kumar, S. Saumya, J. P. Singh, NITP-AI-NLP@ HASOC-Dravidian-CodeMix-FIRE2020:
A machine learning approach to identify ofensive languages from Dravidian code-mixed
text., in: FIRE (Working Notes), 2020, pp. 384–390.
[15] K. Kumari, J. P. Singh, AI ML NIT Patna at HASOC 2019: Deep learning approach for
identification of abusive content., in: FIRE (Working Notes), 2019, pp. 328–335.
[16] A. Mishra, S. Pal, IIT Varanasi at HASOC 2019: Hate speech and ofensive content
identification in Indo-European languages., in: FIRE (Working Notes), 2019, pp. 344–351.
[17] V. Mujadia, P. Mishra, D. M. Sharma, IIIT-Hyderabad at HASOC 2019: Hate speech
detection., in: FIRE (Working Notes), 2019, pp. 271–278.
[18] S. Modha, T. Mandl, G. K. Shahi, H. Madhu, S. Satapara, T. Ranasinghe, M. Zampieri,
Overview of the HASOC Subtrack at FIRE 2021: Hate Speech and Ofensive Content
Identification in English and Indo-Aryan Languages and Conversational Hate Speech, in:
FIRE 2021: Forum for Information Retrieval Evaluation, Virtual Event, 13th-17th December
2021, ACM, 2021.
[19] T. Mandl, S. Modha, G. K. Shahi, H. Madhu, S. Satapara, P. Majumder, J. Schäfer, T.
Ranasinghe, M. Zampieri, D. Nandini, A. K. Jaiswal, Overview of the HASOC subtrack at FIRE
2021: Hate Speech and Ofensive Content Identification in English and Indo-Aryan
Languages, in: Working Notes of FIRE 2021 - Forum for Information Retrieval Evaluation,
CEUR, 2021. URL: http://ceur-ws.org/.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mandl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Modha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Majumder</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Patel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dave</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mandlia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Patel</surname>
          </string-name>
          ,
          <article-title>Overview of the hasoc track at fire 2019: Hate speech and ofensive content identification in indo-european languages</article-title>
          ,
          <source>in: Proceedings of the 11th forum for information retrieval evaluation</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>14</fpage>
          -
          <lpage>17</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Disaster severity prediction from twitter images</article-title>
          ,
          <source>in: Intelligence Enabled Research</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>65</fpage>
          -
          <lpage>73</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>