data-science-document-ai 1.42.4__py3-none-any.whl → 1.42.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {data_science_document_ai-1.42.4.dist-info → data_science_document_ai-1.42.5.dist-info}/METADATA +1 -1
- {data_science_document_ai-1.42.4.dist-info → data_science_document_ai-1.42.5.dist-info}/RECORD +4 -4
- src/postprocessing/common.py +7 -1
- {data_science_document_ai-1.42.4.dist-info → data_science_document_ai-1.42.5.dist-info}/WHEEL +0 -0
{data_science_document_ai-1.42.4.dist-info → data_science_document_ai-1.42.5.dist-info}/RECORD
RENAMED
|
@@ -7,7 +7,7 @@ src/io.py,sha256=tOJpMyI-mP1AaXKG4UFudH47MHWzjWBgVahFJUcjGfs,4749
|
|
|
7
7
|
src/llm.py,sha256=OE4IEIqcM-hYK9U7e0x1rAfcqdpeo4iXPHBp64L5Qz0,8199
|
|
8
8
|
src/log_setup.py,sha256=RhHnpXqcl-ii4EJzRt47CF2R-Q3YPF68tepg_Kg7tkw,2895
|
|
9
9
|
src/pdf_processing.py,sha256=dxsYvNnONAjzS-T7K5aSo89rz7QcdW3ZDfeuFyeCeII,16294
|
|
10
|
-
src/postprocessing/common.py,sha256=
|
|
10
|
+
src/postprocessing/common.py,sha256=5W-u3lKbnPQRKT4h5EfegegMjSXOKik73X7kUx9ik0Y,21888
|
|
11
11
|
src/postprocessing/postprocess_booking_confirmation.py,sha256=nK32eDiBNbauyQz0oCa9eraysku8aqzrcoRFoWVumDU,4827
|
|
12
12
|
src/postprocessing/postprocess_commercial_invoice.py,sha256=3I8ijluTZcOs_sMnFZxfkAPle0UFQ239EMuvZfDZVPg,1028
|
|
13
13
|
src/postprocessing/postprocess_partner_invoice.py,sha256=koGR7dN37FqJcepdzkrzNBHuBBUuCp_3CrteScASqyE,10590
|
|
@@ -52,6 +52,6 @@ src/prompts/prompt_library.py,sha256=jPxybNPPGH7mzonqtAOqmw5WcT-RtbGP0pvMqqP22hg
|
|
|
52
52
|
src/setup.py,sha256=M-p5c8M9ejKcSZ9N86VtmtPc4TYLxe1_4_dxf6jpfVc,7262
|
|
53
53
|
src/tms.py,sha256=UXbIo1QE--hIX6NZi5Qyp2R_CP338syrY9pCTPrfgnE,1741
|
|
54
54
|
src/utils.py,sha256=nU69zR3TB7IZmCc19DD8H27Riek8GJAldmhJjCSwNEE,16090
|
|
55
|
-
data_science_document_ai-1.42.
|
|
56
|
-
data_science_document_ai-1.42.
|
|
57
|
-
data_science_document_ai-1.42.
|
|
55
|
+
data_science_document_ai-1.42.5.dist-info/METADATA,sha256=FauluZfyiueEsYJsiMdiXv7yko2N3Xp5UTe8K0U1Toc,2153
|
|
56
|
+
data_science_document_ai-1.42.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
57
|
+
data_science_document_ai-1.42.5.dist-info/RECORD,,
|
src/postprocessing/common.py
CHANGED
|
@@ -136,7 +136,7 @@ def extract_number(data_field_value):
|
|
|
136
136
|
"""
|
|
137
137
|
formatted_value = ""
|
|
138
138
|
for c in data_field_value:
|
|
139
|
-
if c.isnumeric() or c in [",", "."]:
|
|
139
|
+
if c.isnumeric() or c in [",", ".", "-"]:
|
|
140
140
|
formatted_value += c
|
|
141
141
|
|
|
142
142
|
# First and last characters should not be [",", "."]
|
|
@@ -539,6 +539,9 @@ def decimal_convertor(value, quantity=False):
|
|
|
539
539
|
# Remove spaces
|
|
540
540
|
value = value.strip().replace(" ", "")
|
|
541
541
|
|
|
542
|
+
# Check "-" and remove it for processing
|
|
543
|
+
is_negative, value = (True, value[1:]) if value.startswith("-") else (False, value)
|
|
544
|
+
|
|
542
545
|
if not quantity:
|
|
543
546
|
# Convert comma to dot for decimal point (e.g., 4.123,45 -> 4123.45)
|
|
544
547
|
if re.match(r"^\d{1,3}(\.\d{3})*,\d{1,2}$", value):
|
|
@@ -573,6 +576,9 @@ def decimal_convertor(value, quantity=False):
|
|
|
573
576
|
elif re.match(r"^\d+\.\d{3,}$", value):
|
|
574
577
|
value = value[: value.index(".") + 3]
|
|
575
578
|
|
|
579
|
+
# Re-add negative sign if applicable
|
|
580
|
+
value = "-" + value if is_negative else value
|
|
581
|
+
|
|
576
582
|
return value
|
|
577
583
|
|
|
578
584
|
|
{data_science_document_ai-1.42.4.dist-info → data_science_document_ai-1.42.5.dist-info}/WHEEL
RENAMED
|
File without changes
|