Saved in:
Bibliographic Details
Main Authors: Zhang, Ling, Deep, Shaleen, Patel, Jignesh M., Sankaralingam, Karthikeyan
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.12251
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908519560642560
author Zhang, Ling
Deep, Shaleen
Patel, Jignesh M.
Sankaralingam, Karthikeyan
author_facet Zhang, Ling
Deep, Shaleen
Patel, Jignesh M.
Sankaralingam, Karthikeyan
contents Efficient evaluation of regular expressions (regex, for short) is crucial for text analysis, and n-gram indexes are fundamental to achieving fast regex evaluation performance. However, these indexes face scalability challenges because of the exponential number of possible n-grams that must be indexed. Many existing selection strategies, developed decades ago, have not been rigorously evaluated on contemporary large-scale workloads and lack comprehensive performance comparisons. Therefore, a unified and comprehensive evaluation framework is necessary to compare these methods under the same experimental settings. This paper presents the first systematic evaluation of three representative n-gram selection strategies across five workloads, including real-time production logs and genomic sequence analysis. We examine their trade-offs in terms of index construction time, storage overhead, false positive rates, and end-to-end query performance. Through empirical results, this study provides a modern perspective on existing n-gram based regular expression evaluation methods, extensive observations, valuable discoveries, and an adaptable testing framework to guide future research in this domain. We make our implementations of these methods and our test framework available as open-source at https://github.com/mush-zhang/RegexIndexComparison.
format Preprint
id arxiv_https___arxiv_org_abs_2504_12251
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle An Evaluation of N-Gram Selection Strategies for Regular Expression Indexing in Contemporary Text Analysis Tasks. Extended Version
Zhang, Ling
Deep, Shaleen
Patel, Jignesh M.
Sankaralingam, Karthikeyan
Databases
Efficient evaluation of regular expressions (regex, for short) is crucial for text analysis, and n-gram indexes are fundamental to achieving fast regex evaluation performance. However, these indexes face scalability challenges because of the exponential number of possible n-grams that must be indexed. Many existing selection strategies, developed decades ago, have not been rigorously evaluated on contemporary large-scale workloads and lack comprehensive performance comparisons. Therefore, a unified and comprehensive evaluation framework is necessary to compare these methods under the same experimental settings. This paper presents the first systematic evaluation of three representative n-gram selection strategies across five workloads, including real-time production logs and genomic sequence analysis. We examine their trade-offs in terms of index construction time, storage overhead, false positive rates, and end-to-end query performance. Through empirical results, this study provides a modern perspective on existing n-gram based regular expression evaluation methods, extensive observations, valuable discoveries, and an adaptable testing framework to guide future research in this domain. We make our implementations of these methods and our test framework available as open-source at https://github.com/mush-zhang/RegexIndexComparison.
title An Evaluation of N-Gram Selection Strategies for Regular Expression Indexing in Contemporary Text Analysis Tasks. Extended Version
topic Databases
url https://arxiv.org/abs/2504.12251