lyg
2025-05-22 e60d75228fb161e464ca59fa2526bf0765f4d902
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-
# @author: 
# @date: 
# @version: 
# @description:
from knowledgebase.doc.docx_split import DocSplit
 
 
class TestDocxSplit:
    def test_split(self):
        docx_file = r'D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机1553B总线传输通信帧分配(公开).docx'
        # docx_file = r'D:\workspace\PythonProjects\KnowledgeBase\doc\table_test.docx'
        doc_split = DocSplit(docx_file, "总线通信协议")
        doc_split.split()
        print("\n".join([x.full_text_with_children for x in doc_split.paragraphs]))