1. A computer-implemented image compression method comprising: determining, in a first determining step and by a computer processor, that (a) a respective instance of each of a pair of models occurs within a respective word and (b) a same single neighboring model neighbors the instances of both models of the pair in each of the respective words of the respective instances at a same side of the respective instances; determining, in a second determining step, by the processor, and based on the determining of the first determining step, to use a particular one of a plurality of matching algorithms for comparing the pair of models; responsive to determining in the second determining step that the particular matching algorithm should be used, determining, in a third determining step and by the processor, whether the pair of models should be merged into a single model; and storing, by the processor, a representation of the image, the representation including a plurality of models and being based on the determination of the third determining step.