Prototype generator for document decoding.