You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
488 B
26 lines
488 B
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
@Time : 2022/12/23 16:00
|
|
@Author :
|
|
@FileName:
|
|
@Software:
|
|
@Describe:
|
|
"""
|
|
import pandas as pd
|
|
|
|
|
|
path = "../data/论文_yy_小说_3.csv"
|
|
df_list = pd.read_csv(path).values.tolist()
|
|
|
|
df_list_new = []
|
|
print(len(df_list))
|
|
for i in df_list:
|
|
a = i[0]
|
|
b = i[1]
|
|
df_list_new.append("\t".join([a, "to", b]))
|
|
|
|
with open("../data/train_yy_pre.txt", "w", encoding='utf-8') as file:
|
|
for i in df_list_new:
|
|
file.write(i + '\n')
|
|
file.close()
|
|
|