{'fraction_non_alphanumeric': 0.011583011583011582, 'fraction_numerical': 0.0, 'mean_word_length': 4.893939393939394, '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}}
Polynomial-time inference of unions of tree pattern languages

In this paper we consider the polynomial time inferability from positive data for unions of two tree pattern languages. A tree pattern is a structured pattern known as a term in logic programming and term rewriting systems, and a tree pattern language is the set of all ground instances of a tree pat tern. We present a polynomial time algorithm to find a minimal union of two tree pattern languages containing given examples. Our algorithm can be considered as a natural extension of Plotkin's least generalization algorithm, which finds a minimal single tree pattern language. By using this algorithm we can realize a polynomial time inference machine for unions of two tree pattern languages from positive data.