Browse Source

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)
tags/v0.1.0
KevinHuSh 1 year ago
parent
commit
243de6ac90
No account linked to committer's email address
4 changed files with 13 additions and 8 deletions
  1. 3
    2
      README.md
  2. 3
    3
      README_ja.md
  3. 3
    2
      README_zh.md
  4. 4
    1
      rag/app/laws.py

+ 3
- 2
README.md View File

@@ -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

+ 3
- 3
README_ja.md View File

@@ -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 中国語インターフェースをサポートします。
## 📜 ロードマップ

+ 3
- 2
README_zh.md View File

@@ -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 支持中文界面。

## 📜 路线图


+ 4
- 1
rag/app/laws.py View File

@@ -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()

Loading…
Cancel
Save