English

Fast $q$-gram Mining on SLP Compressed Strings

Data Structures and Algorithms 2011-07-14 v2

Abstract

We present simple and efficient algorithms for calculating qq-gram frequencies on strings represented in compressed form, namely, as a straight line program (SLP). Given an SLP of size nn that represents string TT, we present an O(qn)O(qn) time and space algorithm that computes the occurrence frequencies of qq-grams in TT. Computational experiments show that our algorithm and its variation are practical for small qq, actually running faster on various real string data, compared to algorithms that work on the uncompressed text. We also discuss applications in data mining and classification of string data, for which our algorithms can be useful.

Keywords

Cite

@article{arxiv.1103.3114,
  title  = {Fast $q$-gram Mining on SLP Compressed Strings},
  author = {Keisuke Goto and Hideo Bannai and Shunsuke Inenaga and Masayuki Takeda},
  journal= {arXiv preprint arXiv:1103.3114},
  year   = {2011}
}
R2 v1 2026-06-21T17:40:11.898Z