GroupDocs.Comparison for Python via .NET supports comparison sensitivity values from 0 (fastest, least detailed) to 100 (slowest, most detailed). The default is 75.
0 — fastest comparison; only fully-disjoint substrings are detected as inserts/deletes.
75 — the default. Sub-sequences that have more than 75% of their content inserted or deleted are treated as fully inserted or deleted.
100 — slowest comparison; any common sub-sequence is taken into account.
Worked example
Consider these two strings:
1.
It is our equity poetry
2.
Jack is a glad calf
They share two common sub-sequences: the word is and three space characters. The common sub-sequence is " is " (length 4 including spaces). The inserted sub-sequence is Jackagladcalf (length 13). The removed sub-sequence is Itourequitypoetry (length 17). The percentage of removed and inserted symbols is (17 + 13) / (17 + 13 + 4) * 100 = 88%.
sensitivity_of_comparison = 80 — 88% > 80%, so the common sub-sequence is discarded. Result: Jack is a glad calfIt is our equity poetry (the first string is fully removed, the second fully inserted).
sensitivity_of_comparison = 89 — 88% < 89%, so the common sub-sequence is kept. Result: JackIt is aour gladequity calfpoetry.
Example 1: Adjust overall sensitivity
Increase sensitivity to detect smaller changes; lower it for faster processing.