[Paper Review] Good parts first - a new algorithm for approximate search in lexica and string databases
This paper introduces a novel algorithm for approximate string search in lexica and string databases that prioritizes exact matches of substrings ('good parts') before extending them with increasing error tolerance. By using a symmetric compact directed acyclic word graph (SCDAWG) for bidirectional substring access, the method avoids the 'wall effect' of traditional left-to-right search, achieving significant speedups—especially for long strings and higher error bounds—demonstrating near-theoretical efficiency in experiments.
We present a new efficient method for approximate search in electronic lexica. Given an input string (the pattern) and a similarity threshold, the algorithm retrieves all entries of the lexicon that are sufficiently similar to the pattern. Search is organized in subsearches that always start with an exact partial match where a substring of the input pattern is aligned with a substring of a lexicon word. Afterwards this partial match is extended stepwise to larger substrings. For aligning further parts of the pattern with corresponding parts of lexicon entries, more errors are tolerated at each subsequent step. For supporting this alignment order, which may start at any part of the pattern, the lexicon is represented as a structure that enables immediate access to any substring of a lexicon word and permits the extension of such substrings in both directions. Experimental evaluations of the approximate search procedure are given that show significant efficiency improvements compared to existing techniques. Since the technique can be used for large error bounds it offers interesting possibilities for approximate search in special collections of "long" strings, such as phrases, sentences, or book ti
Motivation & Objective
- To address the 'wall effect' in approximate string search, where initial left-to-right alignment with error bounds leads to excessive, unproductive prefix exploration in tries or automata.
- To enable efficient approximate search in large lexica and string databases, particularly for long strings such as phrases, sentences, or titles, where traditional methods are too slow.
- To design a lexicon index structure that supports immediate access to any substring and deterministic extension in both directions, enabling flexible alignment strategies.
- To achieve performance close to the theoretical minimum by minimizing unnecessary search paths while ensuring no valid matches are missed.
Proposed method
- The algorithm begins by identifying all substrings of the input pattern that exactly match substrings in lexicon entries—'good parts'—using a symmetric compact directed acyclic word graph (SCDAWG).
- Each exact match is then extended stepwise in both left and right directions, with error tolerance increasing at each extension step to allow up to the user-defined bound b.
- The SCDAWG enables deterministic traversal and extension of substrings in both directions, providing O(1) transition cost and direct access to any infix of a lexicon word.
- The search strategy dynamically selects alignment starting points based on where exact matches occur, avoiding the exhaustive prefix exploration of classical methods.
- The method integrates with existing filtering techniques such as universal Levenshtein automata for small error bounds to further improve performance.
- The index structure supports efficient approximate search in collections of long strings by reducing the number of candidate paths early in the search process.
Experimental results
Research questions
- RQ1Can a substring-based search strategy that starts with exact matches significantly reduce the search space in approximate string matching?
- RQ2How does the performance of a 'good parts first' approach compare to classical left-to-right alignment in terms of speed and completeness?
- RQ3To what extent can bidirectional index structures like SCDAWG mitigate the wall effect in approximate string search?
- RQ4Can the method scale efficiently to large error bounds and long strings such as sentences or titles?
- RQ5What is the impact of using SCDAWG versus other index structures (e.g., suffix arrays) on time and space efficiency?
Key findings
- The proposed algorithm achieves significant speedups over classical left-to-right search and prior bidirectional methods, especially for high error bounds and long strings.
- For distance bound b=2, the method comes close to the theoretical performance limit, indicating near-optimal efficiency in practice.
- The method outperforms existing techniques such as Levenshtein automata and BLASTA, particularly in scenarios with large error bounds where BLASTA may fail to retrieve all valid matches.
- Experimental results show drastic performance improvements in collections of long strings, such as book titles or sentences, where traditional methods are too slow.
- The use of SCDAWG enables efficient bidirectional traversal with O(1) transition cost, outperforming compressed suffix array-based structures that have O(log|Σ|/log log|D| + 1) cost per transition.
- The algorithm maintains completeness—no valid matches are missed—while drastically reducing the number of explored search paths through strategic use of exact substring matches.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.