## 4 Results and Discussion
### Deep Learning Models for Vulgarity Detection  
The hyperparameter tuning section for the paper outlines the key choices made in configuring the neural network model, particularly the SimpleRNN and LSTM architectures. In this study, the hyperparameter tuning process was designed to optimize the performance of the text classification models. The first critical hyperparameter is the input dimension of the embedding layer, which directly corresponds to the size of the vocabulary in the corpus. The choice of this parameter is pivotal, as it determines the richness of the word representations. In our experiments, the input dimension was set based on the vocabulary size extracted from the dataset, ensuring that the model could effectively capture the lexical diversity present in the text data. Additionally, the output dimensions of the embedding layer were set to 64, determining the length of the word vectors. This value was selected through experimentation to strike a balance between model expressiveness and computational efficiency. The maximum length of a sequence was set to 100, aligning \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{3}{c}{**Vulgar**} & \multicolumn{3}{c}{**Non Vulgar**} & \multicolumn{2}{c}{_ACC_} \\ \cline{2-7}  & _PRE_ & _REC_ & _F1_ & _PRE_ & _REC_ & _F1_ & \\ \hline Logistic Regression (LR) & 0.820 & 0.921 & 0.870 & 0.901 & 0.802 & 0.853 & 0.911 \\ \hline Support Vector Machines (SVM) & 0.810 & 0.890 & 0.853 & 0.881 & 0.792 & 0.832 & 0.843 \\ \hline Decision Tree (DT) & 0.561 & 0.963 & 0.712 & 0.852 & 0.211 & 0.341 & 0.671 \\ \hline Random Forest (RF) & 0.643 & 0.971 & 0.770 & 0.942 & 0.453 & 0.612 & 0.881 \\ \hline Multinomial Naive Bayes (MNB) & 0.801 & 0.913 & 0.854 & 0.891 & 0.770 & 0.832 & 0.832 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Model performance utilizing _TF-IDF_ Vectorizer. Figure 12: Model accuracy using TF-IDF Vectorizer. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{3}{c}{**Vulgar**} & \multicolumn{3}{c}{**Non Vulgar**} & \multicolumn{2}{c}{_ACC_} \\ \cline{2-7}  & _PRE_ & _REC_ & _F1_ & _PRE_ & _REC_ & _F1_ & \\ \hline Logistic Regression (LR) & 0.800 & 0.921 & 0.860 & 0.910 & 0.761 & 0.833 & 0.910 \\ \hline Support Vector Machines (SVM) & 0.654 & 0.721 & 0.682 & 0.680 & 0.600 & 0.631 & 0.660 \\ \hline Decision Tree (DT) & 0.623 & 0.861 & 0.722 & 0.771 & 0.470 & 0.583 & 0.671 \\ \hline Random Forest (RF) & 0.670 & 0.942 & 0.791 & 0.900 & 0.534 & 0.673 & 0.871 \\ \hline Multinomial Naive Bayes (MNB) & 0.811 & 0.910 & 0.863 & 0.902 & 0.791 & 0.842 & 0.842 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Model performance utilizing CountVectorizer. with the nature of the text data, ensuring that sequences of text were standardized to this length during preprocessing. Another crucial set of hyperparameters pertained to the optimization process. We employed the Adam optimizer, a popular choice for gradient-based optimization, known for its adaptive learning rate capabilities. The learning rate, set at 0.001, is a hyperparameter that can significantly impact training dynamics. The choice of batch size was set to 32, balancing the trade-off between computational efficiency and model convergence speed. The training duration spanned ten epochs, allowing the model to iteratively update its parameters while monitoring convergence. Lastly, it is noteworthy that the dataset comprised 2500 data samples with balanced labels, ensuring that the model's performance was evaluated on a representative and unbiased dataset. In this study, we explored the effectiveness of deep learning-based models, specifically RNN and LSTM, using Word2 vec and fastText word embeddings for various NLP tasks. To ensure robust evaluation, we divided the dataset into three parts: the training set, the validation set (to check for overfitting), and the test set (to evaluate the model's performance).