Papers › Contextual Pattern Mining and Counting
Contextual Pattern Mining and Counting
Ling Li, Daniel Gibney, Sharma V. Thankachan, Solon P. Pissis, Grigorios Loukides
The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.
Given a string P of length m, a longer string T of length n>m, and two integers l≥0 and r≥0, the context of P in T is the set of all string pairs (L,R), with |L|=l and |R|=r, such that the string LPR occurs in T. We introduce two problems related to the notion of context: (1) the Contextual Pattern Mining (CPM) problem, which given T, (m,l,r), and an integer τ>0, asks for outputting the context of each substring P of length m of T, provided that the size of the context of P is at least τ; and (2) the Contextual Pattern Counting (CPC) problem, which asks for preprocessing T so that the size of the context of a given query string P of length m can be found efficiently. For CPM, we propose a linear-work algorithm that either uses only internal memory, or a bounded amount of internal memory and external memory, which allows much larger datasets to be handled. For CPC, we propose an 𝒪(n)-space index that can be constructed in 𝒪n) time and answers queries in 𝒪(m)+𝒪(1) time. We further improve the practical performance of the CPC index by optimizations that exploit the LZ77 factorization of T and an upper bound on the query length. Using billion-letter datasets from different domains, we show that the external memory version of our CPM algorithm can deal with very large datasets using a small amount of internal memory while its runtime is comparable to that of the internal memory version. Interestingly, we also show that our optimized index for CPC outperforms an approach based on the state of the art for the reporting version of CPC [Navarro, SPIRE 2020] in terms of query time, index size, construction time, and construction space, often by more than an order of magnitude.
Code
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
Not run by Syntology. Nothing on this page verifies that the listed code works.
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections