1. A method comprising: receiving, by a data processing system, training data examples that contain a plurality of features for each of a plurality of templates, wherein each of the plurality of templates is a category of feature-types that includes multiple features, all of which are from the same category; for each of the templates, preprocessing the features of the template in the training data examples, before processing the training data examples by a machine learning system, the preprocessing including, for each of the templates: ranking the plurality of features of the template based on a score, a number of impressions, a number of occurrences, a type of machine learning system, and a type of training examples received by the data processing system; determining a first set of features associated with the template, wherein each feature in the first set of features exceeds a threshold ranking criteria; determining a second set of features associated with the template, wherein each feature in the second set of features falls below a minimum threshold ranking criteria; and assigning an integer value to each feature of the first set of features in order based upon ranking; and before the training data examples are processed by the machine learning system, for each of the templates and each of the features in the first set of features associated with the template, replacing the feature in the training data with the integer value assigned to the feature, and removing from the training data each of the features of the template in the second set of features associated with the template.