## 4 Proposed Method
### Proposed Model Architecture  
Following the state-of-the-art practices in implementing an effective classification method for hate speech detection (please see Section 2), we propose a method that utilizes two neural network architectures: CNN and CNN-LSTM. **Character-level CNN**. Typically, convolutional neural networks (CNNs) are used to extract information from raw signals in applications such as speech recognition, image classification, and computer vision. However, a one-dimensional CNN can also be applied to textual data, considering it as another type of raw signal at the character level [37]. The study by [PERSON] et al. [37] demonstrated that a CNN could be applied only on characters to understand text data without requiring the knowledge of words used in the text and the syntactic/semantic structure of the text language. Character-level representation of the tweets overcomes the problem of misspellings, out-of-vocabulary words in the test set that are not in the training set, and syntactically identical words/homographs with different meanings in the same or different languages that are faced while using word-level representation [7]. Character-level representation increases the chance of having the same characters in the training and test set. Due to the above reasons, character-level representation of tweets is appropriate for our multilingual dataset. Using the Keras tokenizer class, we parse tweets (text) into characters and create an index for each unique tokenized character. The dataset alphabet consists of 28 characters, including 26 English letters, space, and an unknown character (\"UNK\") used to replace out-of-vocabulary characters. Then, tweets are represented using their pertinent sequence of indices. Since tweets have varying numbers of characters, and since the CNN accepts input data points of fixed size, all tweets are zero-padded to fix the length to exactly 280 characters, which is the maximum allowed tweet length on Twitter. Each tweet is now represented as a vector of 280 characters. Each tokenized character is represented by a 28-dimension vector that contains the value 1 in the character's position (one-hot encoding) and the value 0 elsewhere. **Example 4.1 (one-hot encoding)**. Given the tweet \"you are bad\", let us assume the following indexing for some of the characters:  
\(\{\)''1, 'a': 2, 'b': 3, 'd': 4, 'e': 5, 'r': 6, 'o': 7, 'u': 8 'y': 9\(\}\). Then, the above tweet is represented as follows:  
\(\{\)9 7 8 1 2 6 5 1 3 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
One output layer, with two neurons and \"sigmoid\" activation function (where the number of neurons is the number of target class labels). **Character-level CNN-LSTM**. A combination of two deep neural networks (CNN and LSTM) with character-level embedding is prepared by modifying the character-level CNN architecture by adding an LSTM layer. We leverage the benefits of both CNN and LSTM in a single architecture and use a unified model called CNN-LSTM for the detection of hate speech [38]. A CNN is commonly known to act as a good feature extractor using convolving filters, whereas LSTM is a special type of recurrent neural network (RNN) that has proven to learn and capture long-term dependencies in sequential data by considering the previous context/data. In the area of hate speech detection, the CNN can be used to extract character combinations and LSTM to learn long-term character dependencies [38]. Figure 3 illustrates our initial CNN-LSTM architecture with character-level representation. The CNN-LSTM architecture contains the following layers in sequence:  
One input layer, where the shape of the layer is 280 (maximum length of a tweet). One embedding layer, with an embedding size of 28 (dimension of each character). Three convolution layers, each with 100 filters, a window size of 3, stride 1, padding as \"valid\", and \"relu\" activation function. Two of the convolution layers are followed by a max-pooling layer with a window size of 3.