
import pandas as pd

file_kb = r'/root/.openclaw/workspace-xiaoyan/business_knowledge/L2单词表/L2知识库-三级+A2.xlsx'
df = pd.read_excel(file_kb)

# 查看所有单词，保存到文件以便分析
with open('/root/.openclaw/workspace-xiaoyan/all_words_dump.txt', 'w', encoding='utf-8') as f:
    for i, row in df.iterrows():
        f.write(f"{i}\t{str(row['单词'])}\t{str(row['词性'])}\t{str(row['中文释义'])}\n")

print(f"已导出 {len(df)} 个单词到 all_words_dump.txt")
