Weighted Edit Distance Algorithm for Search Term Error Correction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional error correction methods for search terms, such as those using edit distance technology, fail to accurately account for relationships between replacement characters, leading to suboptimal search result accuracy due to factors like typos and homophone selection errors.
Innovation Solution
A weighted edit distance algorithm is employed, assigning different weights to operations like character insertion, deletion, replacement by similar or dissimilar characters, and exchange, to calculate the edit distance between search terms and hot terms, improving the accuracy of error correction by considering the popularity and click rates of search terms.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional edit distance technology is used to compare search terms with dictionary terms, then the error correction process is simple and fast, but the accuracy of error correction is insufficient because relationships between replacement characters are not considered
Solution Approach 1:
The patent changes the parameters of the edit distance calculation by introducing different weight values for different types of character operations. Specifically, it assigns weight 1 to insertion and deletion operations, weight 2 to replacement operations, and weight 3 to exchange operations. This parameter differentiation allows the system to consider relationships between replacement characters (such as homophones and similar characters) while maintaining a structured calculation framework, thereby improving error correction accuracy without excessive complexity increase
Solution Approach 2:
The patent segments the character replacement operation into multiple types: simple replacement (weight 2), homophone replacement (weight 2), and similar character replacement (weight 2), with exchange operations (weight 3) treated separately. This segmentation allows the system to handle different types of typos and input errors more precisely, improving the accuracy of error correction by distinguishing between different error patterns
2Measurement precision
If uniform weights are assigned to all edit operations, then the calculation method is simple, but the correction accuracy is reduced because different types of character transformations are not distinguished
Solution Approach 1:
The patent introduces different weight parameters for different operation types: weight 1 for insertion and deletion, weight 2 for replacement operations (including homophone and similar character replacements), and weight 3 for exchange operations. This parameter differentiation enables the algorithm to distinguish between various types of character transformations, improving correction accuracy by reflecting the actual likelihood and impact of different error types
Solution Approach 2:
The patent applies local quality by assigning different weights to different positions and types of operations within the edit distance calculation. Specifically, homophone replacements and similar character replacements are treated with the same weight as simple replacements, while exchange operations receive higher weights. This localized differentiation improves accuracy by considering the specific context and type of each character transformation
Data Source
AI summary
The present application provides an error correction method and device for search terms. The method comprises: identifying an incorrect search term; calculating weighted edit distances between the search term and pre-obtained hot terms by using a weighted edit distance algorithm, wherein, during the calculation of the weighted edit distances, different weights are set respectively for the following operations of transforming from the search term to the hot terms: an operation of inserting characters, an operation of deleting characters, an operation of replacing by characters with similar appearance or pronunciation, an operation of replacing by characters with dissimilar appearance or pronunciation, and an operation of exchanging characters; and selecting a predetermined number of hot terms based on the weighted edit distances and popularity of the hot terms for error correction prompt. The method and device of the present application can improve the error correction accuracy of error search terms.


