Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAC实体识别进行增量训练 #226

Open
Odimmsun opened this issue Oct 20, 2021 · 1 comment
Open

LAC实体识别进行增量训练 #226

Odimmsun opened this issue Oct 20, 2021 · 1 comment

Comments

@Odimmsun
Copy link

需要的数据一定得是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:这样报错

@xianwenleon
Copy link

你的数据标注可能出现了重复标注的tag。比如:北京/LOC /LOC

需要的数据一定得是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:这样报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants