def load_dataset_sst(path='/mnt/cloud/bairu/repos/text_pgd_attack/sst-2/'):

    def process_file(file):
        data_list = []
        with open((path + file), 'r', encoding='utf-8') as f:
            for line in f:
                (sen, label) = line.split('\t', 1)
                data_item = [sen, int(label)]
                data_list.append(data_item)
        return data_list
    train_dataset = process_file('train.tsv')
    valid_dataset = process_file('valid.tsv')
    test_dataset = process_file('test.tsv')
    return test_dataset
def load_dataset_sst(path='/mnt/cloud/bairu/repos/text_pgd_attack/sst-2/'):

    def process_file(file):
        data_list = []
        with open((path + file), 'r', encoding='utf-8') as f:
            for line in f:
                (sen, label) = line.split('\t', 1)
                data_item = [sen, int(label)]
                data_list.append(data_item)
        return data_list
    train_dataset = process_file('train.tsv')
    valid_dataset = process_file('valid.tsv')
    test_dataset = process_file('test.tsv')
    return test_dataset