赞
踩
import pandas as pd
datas = pd.read_csv("./test.csv", header=0, index_col=0) # DataFrame
n_datas = data.to_numpy() # ndarray 转成numpy更好处理(个人喜好)
def delete_blank_lines(sentences):
return [s for s in sentences if s.split()]
no_line_datas = delete_blank_lines(n_datas)
DIGIT_RE = re.compile(r'\d+')
no_digit_datas = DIGIT_RE.sub('', no_line_datas)
def delete_digit(sentences):
return [DIGIT_RE.sub('', s) for s in sentences]
STOPS = ['。', '.', '?', '?', '!', '!'] # 中英文句末字符
def is_
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。