Lexicon-based probabilistic indexing of handwritten text images