# -*- coding: utf-8 -*- # # @author: # @date: # @version: # @description: from knowledgebase.db.doc_db_helper import doc_dbh from knowledgebase.doc.doc_processor import DocProcessor def test_process(): files = [ r"D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机1553B总线传输通信帧分配(公开).docx", r"D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机分系统遥测源包设计报告(公开).docx", r"D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机软件用户需求(公开).docx", r"D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机遥测大纲(公开).docx", r"D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机遥测信号分配表(公开).docx", # r"D:\workspace\PythonProjects\KnowledgeBase\doc\XA-5D无人机指令格式与编码定义(公开).docx", r"D:\workspace\PythonProjects\KnowledgeBase\doc\指令格式(公开).docx" ] for file in files: doc_processor = DocProcessor(file) doc_processor.process() def test_get_text_by_entity(): text = doc_dbh.get_text_with_entities(['指令组内容下传']) print(text) if __name__ == '__main__': # test_process() test_get_text_by_entity()