Reputation: 719
Is there a known algorithm for combining strings in a way, so that what most oft the input strings have in common is put in the resulting string? What I mean is this:
input-1: "This is a Tsst"
input-2: "This is Test"
input-3: "Thi5 ia a Test"
result: "This is a Test"
The length in words and characters of the inputs is varying, which creates the problem for me.
Upvotes: 0
Views: 40
Reputation: 6404
Yes, but it's rtather involved.
You do a multiple alignment of the string sequences using Clustal or a variant. Then you read off the consensus sequence. Clustal accepts a scoring matrix, which is intended for protein sequences, but could be used for English letters (k is similar to c, 5 to s and so on).
Upvotes: 1