假设要从 docx 读取的文本中提取 “裁决书” 关键字及其后面的内容,可以使用 python-docx 库读取文档,然后进行字符串处理。 其中关键字自定义 方法 1:直接提取整个文档文本并截取 from docx import Document # 读取docx文件 doc = Document("your_file.docx") # 替换为你的文件路径 text = "\n".join