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

一个疑问:为什么ConllLoader要把“#”过滤掉 #419

Open
hupidong opened this issue Jun 1, 2022 · 2 comments
Open

一个疑问:为什么ConllLoader要把“#”过滤掉 #419

hupidong opened this issue Jun 1, 2022 · 2 comments

Comments

@hupidong
Copy link

hupidong commented Jun 1, 2022

你好,在用ConllLoader加载NER数据集的时候,发现会把"#"过滤掉,因为在实际的问句中确实有#号存在的情况,不知道是出于什么原因考虑过滤掉呢?是否可以不过滤,或者支持自定义是否过滤?谢谢。

fastNLP.io.file_reader
line 124,125:
elif line.startswith('#'):
continue

@yhcc
Copy link
Member

yhcc commented Jun 2, 2022

因为在conll的格式定义中,一般#开头的句子都是表示meta-data或者comment的,因为常用的conll格式第一列一般是数字序号,所以不会出现#。不过后来大家在实际使用的时候,一般就没有加入数字序号了。感谢你的建议,我们会在之后的版本中增加一个参数,用来关闭忽略#开头的句子。

@hupidong
Copy link
Author

hupidong commented Jun 4, 2022

因为在conll的格式定义中,一般#开头的句子都是表示meta-data或者comment的,因为常用的conll格式第一列一般是数字序号,所以不会出现#。不过后来大家在实际使用的时候,一般就没有加入数字序号了。感谢你的建议,我们会在之后的版本中增加一个参数,用来关闭忽略#开头的句子。

好的,谢谢。

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