mhmm ...
you need a heuristical maschine to meet the demands.
may be it will be enougth to set up some kind of associative word to synonym table.
This will at least solve the nummer to words problem.
But it will probably fail on more complex cases. 😐
bye,
niko