String Similarity Algorithm Using Edit Operation Scoring
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing string similarity measurement methods, such as Levenshtein distance, fail to accurately compare strings due to penalizing word permutations heavily and not accounting for the cost of character insertions and deletions effectively, leading to inconsistent similarity scores for similar strings.
Innovation Solution
A distance algorithm that determines a sequence of edit operations (insertions, deletions, and maintenance operations) between two strings, assigning scores based on operation costs and switching penalties to provide a combined score indicative of similarity, allowing for accurate comparisons by considering the type and order of edit operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional Levenshtein distance algorithm is used to measure string similarity, then the computation is simple, but the measurement precision is poor because it penalizes word permutations heavily and does not account for operation costs effectively
Solution Approach 1:
The patent introduces multiple scoring parameters including operation scores for different edit operation types (insertion, deletion, substitution) and switching scores for transitions between operation types. These parameter changes enable more nuanced and accurate similarity measurements by distinguishing between different kinds of edits rather than treating all operations equally.
Solution Approach 2:
The patent segments the edit distance computation into distinct operation types (first type: insertion/deletion, second type: substitution) with different scoring rules. This segmentation allows the algorithm to handle different edit scenarios differently, improving measurement precision by recognizing that not all character changes have the same impact on string similarity.
2Measurement precision
If the distance algorithm considers the sequence and type of edit operations with switching scores, then the similarity assessment accuracy is improved, but the computational complexity increases
Solution Approach 1:
The patent applies preliminary actions by pre-defining operation scores and switching scores for different edit operation types before performing the actual distance calculation. This allows the algorithm to efficiently compute similarities by referencing pre-established scoring rules rather than determining scores dynamically during computation.
Solution Approach 2:
The patent introduces dynamic switching scores that adjust based on the sequence of edit operations. The switching score penalizes or rewards transitions between different operation types depending on the context, allowing the algorithm to adapt to different string comparison scenarios while maintaining computational efficiency through structured scoring rules.
Data Source
AI summary
A system and a method for determining a similarity between a first string and a second string. A sequence of edit operations are performed on the first string in order to obtain the second string may be determined. The edit operation is of a first type or a second type. The first type operation comprises a character insertion operation or character removal operation. The second type operation comprises a character maintenance operation. The first type edit operation is associated with an operation score indicative of a cost for applying the edit operation. The first type edit operation is associated with a switching score indicative whether it is immediately followed by a second type edit operation. The switching scores and/or operation scores associated with the sequence of edit operations are combined in order to obtain a combined score that is indicative of the similarity level between the first and second strings.


