Abstract & Overview
Empirical analyses of student assignments require clean, structured data for human and machine handling, but raw digital submissions can contain unforeseen character-encoding artefacts, formatting inconsistencies, and boilerplate. The paper summarises the approach and outcomes of a data-cleaning exercise for a corpus of South African student writing. Python regular expressions, rule-based heuristics, and audit logs were employed to distinguish student prose and repair character corruptions. The automated stage achieved over 80% accuracy in XML tagging, with post-editing resolving edge cases. Encoding repairs account for 1.03% of the characters in the corpus, and extraneous data removed amounts to 13% of the original text.