<commit_before>
from .helper import key_for_cypher, value_for_cypher

class ClauseElement(object):
    sign = ''
    template = "{} {} {}"
    def __init__(self, attribute, value):
        self.attribute = attribute
        self.value = value

    def __repr__(self):
        return '<ClauseElement \'{}\'>'.format(self.for_cypher())

    def __hash__(self):
        return hash((self.attribute, self.sign, self.value))

    def cypher_value_string(self):
        return '{%s}' % self.attribute.alias

    @property
    def annotations(self):
        annotations = [self.attribute.annotation]
        try:
            annotations.append(self.value.annotation)
        except AttributeError:
            pass
        return annotations

    @property
    def attributes(self):
        attributes = [self.attribute]
        if hasattr(self.value, 'annotation'):
            attributes.append(self.value)
        return attributes

    def for_cypher(self):
        try:
            value = self.value.for_cypher()
        except AttributeError:
            value = self.cypher_value_string()
            print(value)
        return self.template.format(self.attribute.for_cypher(),
                                self.sign,
                                value)

class EqualClauseElement(ClauseElement):<commit_msg>Cleanup debug messages<commit_after>
from .helper import key_for_cypher, value_for_cypher

class ClauseElement(object):
    sign = ''
    template = "{} {} {}"
    def __init__(self, attribute, value):
        self.attribute = attribute
        self.value = value

    def __repr__(self):
        return '<ClauseElement \'{}\'>'.format(self.for_cypher())

    def __hash__(self):
        return hash((self.attribute, self.sign, self.value))

    def cypher_value_string(self):
        return '{%s}' % self.attribute.alias

    @property
    def annotations(self):
        annotations = [self.attribute.annotation]
        try:
            annotations.append(self.value.annotation)
        except AttributeError:
            pass
        return annotations

    @property
    def attributes(self):
        attributes = [self.attribute]
        if hasattr(self.value, 'annotation'):
            attributes.append(self.value)
        return attributes

    def for_cypher(self):
        try:
            value = self.value.for_cypher()
        except AttributeError:
            value = self.cypher_value_string()
        return self.template.format(self.attribute.for_cypher(),
                                self.sign,
                                value)

class EqualClauseElement(ClauseElement):
{'fraction_non_alphanumeric': 0.10328997704667177, 'fraction_numerical': 0.0, 'mean_word_length': 2.1354916067146283, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7221270', 'n_tokens_mistral': 730, 'n_tokens_neox': 687, 'n_words': 146}