Abstract
Approximate dictionary matching (checking if a pattern occurs in a collection of strings) is a classic problem with applications in e.g. spellchecking, online catalogs, and web searchers. We present a simple solution called split index, which is based on the Dirichlet principle, for matching a keyword with few mismatches, and experimentally show that it offers competitive space-time tradeoffs. Our implementation in the C++ language is focused mostly on data compaction, which is beneficial for the search speed. We compare our solution with other algorithms and we show that it is faster when the Hamming distance is used. Query times in the order of 1 microsecond were reported for one mismatch for a few-megabyte natural language dictionary on a medium-end PC. We also demonstrate that a basic compression technique consisting in q-gram substitution can significantly reduce the index size (up to 50
Keywords
MSC
68W32
Cite this article
@article{cai-3131,
author = {Aleksander Cisłak and Szymon Grabowski},
title = {A Practical Index for Approximate Dictionary Matching with Few Mismatches},
journal = {Computing and Informatics},
volume = {36},
number = {5},
pages = {1088--1106},
year = {2017},
issn = {1335-9150},
doi = {10.4149/cai_2017_5_1088}
}
TY - JOUR AU - Aleksander Cisłak AU - Szymon Grabowski TI - A Practical Index for Approximate Dictionary Matching with Few Mismatches JO - Computing and Informatics VL - 36 IS - 5 SP - 1088 EP - 1106 PY - 2017 SN - 1335-9150 DO - 10.4149/cai_2017_5_1088 UR - https://doi.org/10.4149/cai_2017_5_1088 KW - Approximate dictionary matching KW - Hamming distance KW - k-mismatches problem KW - split index KW - text indexing ER -
Cisłak, A., & Grabowski, S. (2017). A Practical Index for Approximate Dictionary Matching with Few Mismatches. Computing and Informatics, 36(5), 1088–1106. https://doi.org/10.4149/cai_2017_5_1088