TurkishEditorEnv
A text editing environment where an RL agent learns to proofread Turkish documents containing translation errors from English and spelling mistakes violating Turkish "imla kuralları" (spelling rules). The agent navigates through documents using a sliding window, detecting and correcting character-level errors including Turkish-specific distinctions (ı/i, ğ/g, ş/s) and translation false friends, while managing a limited editing budget.
Box(0, 1, shape=(window_size * alphabet_size + 3,)): One-hot encoded text window (20 chars × 35 Turkish alphabet chars), normalized cursor position (1), remaining budget ratio (1), and error density indicator (1).
Discrete(5 + alphabet_size): 0=move_next, 1=mark_spelling_error, 2=mark_translation_error, 3=accept_text, 4=delete_char, 5-39=insert_specific_char (Turkish alphabet including ç, ğ, ı, ö, ş, ü).
+2.0 for correct spelling correction (e.g., fixing "Ingilizce"→"İngilizce"), +3.0 for correct translation fix (e.g., "softver"→"yazılım"), -1.0 for false positive error marking, -2.0 for introducing new spelling violations, -0.05 per step (efficiency penalty), +5.0 episode bonus for reviewing complete document with >90% accuracy, -3.0 for missing critical errors (capital I/ı mistakes).