{'fraction_non_alphanumeric': 0.016, 'fraction_numerical': 0.0, 'mean_word_length': 5.212765957446808, '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}}
A New Approach to the Conversion of Finite Automata to Regular Expressions ∗

The problem of XSD inference is important and an efficient solution to it is much needed. This entails devising algorithms that learn regular expressions from a given sample of input strings. There are algorithms already to infer automata from a given set of sample strings, and therefore, regarding the problem above, an algorithm to transform an automaton to a regular expression efficiently is needed. The existing methods produce a possibly exponentially larger equivalent regular expression given an automaton. Here, we investigate an algorithm that is based on a structural decomposition of the given automaton, and produces a regular expression that is small on average. Along with the description of the algorithm, a proof of correctness is provided, together with experimental validation.