<commit_before>class Player(object):
	def __init__(self, name):
		self.name = name
		self.win = self.lose = self.tie = 0

class Tournament(object):
	def __init__(self, players):
		if isinstance(players[0], string):
			players = [Player(x) for x in players]
		self.playsrs = players
		self.round = 0
		self.log = []
		self.started = False
	
	def strat(self):
		self.started = True

	def start_round(self, round=-1):
		if not self.started:
			raise TournamentError
		if round >= 0:
			self.round = round
		else:
			self.round += 1


class TournamentError(Exception):
	_mes = 'Unknown Error.'
	def __init__(self):
		Ecception.__init__(self, self._mes)


class NotStartedError(TournamentError):
	_mes = 'The tournament is not running!'
<commit_msg>bases<commit_after>class Player(object):

    def __init__(self, name):
        self.name = name
        self.win = self.lose = self.tie = 0


class Tournament(object):

    def __new__(cls, kind, players):
        if kind.lower() == "swiss":
            return Swiss(players)
        else:
            raise KindError


class Swiss(Tournament):

    def __init__(self, players):
        if isinstance(players[0], string):
            players = [Player(x) for x in players]
        self.playsrs = players
        self.round = 0
        self.log = []
        self.started = False

    def strat(self):
        self.started = True

    def start_round(self, round=-1):
        if not self.started:
            raise TournamentError
        if round >= 0:
            self.round = round
        else:
            self.round += 1

    def stop(self):
        pass


class TournamentError(Exception):
    _mes = 'Unknown Error.'

    def __init__(self):
        Ecception.__init__(self, self._mes)


class KindError(TournamentError):
    _mes = 'No such kind of tournament!'


class NotStartedError(TournamentError):
    _mes = 'The tournament is not running!'
{'fraction_non_alphanumeric': 0.110057925223802, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 2.5849056603773586, 'pattern_counts': {'":': 1, '<': 3, '<?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': '3045825', 'n_tokens_mistral': 641, 'n_tokens_neox': 575, 'n_words': 163}