8000 feat: add svcConverterSeparation models for processing documents · u2d-ai/msaDocModels@045d62d · GitHub
[go: up one dir, main page]

Skip to content

Commit 045d62d

Browse files
committed
feat: add svcConverterSeparation models for processing documents
1 parent 9718734 commit 045d62d

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

docs/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# msaDocModels Release Notes
22
## Possible future features:
33

4+
# 0.0.106
5+
6+
- add svcConverterSeparation models for processing documents
7+
48
# 0.0.105
59

610
- migrate to poetry

msaDocModels/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import glob
22
from os.path import basename, dirname, isfile, join
33

4-
version = "0.0.105"
4+
version = "0.0.106"
55
__author__ = "Stefan Welcker"
66
__copyright__ = "Copyright 2022, U2D.ai"
77
__license__ = "MIT"

msaDocModels/sdu.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
from typing import Any, Dict, List, Optional, Tuple, Union
66

77
from bson.objectid import ObjectId
8-
from msaDocModels import wdc
98
from pydantic import UUID4, BaseModel, Field
109

10+
from msaDocModels import wdc
11+
1112

1213
def to_camel(string: str) -> str:
1314
"""
@@ -6578,6 +6579,31 @@ class SeparationInferenceDTO(BaseModel):
65786579
inference: List[SeparationInferenceEntity]
65796580

65806581

6582+
class SeparationProcessDocumentDTO(BaseModel):
6583+
"""
6584+
Model that represent results for the document in needed structure.
6585+
6586+
Attributes:
6587+
paths_to_files: List of paths to pdf files.
6588+
6589+
"""
6590+
6591+
paths_to_files: List[str]
6592+
6593+
6594+
class SeparationProcessDocumentInput(BaseModel):
6595+
"""
6596+
Input model for training model by the given algorithm.
6597+
6598+
Attributes:
6599+
path_to_file: path to pdf document.
6600+
inference_result: SeparationInferenceDTO object with inference results for the given document.
6601+
"""
6602+
6603+
path_to_file: str
6604+
inference_result: SeparationInferenceDTO
6605+
6606+
65816607
class TrainInputModel(BaseModel):
65826608
"""
65836609
Input model for training model by the given algorithm.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "msaDocModels"
3-
version = "0.0.105"
3+
version = "0.0.106"
44
description = "MSA Document Pydantic Models and Schemas, used to store Parser, NLP, NLU and AI results for processed documents"
55
authors = ["Stefan Welcker"]
66
readme = "README.md"

0 commit comments

Comments
 (0)
0