Efficient string matching in Huffman compressed texts

被引:0
|
作者
Fredriksson, K
Tarhio, J
机构
[1] Univ Joensuu, Dept Comp Sci, FIN-80101 Joensuu, Finland
[2] Helsinki Univ Technol, Dept CSE, Espoo 02015, Finland
关键词
Huffman compression; string matching; natural language;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present an efficient algorithm for scanning Huffman compressed texts. The algorithm parses the compressed text in O (n (log2sigma)/(b)) time, where n is the size of the compressed text in bytes, a is the size of the alphabet, and b is a user specified parameter. The method uses a variable size super-alphabet, with an average size of O((b)/(Hlog2sigma)) characters, where H is the entropy of the text. Each super-character is processed in O(1) time. The algorithm uses O(2(b)) space and O(b2(b)) preprocessing time. The method can be easily augmented by auxiliary functions, which can e.g. decompress the text or perform pattern matching in the compressed text. We give three example functions: decoding the text in average time O(n(log2sigma)/(Hw)), where w is the number of bits in a machine word; an Aho-Corasick dictionary matching algorithm, which works in time O(n(log2sigma)/(b) + t), where t is the number of occurrences reported; and a shift-or string matching algorithm that works in time O(n(log2sigma)/(b)[(m + s - 1)/w]+t), where m is the length of the pattern and s depends on the encoding. The Aho-Corasick algorithm uses an automaton with variable length moves, i.e. it processes variable number of states at each step. The shift-or algorithm makes variable length shifts, effectively also processing variable number of states at each step. The number of states processed in O(1) time is O((b)/(Hlog2sigma)). The method can be applied to several other algorithms as well. Finally, we apply the methods to natural language taking the words (vocabulary) as the alphabet. This improves the compression ratio and allows more complex search problems to be solved efficiently. We conclude with some experimental results.
引用
收藏
页码:1 / 16
页数:16
相关论文
共 50 条
  • [21] EFFICIENT SYSTOLIC STRING MATCHING
    MEGSON, GM
    ELECTRONICS LETTERS, 1990, 26 (24) : 2040 - 2042
  • [22] String matching in Lempel-Ziv compressed strings
    Farach, M
    Thorup, M
    ALGORITHMICA, 1998, 20 (04) : 388 - 404
  • [23] Faster approximate string matching over compressed text
    Navarro, G
    Kida, T
    Takeda, M
    Shinohara, A
    Arikawa, S
    DCC 2001: DATA COMPRESSION CONFERENCE, PROCEEDINGS, 2001, : 459 - 468
  • [24] Manipulatable compressed string indexing technology for pattern matching
    Denzumi, Shuhei
    Arimura, Hiroki
    Sadakane, Kunihiko
    Journal of the Institute of Electronics, Information and Communication Engineers, 2014, 97 (12): : 1080 - 1085
  • [25] Compressed string-matching in standard Sturmian words
    Baturo, Pawel
    Rytter, Wojciech
    THEORETICAL COMPUTER SCIENCE, 2009, 410 (30-32) : 2804 - 2810
  • [26] String matching over compressed text on handheld devices
    Bellaachia, A
    Al Rassan, I
    ESA'03: PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON EMBEDDED SYSTEMS AND APPLICATIONS, 2003, : 80 - 86
  • [27] Approximate string matching using compressed suffix arrays
    Huynh, TND
    Hon, WK
    Lam, TW
    Sung, WK
    THEORETICAL COMPUTER SCIENCE, 2006, 352 (1-3) : 240 - 249
  • [28] Approximate string matching using compressed suffix arrays
    Huynh, TND
    Hon, WK
    Lam, TW
    Sung, WK
    COMBINATORIAL PATTERN MATCHING, PROCEEDINGS, 2004, 3109 : 434 - 444
  • [29] Faster Approximate Pattern Matching in Compressed Repetitive Texts
    Gagie, Travis
    Gawrychowski, Pawel
    Puglisi, Simon J.
    ALGORITHMS AND COMPUTATION, 2011, 7074 : 653 - +
  • [30] 2 ALGORITHMS FOR APPROXIMATE STRING MATCHING IN STATIC TEXTS
    JOKINEN, P
    UKKONEN, E
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 520 : 240 - 248