1. A device for use with a computer-based system capable of converting text data to synthesized speech, the device comprising: an identification module for identifying a homograph contained in the text data; and an assignment module for assigning a pronunciation to the homograph using a statistical test constructed from a recursive partitioning of a plurality of training samples, each training sample comprising a word string containing the homograph; the recursive partitioning being based on determining for each of a plurality of word indicators an order and a distance of each word indicator relative to the homograph in each training sample, wherein an absence of one of the plurality of word indicators in a training sample is treated as an equivalent to the absent word indicator being more than a predefined distance from the homograph.