# Path: abkhazia/utils/logger.py
# class LevelFilter(logging.Filter):
# class WhitespaceRemovingFormatter(logging.Formatter):
# class NoEmptyMessageFilter(logging.Filter):
# class NoLocalSubdirNotFound(logging.Filter):
#     def __init__(self, passlevels):
#     def filter(self, record):
#     def format(self, record):
#     def filter(self, record):
#     def filter(self, record):
# def get_log(log_file=os.devnull, verbose=False, header_in_stdout=False):
# def reopen_files(log, mode='a+'):
# def null_logger():
# 
# Path: abkhazia/utils/config.py
# class AbkhaziaConfig(object):
#     def default_config_file(name='abkhazia'):
#     def __init__(self, config_file=None):


import configparser
import random
from abkhazia.utils import logger, config
          train split. If None, the value is automatically set to the
          complement of the test size. (default is None)


    """
    def __init__(self, corpus, log=logger.null_logger(),
                 random_seed=None, prune=True):
        self.log = log
        self.prune = prune
        self.corpus = corpus

        # seed the random generator
        if random_seed is not None:
            self.log.debug('random seed is %i', random_seed)
        random.seed(random_seed)

        # read utt2spk from the input corpus
        utt_ids, utt_speakers = zip(*self.corpus.utt2spk.items())
        self.utts = list(zip(utt_ids, utt_speakers))
        self.size = len(utt_ids)
        self.speakers = set(utt_speakers)
        self.log.debug('loaded %i utterances from %i speakers',
                       self.size, len(self.speakers))

    @staticmethod
    def default_test_prop():
        """Return the default proportion for the test set

        Try to read from configuration file, else return 0.5"""
        try:

# Path: abkhazia/utils/logger.py
# class LevelFilter(logging.Filter):
# class WhitespaceRemovingFormatter(logging.Formatter):
# class NoEmptyMessageFilter(logging.Filter):
# class NoLocalSubdirNotFound(logging.Filter):
#     def __init__(self, passlevels):
#     def filter(self, record):
#     def format(self, record):
#     def filter(self, record):
#     def filter(self, record):
# def get_log(log_file=os.devnull, verbose=False, header_in_stdout=False):
# def reopen_files(log, mode='a+'):
# def null_logger():
# 
# Path: abkhazia/utils/config.py
# class AbkhaziaConfig(object):
#     def default_config_file(name='abkhazia'):
#     def __init__(self, config_file=None):


# Path: abkhazia/corpus/corpus_split.py
import configparser
import random
from abkhazia.utils import logger, config

          train split. If None, the value is automatically set to the
          complement of the test size. (default is None)


    """
    def __init__(self, corpus, log=logger.null_logger(),
                 random_seed=None, prune=True):
        self.log = log
        self.prune = prune
        self.corpus = corpus

        # seed the random generator
        if random_seed is not None:
            self.log.debug('random seed is %i', random_seed)
        random.seed(random_seed)

        # read utt2spk from the input corpus
        utt_ids, utt_speakers = zip(*self.corpus.utt2spk.items())
        self.utts = list(zip(utt_ids, utt_speakers))
        self.size = len(utt_ids)
        self.speakers = set(utt_speakers)
        self.log.debug('loaded %i utterances from %i speakers',
                       self.size, len(self.speakers))

    @staticmethod
    def default_test_prop():
        """Return the default proportion for the test set

        Try to read from configuration file, else return 0.5"""
        try:

            return float(config.get(