# Fine-Tuning Large Language Models for Kazakh Text Simplification
## 3 Methodology
### Automatic Identification of Complex Kazakh Sentences
\begin{table}
\begin{tabular}{l c c c} \hline
**Word** & **Frequency** & **morph\({}_{\text{score}}\)** & **Score** \\ \hline da & 8309 & 1 & \(-8.025095\) \\ dep & 6124 & 1 & \(-7.719971\) \\ osy & 4618 & 1 & \(-7.437717\) \\ edi & 3287 & 1 & \(-7.097731\) \\ emes & 2436 & 1 & \(-6.798113\) \\ de & 6485 & 2 & \(-6.777247\) \\ eken & 2276 & 1 & \(-6.730175\) \\ degen & 2263 & 1 & \(-6.724447\) \\ endi & 2253 & 1 & \(-6.720018\) \\ kop & 2197 & 1 & \(-6.694848\) \\ gana & 2181 & 1 & \(-6.687539\) \\ oz & 2163 & 1 & \(-6.679251\) \\ bir & 5809 & 2 & \(-6.667164\) \\ ozi & 1851 & 1 & \(-6.523481\) \\ birak & 1808 & 1 & \(-6.499977\) \\ ne & 1753 & 1 & \(-6.469084\) \\ bul & 4413 & 2 & \(-6.392310\) \\ goi & 1576 & 1 & \(-6.362645\) \\ abai & 4106 & 2 & \(-6.320205\) \\ bar & 4078 & 2 & \(-6.313362\) \\ \hline \end{tabular}
\end{table} 
Table 2: Top 20 simplest and most frequent Kazakh words of the corpus. (Kazakh words are shown in Latin script for convenience). A sentence is considered structurally complex if it satisfies the following two constraints: (1) it either exceeds a specified token length threshold or contains a high number of conjunctions, and (2) the proportion of common words within the sentence falls below a predefined threshold. Only sentences meeting both conditions are retained. This selection strategy enables the construction of a filtered corpus consisting of lexically and syntactically complex sentences. After extracting all complex sentences, we used GPT-4o-mini to simplify these sentences. To assess the reliability of complexity classification in Kazakh text, we conducted a comparative evaluation between a simple heuristic approach and GPT-4o-mini. We randomly selected a set of 400 Kazakh sentences, covering a broad range of linguistic structures. Each sentence was manually annotated by a native speaker of Kazakh, assigning a binary label: complex or simple. Table 3 presents the evaluation results of two automatic sentence complexity classification approaches, a heuristic classifier and GPT-4o-mini compared against manual annotations by native Kazakh speakers. The table reports standard classification metrics: accuracy, precision, recall, and F1 score. The heuristic approach, which uses a rule based on sentence length, achieved an accuracy of 83.46% with equal precision, recall, and F1 score (83.25%). The GPT-4o-mini model achieved a slightly lower accuracy (79.20%) but demonstrated stronger recall (86.29%), indicating its effectiveness in detecting complex sentences. However, its precision (75.22%) was lower, suggesting more false positives than the heuristic approach. The F1 score (80.38%) reflects its overall balanced performance between precision and recall. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Input:** List of sentences \(T\), & \\  Common words set \(C\), & \\  Conjunctions set \(K\), & \\  Maximum token length \(L\), & \\  Maximum allowed conjunctions \(J\), & \\  Common word ratio threshold \(r\) & \\ \multicolumn{3}{l}{**Output:** List of complex sentences \(R\)} \\ \(R\leftarrow\) empty list; & \\ \multicolumn{3}{l}{**foreach**_sentence \(s\in T\)_**do**} \\  Tokenize \(s\) into _tokens_; & \\ \(n\leftarrow\) length of _tokens_; & \\ \(c\leftarrow\) number of tokens in _tokens_ such that token \(\in K\); \\ \(w\leftarrow\) number of tokens in _tokens_ such that token \(\in C\); \\ \(ratio\leftarrow\frac{w}{\max(n,\text{I})}\); & \\ \multicolumn{3}{l}{**if**\(n>L\)_**or**\(c>J\)_**then**} \\ \multicolumn{3}{l}{**if**\(ratio<r\)_**then**} \\ \multicolumn{3}{l}{\(\left[\begin{array}{c}\text{Append }s\text{ to }R\text{;}\right.\) \\ \end{tabular} \\ \multicolumn{3}{l}{**return**\(R\)} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Evaluation results of complexity classification models against human annotation.