Skip to content
Snippets Groups Projects
Unverified Commit 243de6ac authored by KevinHuSh's avatar KevinHuSh Committed by GitHub
Browse files

add a new model for 'Laws' (#290)

### What problem does this PR solve?

Issue link:#289
### Type of change

- [x] New Feature (non-breaking change which adds functionality)
parent 923cbe48
No related branches found
No related tags found
No related merge requests found
......@@ -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.
## 📜 Roadmap
......
......@@ -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 中国語インターフェースをサポートします。
## 📜 ロードマップ
......
......@@ -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 支持中文界面。
## 📜 路线图
......
......@@ -14,6 +14,8 @@ import copy
import re
from io import BytesIO
from docx import Document
from api.db import ParserType
from rag.nlp import bullets_category, is_english, tokenize, remove_contents_table, hierarchical_merge, \
make_colon_as_title, add_positions, tokenize_chunks
from rag.nlp import huqie
......@@ -23,7 +25,8 @@ from rag.settings import cron_logger
class 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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment