Scripts used for the preprocessing of the Estonian GEC test corpus that contains L2 learner texts error-annotated in the M2 format.