bigscience-workshop / bigscience-workshop/data_tooling

Reason for not applying remove_non_prining_characters normalization

未关闭
#416 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
HTML
星标
91
派生
47
PR 合并指标
30 天内没有已合并 PR

描述

Hi,

We are much inspired by this great work and are in the process of cleaning our data. However, if we understand correctly, the `remove_non_prining_characters` normalization step is not used for the final cleaning. Do you have any thoughts on why this should not be used?

https://github.com/bigscience-workshop/data_tooling/blob/e28064ec7fb38af5143cafc896e9423a8b12392d/ac_dc/normalization.py#L5

There you have this:
```
non_printing_characters_re = re.compile(
f"[{''.join(map(chr, list(range(0,32)) + list(range(127,160))))}]"
)
```

Which we modified, to keep newlines (`\n`) and tabs (`\t`), and to also remove soft-hyphens, non-breaking spaces, and zero-width space:

```
additional_chars_to_remove = [160, 173, 8203]
non_printing_characters_re = re.compile(
f"[{''.join(map(chr, list(range(0,9)) + list(range(11, 32)) + list(range(127,160)) + additional_chars_to_remove))}]"
)
```

There could of course be more characters that one may want to remove.

To be clear, I am writing this here for two reasons:
1. To get your feedback. Do you think this is a good idea to use for the final data cleaning?
2. If so, this could be incorporated into this repository to help other people that might be thinking about this.

Thanks for your amazing contributions!

贡献指南

这个仓库没有索引到贡献指南

调研方向

阅读 ac_dc/normalization.py 中所引用的非打印字符正则表达式,然后追踪最终的清理路径,以确认是否应用了此规范化。将提议的字符范围以及保留的换行符和制表符与仓库当前的行为进行比较。当达成由 maintainer 支持的决定,并且在接受该决定的情况下,将相关指导纳入未来的数据清理时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
data
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。