{'fraction_non_alphanumeric': 0.02062975027144408, 'fraction_numerical': 0.002171552660152009, 'mean_word_length': 4.987012987012987, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Graph Compression by Tree Grammars and Direct Evaluation of Regular Path Query

This paper proposes a graph compression method that embodies a good trade-off between compression ratio and direct evaluation (of regular path queries) without decompression. A given directed graph is decomposed into a set of trees, each of which is compressed to a tree grammar by TreeRePair. When a set of tree grammars G1, GN and a deterministic selecting graph automaton (as a query) M are given, M is directly applied to production rules of G1, GN without decompression. Duplicate computation can be avoided by memoization. We conducted experiments on real-world graph data. The result shows that while the compression ratios of the proposed method do not outperform previous research (supporting only simple queries), CPU time for the proposed direct query evaluation tends to be shorter for larger graphs compared with a naive method.