I'm struggling with the concepts of writing a formula that will help me tease out certain characteristics of strings I'm comparing. I know this is mathexchange, but bear with me.
Essentially, I have loads of information about two strings I'm comparing. Among those data, I have: Where they're located in a larger context, where they're located in relation to one another, how long they are, how similar they are, etc.
I want to write a formula/algorithm that will help me score these strings for, essentially, grouping. I think I'm on the right track with the data I'm capturing, but I am struggling to piece it into a robust formula with which to get a useful score.
Ms : The similarity of the strings; Based on Levenshtein distance, so it scales linearly with differences. Can be 0 -> Infinity. 0 is an exact match
L1 : The length of string1
L2 : The length of string2
Ld : The difference in those lengths
P : The proximity of one string to another. Based on the closest point of the strings (one's beginning to another's end or vice versa) in an index.
I know that I want
Ms to only "matter" if
L2 are high and
Ld is low. And I only want
P to "matter" if
Ms is sufficiently bolstered by
Is there anywhere I can look to gain insight on this? It can't be a new problem, but if it is, I'm more than happy to learn how to solve it on my own.