feat: llm-filter 两级过滤(规则层+五类分类+去重+长文本保护),工作流单线程 v4

- 规则层(不调 LLM):横线装饰/HTML 水印 token/URL/邮箱/单双 ASCII 字符直接删
- LLM 五类分类:garbage/overlay/noise 删,repeat/dialogue 留,未识别回退保留
- 按文本去重:相同文本只调一次 LLM(忽略空白/大小写),判定一致并省调用
- 长文本保护:≥min_keep_len 时 noise 不构成删除依据
- 真实任务 run_ac7f480a3ccb 验证:非规则误删 350→193(-45%),呻吟/对话保留
- ocr-subtitle 工作流 v4:pool 钉死单线程(1/1)
- 回归夹具 testdata/ocr_srt_run_ac7f480a3ccb.srt(真实 1666 条 OCR 输出)
This commit is contained in:
2026-08-17 23:20:16 +08:00
parent 2b3a650612
commit 5ffa2ac39e
5 changed files with 7230 additions and 70 deletions
+9 -4
View File
@@ -2,10 +2,10 @@
"id": "ocr-subtitle",
"name": "字幕OCR提取",
"description": "抽帧并 OCR 提取视频烧录字幕,经 LLM 过滤无意义内容后生成带时间轴的 SRT 基准数据。",
"version": 3,
"version": 4,
"definition": {
"name": "字幕OCR提取",
"version": 3,
"version": 4,
"nodes": [
{
"id": "extract",
@@ -27,7 +27,9 @@
"id": "ocr",
"node_type": "subtitle-ocr",
"params": {
"prompt": "提取图像中的文字,不要描述图片中的内容"
"prompt": "提取图像中的文字,不要描述图片中的内容",
"pool_min_workers": 1,
"pool_max_workers": 1
},
"inputs": {
"frames_manifest": "extract.frames_manifest"
@@ -36,7 +38,10 @@
{
"id": "filter",
"node_type": "llm-filter",
"params": {},
"params": {
"pool_min_workers": 1,
"pool_max_workers": 1
},
"inputs": {
"srt_uri": "ocr.srt_uri"
}