1. A method performed by a data processing apparatus, the method comprising: selecting, by the data processing apparatus, object representations from a dataset storing a plurality of object representations, each object representation being an association of: an object identifier that identifies an object instance in a dataset and corresponds to an object; a context value that identifies a context of the object; and a set of feature values that identify features of the object; wherein each object identifier is unique in the dataset, and each context value is associated with one or more object identifiers; for each feature value: determining an inter-context score that is proportional to the number of different context values in the dataset that are associated with the feature value, wherein the inter-context score is based on a probability that a pair of object representations that each include a particular feature value are each associated with different context values; and determining an intra-context score that proportional to the number of times the feature value is associated with each context value, wherein the intra-context score is based on a probability that a pair of object representations that each include the particular feature value are each associated with the same context value; and for a selected pair of object representations, determining a similarity score based on a respective inter-context score and a respective intra-context score of each matching feature value in the set of features for the pair of object representations, the similarity score being a measure of the similarity of the object representations in the pair of object representations, the determining comprising, for each feature value, determining a feature weight for the feature value, the feature weight being based on a ratio of the inter-context score of the feature value to the intra-context score of the feature value.