17. The method of claim 1 , wherein the character string comprises a sequence of characters, each character in the sequence being drawn from a finite set of characters.
1. A method for computing confidence comprising: with a text recognition system, performing character recognition on an input text image to generate a candidate string of characters; generating a first representation based on the candidate string of characters, the generating of the first representation comprising partitioning the candidate character string into a plurality of regions and extracting a representation of each of the regions, the character string representation being derived by aggregating the region representations; generating a second representation based on the input text image; computing a confidence in the candidate string of characters based on a computed similarity between the first and second representations in a common embedding space, at least one of the first and second representations being projected into the common embedding space; and wherein at least one of the performing character recognition, generating the first representation, generating the second representation, and computing the confidence is performed with a computer processor.