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

博主您好,在eval.py中有一小句代码(tag='0' if tag=='O' else tag)看不太懂,博主您是否能解释一下呢。这里都把tag的值赋为0了为什么还要检测是不是为'O'呢? #40

Open
YuQuankun opened this issue Jun 2, 2020 · 0 comments

Comments

@YuQuankun
Copy link

with open(label_path, "w") as fw:
line = []
for sent_result in label_predict:
for char, tag, tag_ in sent_result:
tag = '0' if tag == 'O' else tag
char = char.encode("utf-8")
line.append("{} {} {}\n".format(char, tag, tag_))
line.append("\n")
fw.writelines(line)

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

1 participant