# SMS Spam Detection System Based on Deep Learning Architectures for Turkish and English Messages
## 3 Proposed Model
The first one is the Freeling English dictionary [47], which sees whether the word is an English one or not, and if it is, it ensures the transformation of the word according to the root form of the text. The other one, Zemberek Library [48], similarly identifies Turkish words and breaks the words down into their roots. Turkish is an agglutinative language, which refers to the process of adding suffixes to a root word. It also has a large number of suffixes, so finding the root of a word is more complex. Zemberek is an open-source natural language processing library for the Turkish language. It can be used for spelling, checking if a word is in the Turkish language or not, and correcting misspelled words, in addition to finding the roots of words. We create a Morphology by using the Class feature belonging to the Zemberek library as we are to use the TurkishMorphology class available within the Zemberek library. Then, we submit the words whose roots we intend to find to the variable of words during the operation of finding the words' roots. Finally, we analyze the root. In our study, the word embedding method was used in order to transform the textual data into numerical data. In the word embedding technique, words in a message are represented by number vectors. Semantically similar words in a vector space are mapped close to each other. This technique is used to represent data to be given as input to CNN and GRU models. Word embedding is regarded as one of the best techniques in terms of the representation of words in natural language processing. There are many ready-to-use word embedding models such as Word2 Vec [49] and GloVe [50]. These models are pre-trained. However, in this study, our own word embedding model was used for the reason that our dataset contains different words and combined words from the Turkish and English languages. The processes conducted in the step where the word embedding technique  
Figure 1: Flow chart of the proposed model. is used are presented in Figure 2. In the first step, each text in the dataset is transformed into an integer sequence, and the entire text is vectorized. At the end of this step, text messages of various lengths become strings of different sizes. Then, sentences shorter than \"maxseqlength\" are filled with null values, and those longer than \"maxseqlength\" are clipped by pad sequences. In this way, all sentences are adjusted to the same length. The word embedding method implemented in this study yielded more accurate results compared to the GloveNet and BoW (bag-of-words) methods implemented on the Turkish datasets in the literature [51]. All Turkish and English messages were converted to lowercase in the preprocessing step. Expressions containing mail and web addresses within the text, if any, were updated. This procedure was to adjust different addresses into the same structure. The numerical expressions and punctuation marks within the e-mail were removed. A lemmatization procedure was performed on Turkish and English text to transform the words into the same structure. The infeasible words within the text were removed following the lemmatization process. In this way, the data volume was also reduced. In the studies conducted in the field of spam detection, it is known that text documents are represented in dense space through fixed-length vectors. This procedure significantly increases the performance of word embedding-based representation. Word embedding-based representation makes it possible for data to be represented with a smaller size and a denser form, and, in this way, the problems encountered regarding word sparsity and high dimensionality are eliminated. Step 3: The deep learning technique is the main step of our classification approach. CNN, GRU, and CNN + GRU algorithms were used in binary classification. These three algorithms were tested and the one yielding the best performance was chosen. A GRU, a CNN, and a hybrid architecture arising from the combination of CNN and GRU were used as three differing DL architectures while implementing this approach.