For instance one can use some language model and then let some algorithm such as Viterbi find the most probable final text.
this will only produce variants already extant in the manuscripts, but not such, which have been ancestral, but irretrievably altered.