Language filter

From cas-bigdatalab/piflow · View interactive version

Language filter is an AI agent skill from the GitHub repository cas-bigdatalab/piflow. 语种过滤工具。对指定或全部文本列进行语言检测,可选择保留或剔除目标语种, 输出过滤后的数据并附带 detected_lang 列。

How to use this skill

Skill file

language_filter 语种过滤

功能概述

参数说明

| 参数 | 必填 | 默认值 | 说明 |

|------|------|--------|------|

| --input_path | 是 | | 输入文件路径(支持CSV/TSV/Excel等) |

| --output_path | 是 | | 输出文件路径(过滤后的文件) |

| --target_lang | 是 | | 目标语种代码(如 zh, en, fr 等) |

| --text_columns | 否 | | 用于检测的文本列,逗号分隔;不填默认全部字符串列 |

| --mode | 否 | | keep=保留目标语种,drop=剔除目标语种,默认 keep |

使用方法

python scripts/language_filter.py \
  --input_path <输入文件> \
  --output_path <输出文件> \
  --target_lang zh \
  [--text_columns col1,col2] \
  [--mode keep|drop]

输出说明

注意事项

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.