# -*- coding: utf-8 -*-
"""从口播里抽出所有带数字的句子 + 与钱/量相关的表述"""
import glob, os, re

ROOT = r"D:\Deepseek\douyin_fengdaquan"
SUB = os.path.join(ROOT, "subtitles")

MONEY = re.compile(r"(元|块|万|千|佣金|收入|工资|学费|结算|单|条|播放|曝光|赞|粉)")
NUM = re.compile(r"\d")

for fp in sorted(glob.glob(os.path.join(SUB, "*.txt"))):
    base = os.path.basename(fp)[:-4]
    text = open(fp, encoding="utf-8").read()
    parts = [p.strip() for p in re.split(r"[，,。、；;！!?？\s]+", text) if p.strip()]
    hits = [p for p in parts if (NUM.search(p) and MONEY.search(p)) or re.search(r"(万|千|百)\s*(播放|单|条|元|块)", p)]
    if not hits:
        continue
    print(f"\n### {base}")
    for h in hits[:18]:
        print("   ", h[:110])
