Text this: Machine learning-powered data cleaning for LEGEND: a semi-supervised approach using affinity propagation and support vector machines