Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix bug of regx (#1703)

Kevin Huc92d334b29fc
diff --git a/rag/nlp/__init__.py b/rag/nlp/__init__.py
index 349354ceac..e620225dca 100644
--- a/rag/nlp/__init__.py
+++ b/rag/nlp/__init__.py
@@ -344,7 +344,7 @@ def make_colon_as_title(sections):
if txt[-1] not in "::":
continue
txt = txt[::-1]
- arr = re.split(r"([。?!!?;;]| .)", txt)
+ arr = re.split(r"([。?!!?;;]| \.)", txt)
if len(arr) < 2 or len(arr[1]) < 32:
continue
sections.insert(i - 1, (arr[0][::-1], "title"))