<commit_before>import uuid


class Note(object):
    """
    A note.
    Currently has a title, tags, texr and a priority."""

    def __init__(self, title, tags, text, priority=1, unique_id=None):
        if unique_id is None:
            self.id = str(uuid.uuid4())
        else:
            self.id = unique_id
        self.title = title
        self.tags = tags
        self.text = text
        self.priority = priority

    def __str__(self):
        return str(self.to_dictionary)

    def to_dictionary(self):
        return {<commit_msg>Remove duplicate tags during init<commit_after>import uuid


class Note(object):
    """
    A note.
    Currently has a title, tags, texr and a priority."""

    def __init__(self, title, tags, text, priority=1, unique_id=None):
        if unique_id is None:
            self.id = str(uuid.uuid4())
        else:
            self.id = unique_id
        self.title = title
        self.tags = self.__verify_tags(tags)
        self.text = text
        self.priority = priority

    def __str__(self):
        return str(self.to_dictionary)

    def __verify_tags(self, tags):
        return list(set(tags))

    def to_dictionary(self):
        return {
{'fraction_non_alphanumeric': 0.1010860484544695, 'fraction_numerical': 0.003341687552213868, 'mean_word_length': 2.1197916666666665, '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': '3900862', 'n_tokens_mistral': 364, 'n_tokens_neox': 352, 'n_words': 101}