diff --git a/dsLightRag/T1_Train.py b/dsLightRag/T1_Train.py index ac849806..d8f1c228 100644 --- a/dsLightRag/T1_Train.py +++ b/dsLightRag/T1_Train.py @@ -46,8 +46,8 @@ async def main(): file_path = os.path.join(docx_file, filename) # 获取docx文件的内容 if filename.endswith(".docx"): - continue - # content = get_docx_content_by_pandoc(file_path) + #continue + content = get_docx_content_by_pandoc(file_path) elif filename.endswith(".txt"): with open(file_path, "r", encoding="utf-8") as f: content = f.read() diff --git a/dsLightRag/TestReadDocx.py b/dsLightRag/TestReadDocx.py new file mode 100644 index 00000000..080ac35c --- /dev/null +++ b/dsLightRag/TestReadDocx.py @@ -0,0 +1,4 @@ +from Util.DocxUtil import get_docx_content_by_pandoc + +if __name__ == '__main__': + get_docx_content_by_pandoc(r"D:\dsWork\dsProject\dsLightRag\YunXiao\《万有引力定律》试题\《万有引力定律》拔高题(难)1.docx") \ No newline at end of file diff --git a/dsLightRag/Util/DocxUtil.py b/dsLightRag/Util/DocxUtil.py index 8d2a9209..cb275801 100644 --- a/dsLightRag/Util/DocxUtil.py +++ b/dsLightRag/Util/DocxUtil.py @@ -1,12 +1,8 @@ import logging import os import subprocess -import uuid from PIL import Image -import os - -from networkx.algorithms.bipartite.centrality import betweenness_centrality # 或者如果你想更详细地控制日志输出 logger = logging.getLogger('DocxUtil') @@ -143,3 +139,4 @@ def get_docx_content_by_pandoc(docx_file): return content.replace("\n\n", "\n").replace("\\", "/") else: return None + diff --git a/dsLightRag/Util/LightRagUtil.py b/dsLightRag/Util/LightRagUtil.py index 1edcc7d0..bcd6c559 100644 --- a/dsLightRag/Util/LightRagUtil.py +++ b/dsLightRag/Util/LightRagUtil.py @@ -1,11 +1,12 @@ import logging import logging.config import os + import numpy as np from lightrag import LightRAG from lightrag.kg.shared_storage import initialize_pipeline_status from lightrag.llm.openai import openai_complete_if_cache, openai_embed -from lightrag.rerank import jina_rerank, custom_rerank +from lightrag.rerank import custom_rerank from lightrag.utils import EmbeddingFunc, logger, set_verbose_debug import Config.Config @@ -144,8 +145,8 @@ def create_llm_model_func(): def create_embedding_func(): return EmbeddingFunc( - embedding_dim=1024, - max_token_size=8192, + embedding_dim=EMBED_DIM, + max_token_size=EMBED_MAX_TOKEN_SIZE, func=lambda texts: openai_embed( texts, model=EMBED_MODEL_NAME, diff --git a/dsLightRag/Util/__pycache__/DocxUtil.cpython-310.pyc b/dsLightRag/Util/__pycache__/DocxUtil.cpython-310.pyc index a0c11cb4..48e20a2b 100644 Binary files a/dsLightRag/Util/__pycache__/DocxUtil.cpython-310.pyc and b/dsLightRag/Util/__pycache__/DocxUtil.cpython-310.pyc differ diff --git a/dsLightRag/YunXiao/《万有引力定律》试题/《万有引力定律》拔高题(难)1.md b/dsLightRag/YunXiao/《万有引力定律》试题/《万有引力定律》拔高题(难)1.md new file mode 100644 index 00000000..84cea270 --- /dev/null +++ b/dsLightRag/YunXiao/《万有引力定律》试题/《万有引力定律》拔高题(难)1.md @@ -0,0 +1,65 @@ +> 1\. +> 我国首颗超百*Gbps*容量高通量地球静止轨道通信卫星中星26号卫星,于北京时间2023年2月23日在西昌卫星发射中心成功发射,该卫星主要用于为固定端及车、船、机载终端提供高速宽带接入服务。如图,某时刻中星26与椭圆轨道侦察卫星恰好位于C、*D*两点,两星轨道相交于*A*、*B*两点,*C*、*D*连线过地心,*D*点为远地点,两卫星运行周期都为*T*。下列说法正确的是(  ) +> +> ![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image1.png){width="4.574073709536308in" +> height="2.7777777777777777in"} +> +> A. 中星26与侦察卫星可能在*A*点或*B*点相遇 +> +> B. 侦查卫星从*D*点运动到*A*点过程中机械能增大 +> +> C. 中星26在*C*点线速度 +> ![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image2.png){width="0.15625in" +> height="0.25in"}与侦察卫星在*D*点线速度 +> ![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image3.png){width="0.16666666666666666in" +> height="0.25in"}相等 +> +> D. +> 相等时间内中星26与地球的连线扫过的面积大于侦察卫星与地球的连线扫过的面积 +> +> 【难度】\ +> 难 +> +> 【答案】 +> +> D +> +> 【解析】 +> +> 【解答】A.中星26与侦察卫星周期相同,并且当中星26在下半周运动时,卫星在上半周运动,故不可能相遇,故A错误;\ +> \ +> B.侦察卫星在D到A点过程中只有引力做功故机械能不变,故B错误;\ +> \ +> C.开普勒第二定律可知,在近地点速度大于远地点速度故中星26在*C*点线速度 +> ![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image2.png){width="0.15625in" +> height="0.25in"}大于侦察卫星在*D*点线速度 +> ![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image3.png){width="0.16666666666666666in" +> height="0.25in"} , 故C错误;\ +> \ +> D.中星26与侦察卫星的周期相同,由开普勒第三定律![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image4.png){width="0.5104166666666666in" +> height="0.4583333333333333in"} , +> 中星26轨道半径等于侦察卫星的半长轴,运动一个周期中星26是一个圆,而侦察卫星是一个椭圆,由于圆的面积大于椭圆的面积,故相等时间内中星26与地球的连线扫过的面积大于侦察卫星与地球的连线扫过的面积,故D正确;\ +> \ +> 故答案为:D。\ +> \ +> 【分析】A.分析可知两星周期相同,且刚好相对的半周期运动,故不会相遇;\ +> \ +> B.引力做功机械能守恒;\ +> \ +> C.开普勒第二定律可知,在近地点速度大于远地点速度;\ +> \ +> D.由开普勒第三定律![](./static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image4.png){width="0.5104166666666666in" +> height="0.4583333333333333in"} , +> 周期相同,中星26轨道半径等于侦察卫星的半长轴。 +> +> 【关联章节】第七章 万有引力与宇宙航行第七章 万有引力与宇宙航行 \> 1. +> 行星的运动第七章 万有引力与宇宙航行 \> 2. 万有引力定律; +> +> 【关联知识点】相互作用与运动规律经典力学的成就与局限性 \> +> 开普勒第一定律经典力学的成就与局限性 \> +> 开普勒第三定律经典力学的成就与局限性 \> +> 开普勒第二定律经典力学的成就与局限性 \> 万有引力定律; +> +> 【关联素养点】暂无数据 +> +> 【关联关键能力】暂无数据 diff --git a/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image1.png b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image1.png new file mode 100644 index 00000000..ae5b9108 Binary files /dev/null and b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image1.png differ diff --git a/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image2.png b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image2.png new file mode 100644 index 00000000..3c2e92fe Binary files /dev/null and b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image2.png differ diff --git a/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image3.png b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image3.png new file mode 100644 index 00000000..8af3dcfc Binary files /dev/null and b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image3.png differ diff --git a/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image4.png b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image4.png new file mode 100644 index 00000000..2276c04a Binary files /dev/null and b/dsLightRag/static/Images/760c54b8e6491d7c3ac566d6299818a4/media/image4.png differ