资讯 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

数据清洗

工具路径:wenxin/data/data_cleaning

  • 参数:
sage: data_cleaning.py [-h] [-i INPUT] [-o OUTPUT] [-l] [-t2s] [-re] [-ru]
 
main
 
optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT  # 输入数据文件
  -o OUTPUT, --output OUTPUT  #输出数据文件
  -l, --to_lower  # 转小写
  -t2s, --trad_to_simp  # 繁体转简体
  -re, --remove_emoji   # 去除emoji表情
  -ru, --remove_url     # 删除URL
  • 准备环境
cd wenxin/data/data_cleaning
sh install_env.sh
  • 使用
python data_cleaning.py -i input.txt -o output.txt --to_lower --trad_to_simp --remove_emoji --remove_url
# 或者
python data_cleaning.py -i input.txt -o output.txt -l -t2s -re -ru