# Towards AI-Generated Essay Classification Using Numerical Text Representation
## 5 Experiments and Results
### Data Preprocessing
Table 2 presents examples of the described records, which were removed from the dataset. The cleaned text was placed in a new column. A fragment of the dataset after the preprocessing is presented in Table 3. With the cleaned dataset, the word count distribution for AI-generated essays and student-written essays was verified using the column with cleaned content. The results are presented in Figures 2 and 3. \begin{table}
\begin{tabular}{c c c c} \hline
**Text** & **Label** & **Prompt\_Name** \\ \hline \hline \multicolumn{4}{c}{In recent years, there has been a growing trend} & 1 & Distance learning \\ \hline \multicolumn{4}{c}{Passage 1:\textbackslash{}r\textbackslash{}n\textbackslash{}r\textbackslash{}Passage 2:\textbackslash{}r\textbackslash{}n\textbackslash{}r\textbackslash{}nPassage 3:\textbackslash{}r\textbackslash{}n\textbackslash{}r\textbackslash{}nPassage 4:\textbackslash{}r\textbackslash{}n\textbackslash{}r\textbackslash{}nPassage 5:  
After filtering and cleaning, the dataset contained only valid essays. Figure 2 presents the distribution of the number of words in AI-generated essays. It can be observed that the word count distribution is similar to a normal distribution. This indicates that while most AI-generated essays center around a particular word count, there is still considerable variation, with some essays having slightly fewer or more words. Also, shorter essays are much more common than in student-written content. Figure 3 shows the distribution of the number of words in student-written essays. Here, the word count distribution resembles a Poisson distribution, with a higher occurrence of shorter essays. However, despite the higher frequency of shorter essays, student-written essays have a higher minimum word count compared to AI-generated ones, which suggests that students likely perceive an essay as a formal task with a required or expected minimum length. Additionally, the distributions suggest that students tend to write essays with a wider range of lengths, possibly influenced by individual writing styles, interpretations of prompts, or external constraints such as time limits. Table 4 presents statistical results regarding the number of words in the series. Student-written essays generally have a higher word count, averaging 404, compared to AI-generated essays, with an average of 320 words. The minimum word count for students is 136, and the highest is 1611, more than double the maximum word count in AI-generated essays, where the minimum word count is 62, and the maximum is 764. The next step in the experiments was to analyze different stop word lists. It was decided not to remove stop words before further analysis due to the presence of words on the lists whose elimination could disrupt the context of entire sentences, such as \"against\", \"nobody\", or \"not\", whose occurrence in a sentence can completely change its meaning. The stop word lists also included many words whose removal would not significantly affect the sentence context, such as \"eg\", \"be\", \"kg\", \"ie\", \"a\", or \"km\". Such expressions and abbreviations were filtered out in earlier stages by removing words with fewer than three letters. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Statistics on the Number of Words** & **Essays Generated by LLM** & **Essays Written by Students** \\ \hline Minimum & 62 & 136 \\ Maximum & 764 & 1611 \\ Average & 320 & 404 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Statistics on the number of words in essays. Figure 3: Distribution of number of words in student-written essays. Figure 2: Distribution of number of words in LLM-generated essays. The final steps of processing involved tokenization and lemmatization, i.e., dividing essays into tokens and then reducing them to their base form. Space characters were used as the criterion for tokenization. Before lemmatization, the dataset was split into test and training sets. This split helps avoid accidental information leakage between the sets.