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 条
  • [1] Efficient string matching on coded texts
    Breslauer, D
    Gasieniec, L
    COMBINATORIAL PATTERN MATCHING, 1995, 937 : 27 - 40
  • [2] Efficient string matching on packed texts
    Breslauer, D
    Gasieniec, L
    RAIRO-INFORMATIQUE THEORIQUE ET APPLICATIONS-THEORETICAL INFORMATICS AND APPLICATIONS, 1996, 30 (06): : 521 - 544
  • [3] Efficient Approximate Substring Matching in Compressed String
    Han, Yutong
    Wang, Bin
    Yang, Xiaochun
    Web-Age Information Management, Pt II, 2016, 9659 : 184 - 197
  • [4] Bit-parallel approach to approximate string matching in compressed texts
    Matsumoto, T
    Kida, T
    Takeda, M
    Shinohara, A
    Arikawa, S
    SPIRE 2000: SEVENTH INTERNATIONAL SYMPOSIUM ON STRING PROCESSING AND INFORMATION RETRIEVAL - PROCEEDINGS, 2000, : 221 - 228
  • [5] Pattern matching in Huffman encoded texts
    Klein, ST
    Shapira, D
    INFORMATION PROCESSING & MANAGEMENT, 2005, 41 (04) : 829 - 841
  • [6] Pattern matching in Huffman encoded texts
    Klein, ST
    Shapira, D
    DCC 2001: DATA COMPRESSION CONFERENCE, PROCEEDINGS, 2001, : 449 - 458
  • [7] Improved Approximate String Matching and Regular Expression Matching on Ziv-Lempel Compressed Texts
    Bille, Philip
    Fagerberg, Rolf
    Gortz, Inge Li
    ACM TRANSACTIONS ON ALGORITHMS, 2009, 6 (01)
  • [8] Improved approximate string matching and regular expression matching on Ziv-Lempel compressed texts
    Bille, Philip
    Fagerberg, Rolf
    Gortz, Inge Li
    COMBINATORIAL PATTERN MATCHING, PROCEEDINGS, 2007, 4580 : 52 - +
  • [9] Processing of Huffman compressed texts with a super-alphabet
    Fredriksson, K
    Tarhio, J
    STRING PROCESSING AND INFORMATION RETRIEVAL, PROCEEDINGS, 2003, 2857 : 108 - 121
  • [10] On string matching in chunked texts
    Peltola, Hamm
    Tarhio, Jorma
    IMPLEMENTATION AND APPLICATION OF AUTOMATA, 2007, 4783 : 157 - 167