{'fraction_non_alphanumeric': 0.02093244529019981, 'fraction_numerical': 0.0, 'mean_word_length': 5.152046783625731, '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}}
Grammar-Based Matching of Multiple Continuous Queries on XML Streams

This paper addresses the multiple-query matching problem on XML streams. The goal is to extract all XML data that match queries from the XML streams immediately and efficiently under the constraint of scanning the streams only once. A grammar-based, continuous-query matching method, namely GCQ, is proposed. GCQ generates a context-free grammar according to the queries being processed, and then produces a parser capable of parsing the grammar by using a compiler tool such as YACC. With the parser, GCQ matches multiple queries concurrently in XML data streams. With the matured compiler techniques and tools, we concentrate on solving the matching problem by a set of declarative grammar rules. Both of the algorithms for grammar generation and query matching have polynomial time complexity. Experiments were also conducted to show the efficiency and scalability of GCQ in various aspects. Consequently, GCQ is beneficial for building efficient publish/subscribe applications.