Need to determine similarity of sentences in some body of text. The sentences are not exactly human language (internal technical terms and abbreviations), so word2vec and similar approach is not useful.
Trying to line up all the sentences in 1-dimensional space and apply clustering. For that purpose I'm thinking of using some string distance measure from empty string to the given string.
Question: is there any string distance measure that satisfies triangle equality (
d(a, b) = d(a) + d(b))? Distances like Levenshtein distance satisfy triangle inequality, while it seems to me distance that gives equality would be a much better predictor of "closeness" for strings (considering they are lined up in 1-d space by distance from empty string, that is strings are close if
abs(d(a, '') - d(b, '') < ε)
Clarification: From definition of metric distance properties 1, 2, 3, but property 4 should be d(x, z) = d(x, y) + d(y, z)