RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
add a new model for 'Laws' (#290)
KevinHuSh243de6ac9048
diff --git a/README.md b/README.mdindex d9639df4a8..95a24c4f71 100644--- a/README.md+++ b/README.md@@ -172,8 +172,9 @@ $ docker compose up -d## 🆕 Latest Features-- Support [Ollama](./docs/ollama.md) for local LLM deployment.-- Support Chinese UI.+- 2023-04-10 Add a new layout recognize model for method 'Laws'.+- 2023-04-08 Support [Ollama](./docs/ollama.md) for local LLM deployment.+- 2023-04-07 Support Chinese UI.## 📜 Roadmapdiff --git a/README_ja.md b/README_ja.mdindex 8b07c1b18e..cd5de63ff5 100644--- a/README_ja.md+++ b/README_ja.md@@ -171,9 +171,9 @@ $ docker compose up -d```## 🆕 最新の新機能--- [Ollama](./docs/ollama.md) を使用した大規模モデルのローカライズされたデプロイメントをサポートします。-- 中国語インターフェースをサポートします。+- 2023-04-10 メソッド「Laws」に新しいレイアウト認識モデルを追加します。+- 2023-04-08 [Ollama](./docs/ollama.md) を使用した大規模モデルのローカライズされたデプロイメントをサポートします。+- 2023-04-07 中国語インターフェースをサポートします。## 📜 ロードマップdiff --git a/README_zh.md b/README_zh.mdindex af1e9d90ed..e6ed3608c9 100644--- a/README_zh.md+++ b/README_zh.md@@ -172,8 +172,9 @@ $ docker compose up -d## 🆕 最近新特性-- 支持用 [Ollama](./docs/ollama.md) 对大模型进行本地化部署。-- 支持中文界面。+- 2023-04-10 为‘Laws’版面分析增加了模型。+- 2023-04-08 支持用 [Ollama](./docs/ollama.md) 对大模型进行本地化部署。+- 2023-04-07 支持中文界面。## 📜 路线图diff --git a/rag/app/laws.py b/rag/app/laws.pyindex 1c99479aad..4478696f57 100644--- a/rag/app/laws.py+++ b/rag/app/laws.py@@ -14,6 +14,8 @@ import copyimport refrom io import BytesIOfrom docx import Document++from api.db import ParserTypefrom rag.nlp import bullets_category, is_english, tokenize, remove_contents_table, hierarchical_merge, \make_colon_as_title, add_positions, tokenize_chunksfrom rag.nlp import huqie@@ -23,7 +25,8 @@ from rag.settings import cron_loggerclass Docx(DocxParser):def __init__(self):- pass+ self.model_speciess = ParserType.LAWS.value+ super().__init__()def __clean(self, line):line = re.sub(r"\u3000", " ", line).strip()