Label preprocessor