8. A system, comprising: one or more data processing apparatus; and a computer-readable storage device including instructions executable by the data processing apparatus and upon such execution cause the data processing apparatus to perform operations comprising: obtaining an image based on a document capture process performed on a rendered document; identifying a portion of the image, the portion comprising a sequence of text units; segmenting the portion of the image into a sequence of segmented sub-images, each segmented sub-image comprising a single text unit of the sequence of text units; for each segmented sub-image of the sequence of segmented sub-images: determining that one or more features of the segmented sub-image are classified as being similar to one or more corresponding features of a stored sub-image; and based on determining that one or more features of the segmented sub-image are classified as being similar to one or more corresponding features of the stored sub-image, assigning to the segmented sub-image a text unit identity that is associated with the stored sub-image; generating a representation of the portion of the image, based on the assigned text unit identities; and identifying the sequence of segmented sub-images, based on the generated representation.
8. A system, comprising: one or more data processing apparatus; and a computer-readable storage device including instructions executable by the data processing apparatus and upon such execution cause the data processing apparatus to perform operations comprising: obtaining an image based on a document capture process performed on a rendered document; identifying a portion of the image, the portion comprising a sequence of text units; segmenting the portion of the image into a sequence of segmented sub-images, each segmented sub-image comprising a single text unit of the sequence of text units; for each segmented sub-image of the sequence of segmented sub-images: determining that one or more features of the segmented sub-image are classified as being similar to one or more corresponding features of a stored sub-image; and based on determining that one or more features of the segmented sub-image are classified as being similar to one or more corresponding features of the stored sub-image, assigning to the segmented sub-image a text unit identity that is associated with the stored sub-image; generating a representation of the portion of the image, based on the assigned text unit identities; and identifying the sequence of segmented sub-images, based on the generated representation. 10. The system of claim 8 , wherein the stored sub-image is stored by adding the stored sub-image to a template of sub-images.