<commit_before>import random
import equibel as eb

__all__ = ['literal_conj', 'literal']

ALPHABET = "abcdefghijklmnopqrstuvwxyz"
atoms = [eb.Prop(variable) for variable in ALPHABET]
sorted_atoms = sorted(atoms, key=lambda item: item.name)

conj_pos = lambda formula, x: formula & x
conj_neg = lambda formula, x: formula & ~x
no_change = lambda formula, x: formula
conj_functions = [conj_pos, conj_neg, no_change]

def literal_conj(num_vars):
    variables = sorted_atoms[:num_vars]
    
    formula = eb.Prop(True)

    for variable in variables:
        formula = random.choice(conj_functions)(formula, variable)
    
    return formula

<commit_msg>Added simplification<commit_after>import random
import equibel as eb

__all__ = ['literal_conj', 'literal']

ALPHABET = "abcdefghijklmnopqrstuvwxyz"
atoms = [eb.Prop(variable) for variable in ALPHABET]
sorted_atoms = sorted(atoms, key=lambda item: item.name)

conj_pos = lambda formula, x: formula & x
conj_neg = lambda formula, x: formula & ~x
no_change = lambda formula, x: formula
conj_functions = [conj_pos, conj_neg, no_change]

def literal_conj(num_vars):
    variables = sorted_atoms[:num_vars]
    
    formula = eb.Prop(True)

    for variable in variables:
        formula = random.choice(conj_functions)(formula, variable)
    
    return eb.simplify(formula)


{'fraction_non_alphanumeric': 0.09743202416918428, 'fraction_numerical': 0.0, 'mean_word_length': 4.686695278969957, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '5680096', 'n_tokens_mistral': 465, 'n_tokens_neox': 451, 'n_words': 117}