Преглед на файлове

continue add layout model for 'laws' (#292)

### 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 година
родител
ревизия
a0a480b708
No account linked to committer's email address
променени са 1 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 5
    2
      rag/app/laws.py

+ 5
- 2
rag/app/laws.py Целия файл

@@ -25,8 +25,7 @@ from rag.settings import cron_logger
class Docx(DocxParser):
def __init__(self):
self.model_speciess = ParserType.LAWS.value
super().__init__()
pass
def __clean(self, line):
line = re.sub(r"\u3000", " ", line).strip()
@@ -52,6 +51,10 @@ class Docx(DocxParser):
class Pdf(PdfParser):
def __init__(self):
self.model_speciess = ParserType.LAWS.value
super().__init__()
def __call__(self, filename, binary=None, from_page=0,
to_page=100000, zoomin=3, callback=None):
callback(msg="OCR is running...")

Loading…
Отказ
Запис