You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
需要的数据一定得是tsv的格式吗?
我通过下面的代码将空格分开的txt转成tsv,训练时报警WARNING:root:Data type error:
代码:
def write_data(data_, path_):
with open(path_, 'w+', encoding='utf-8') as f:
for each in data_:
f.write('\t'.join(each.split())+'\n')
输入的“词/type“用空格分割,上述代码里转成了\t
然后训练的时候,每条语料进去,都有个WARNING:root:Data type error:这样报错
The text was updated successfully, but these errors were encountered:
需要的数据一定得是tsv的格式吗? 我通过下面的代码将空格分开的txt转成tsv,训练时报警WARNING:root:Data type error: 代码: def write_data(data_, path_): with open(path_, 'w+', encoding='utf-8') as f: for each in data_: f.write('\t'.join(each.split())+'\n') 输入的“词/type“用空格分割,上述代码里转成了\t 然后训练的时候,每条语料进去,都有个WARNING:root:Data type error:这样报错
需要的数据一定得是tsv的格式吗?
我通过下面的代码将空格分开的txt转成tsv,训练时报警WARNING:root:Data type error:
代码:
def write_data(data_, path_):
with open(path_, 'w+', encoding='utf-8') as f:
for each in data_:
f.write('\t'.join(each.split())+'\n')
输入的“词/type“用空格分割,上述代码里转成了\t
然后训练的时候,每条语料进去,都有个WARNING:root:Data type error:这样报错
The text was updated successfully, but these errors were encountered: