def _split_and_cleanup(split_map, data_path):
    """
    Method that removes quotations from .tok files and saves the tokenized sentence
    and labels separately, in the form snli_1.0_{split}.txt.s1.tok or snli_1.0_{
    split}.txt.s2.tok or snli_1.0_{split}.txt.lab.

    Args:
        split_map(dict) : A dictionary containing train, test and dev
        tokenized dataframes.
        data_path(str): Path to the data folder.

    """

    for file_split in split_map.keys():

        s1_tok_path = os.path.join(
            data_path,
            SNLI_CLEAN_PATH,
            "snli_1.0_{}.txt.s1.tok".format(file_split),
        )
        s2_tok_path = os.path.join(
            data_path,
            SNLI_CLEAN_PATH,
            "snli_1.0_{}.txt.s2.tok".format(file_split),
        )
        with open(s1_tok_path, "r") as fin, open(
            "{}.tmp".format(s1_tok_path), "w"
        ) as tmp:
            for line in fin:
                s = line.replace('"', "")
                tmp.write(s)
        with open(s2_tok_path, "r") as fin, open(
            "{}.tmp".format(s2_tok_path), "w"
        ) as tmp:
            for line in fin:
                s = line.replace('"', "")
                tmp.write(s)
        shutil.move("{}.tmp".format(s1_tok_path), s1_tok_path)
        shutil.move("{}.tmp".format(s2_tok_path), s2_tok_path)

    Method that removes quotations from .tok files and saves the tokenized sentence
    and labels separately, in the form snli_1.0_{split}.txt.s1.tok or snli_1.0_{
    split}.txt.s2.tok or snli_1.0_{split}.txt.lab.

    Args:
        split_map(dict) : A dictionary containing train, test and dev
        tokenized dataframes.
        data_path(str): Path to the data folder.

    
utils_nlp/models/gensen/preprocess_utils.py