<commit_before>#!/usr/bin/env python
#coding: utf-8


class User(object):
    """コミットした者の名前とメールアドレスを保持"""
    def __init__(self, name, email=None):
        self.name = name
        self.email = email

    def __repr__(self):
        return "UserObject(name='%s', email='%s')" % (
                                    self.name, self.email)
    def __str__(self):
        return self.__repr__()


class Commit(object):
    """コミットのハッシュ値、製作者、日付時間、コミットコメント"""\
    """マージしたのであればマージしたデータを保持"""
    def __init__(self, commithash, author, date, comment, merge_data=None):
        self.commithash = commithash
        self.author = self._get_user_obj(author)
        self.date = date
        self.comment = comment
        self.merge_data = merge_data

    def _get_user_obj(self, author_string):
        if " " in author_string:
            lines = author_string.split(" ")
            name = lines[0]
            email = lines[1][0:1]<commit_msg>fatal bug fixed: mistaked getting email way<commit_after>#!/usr/bin/env python
#coding: utf-8


class User(object):
    """コミットした者の名前とメールアドレスを保持"""
    def __init__(self, name, email=None):
        self.name = name
        self.email = email

    def __repr__(self):
        return "UserObject(name='%s', email='%s')" % (
                                    self.name, self.email)
    def __str__(self):
        return self.__repr__()


class Commit(object):
    """コミットのハッシュ値、製作者、日付時間、コミットコメント"""\
    """マージしたのであればマージしたデータを保持"""
    def __init__(self, commithash, author, date, comment, merge_data=None):
        self.commithash = commithash
        self.author = self._get_user_obj(author)
        self.date = date
        self.comment = comment
        self.merge_data = merge_data

    def _get_user_obj(self, author_string):
        if " " in author_string:
            lines = author_string.split(" ")
            name = lines[0]
            email = lines[1]
{'fraction_non_alphanumeric': 0.12598425196850394, 'fraction_numerical': 0.004199475065616798, 'mean_word_length': 2.361552028218695, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1304351', 'n_tokens_mistral': 695, 'n_tokens_neox': 665, 'n_words': 123}