'Create separate files for training and validation.
Arguments:
path(str): Path to data file.
valid_split(float, optional): Fraction of data to set aside for validation.
Returns:
str, str : Paths to train file and validation file'

@staticmethod
def create_valid_file(path, valid_split=0.1):

    text = open(path).read()
    (filename, ext) = os.path.splitext(path)
    train_path = ((filename + '_train') + ext)
    valid_path = ((filename + '_valid') + ext)
    train_split = int((len(text) * (1 - valid_split)))
    train_text = text[:train_split]
    valid_text = text[train_split:]
    with open(train_path, 'w') as train_file:
        train_file.write(train_text)
    with open(valid_path, 'w') as valid_file:
        valid_file.write(valid_text)
    return (train_path, valid_path)
