1. A method for reducing hypothesis exploration in document image decoding incorporating a Stack algorithm comprising: determining whether a first partial path is semantically equivalent to a second partial path, the second partial path having already been processed; and adjusting a queue or discarding one of the first partial path and the second partial path if the first partial path is semantically equivalent to the second partial path.