1. A method, comprising: by a computer ascertaining locations of word images corresponding to words in a document image; by the computer grouping the word images into clusters; for each of multiple of the clusters, determining by the computer a respective compressed word image cluster based on a joint compression of respective ones of the word images that are grouped into the cluster; and by the computer associating the positions of the word images in the document image with the respective ones of the compressed word image clusters corresponding to the clusters respectively containing the word images.