{'fraction_non_alphanumeric': 0.014985014985014986, 'fraction_numerical': 0.005994005994005994, 'mean_word_length': 4.535911602209945, '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}}
Sufficient conditions for zero-one laws

We generalize a result of Bateman and Erdos concerning partitions, thereby answering a question of Compton. From this result it follows that if K is a class of finite relational structures that is closed under the formation of disjoint unions and the extraction of components, and if it has the property that the number of indecomposables of size n is bounded above by a polynomial in n, then K has a monadic second order 0-1 law. Moreover, we show that if a class of finite structures with the unique factorization property is closed under the formation of direct products and the extraction of indecomposable factors, and if it has the property that the number of indecomposables of size at most n is bounded above by a polynomial in log n, then this class has a first order 0-1 law. These results cover all known natural examples of classes of structures that have been proved to have a logical 0-1 law by Compton's method of analyzing generating functions.