We describe a method which combines dynamic programming and a neural net recognizer for segmenting and recognizing character strings. The method selects the optimal consistent combination of cuts from a set of candidate cuts generated using heuristics. The optimal segmentation is found by representing the image, the candidate segments, and their scores, as a graph in which the shortest path corresponds to the optimal interpretation. The scores are given by the neural net outputs for each segment A significant advantage of the method is that the labor required to manually segment images is eliminated: the dynamic programming stage both performs the segmentation and provides inputs and desired outputs to the neural network during training. The training examples thus generated contain examples of both characters and "non-characters". The system was trained on approximately 7000 unsegmented handwritten ZIP Codes provided by the United States Postal Service. The system has achieved a per-ZIP Code raw recognition rate of 81% on a 2,368 hand written ZIP Code test set, and gets 3.6% error (as a percent of those accepted) at 60% correct.