data-science-document-ai 1.45.1__py3-none-any.whl → 1.45.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: data-science-document-ai
3
- Version: 1.45.1
3
+ Version: 1.45.2
4
4
  Summary: "Document AI repo for data science"
5
5
  Author: Naomi Nguyen
6
6
  Author-email: naomi.nguyen@forto.com
@@ -1,4 +1,4 @@
1
- src/constants.py,sha256=HKHP9MqkLrC6pHgOt0XX2F8j6kbupXJ4HscClDwMBaM,3656
1
+ src/constants.py,sha256=09Ar-Wzvm7EBQiAQ1S1-MAenFO0DppKk-nyIDWFTQGE,3656
2
2
  src/constants_sandbox.py,sha256=Iu6HdjCoNSmOX0AwoL9qUQkhq_ZnIN5U9e-Q2UfNuGc,547
3
3
  src/docai.py,sha256=dHuR0ehVjUi1CnoNvdp_yxJtpU_HFXqAZ61ywdz7BEo,5655
4
4
  src/docai_processor_config.yaml,sha256=81NUGs-u8UFJm6mc0ZOeeNQlhe9h0f35GhjTcwErvTA,1717
@@ -10,7 +10,7 @@ src/pdf_processing.py,sha256=lzvoza9itpEyl-rcBQbIcWuFxUAvF_Qyc-OpuPQWWMk,20354
10
10
  src/postprocessing/common.py,sha256=dagAg0hZGuZc03bXdfOolxekewMEVUfz917IGCiAtWI,26118
11
11
  src/postprocessing/postprocess_booking_confirmation.py,sha256=nK32eDiBNbauyQz0oCa9eraysku8aqzrcoRFoWVumDU,4827
12
12
  src/postprocessing/postprocess_commercial_invoice.py,sha256=3I8ijluTZcOs_sMnFZxfkAPle0UFQ239EMuvZfDZVPg,1028
13
- src/postprocessing/postprocess_partner_invoice.py,sha256=LZcMZfJeLdcbYqPemO8gn9SmJxv-NPmb4uVCT3lKg18,12341
13
+ src/postprocessing/postprocess_partner_invoice.py,sha256=m-un3OFzxV-6sf8xa5PBvBhe-HJAUNtXJ5LCd49kD84,12434
14
14
  src/prompts/library/bookingConfirmation/evergreen/placeholders.json,sha256=IpM9nmSPdyroliZfXB1-NDCjiHZX_Ff5BH7-scNhGqE,1406
15
15
  src/prompts/library/bookingConfirmation/evergreen/prompt.txt,sha256=5ivskCG831M2scW3oqQaoltXIyHV-n6DYUygWycXxjw,2755
16
16
  src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json,sha256=hMPNt9s3LuxR85AxYy7bPcCDleug6gSwVjefm3ismWY,1405
@@ -54,6 +54,6 @@ src/prompts/prompt_library.py,sha256=VJWHeXN-s501C2GiidIIvQQuZdU6T1R27hE2dKBiI40
54
54
  src/setup.py,sha256=M-p5c8M9ejKcSZ9N86VtmtPc4TYLxe1_4_dxf6jpfVc,7262
55
55
  src/tms.py,sha256=UXbIo1QE--hIX6NZi5Qyp2R_CP338syrY9pCTPrfgnE,1741
56
56
  src/utils.py,sha256=Ow5_Jals88o8mbZ1BoHfZpHZoCfig_UQb5aalH-mpWE,17278
57
- data_science_document_ai-1.45.1.dist-info/METADATA,sha256=U2ASt9xmLqXeWIDx7cr0LBJFV9yJC4yh398R25jkWvs,2152
58
- data_science_document_ai-1.45.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
59
- data_science_document_ai-1.45.1.dist-info/RECORD,,
57
+ data_science_document_ai-1.45.2.dist-info/METADATA,sha256=AyOAwrTOEHWaLoPk2_9RJLjUXUlumOvwCPt92QZbMw4,2152
58
+ data_science_document_ai-1.45.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
59
+ data_science_document_ai-1.45.2.dist-info/RECORD,,
src/constants.py CHANGED
@@ -23,7 +23,7 @@ project_parameters = {
23
23
  "invoice_classification_lookup": "invoice_classification.json",
24
24
  "reverse_charge_sentence_lookup": "reverse_charge_sentences.json",
25
25
  # Fuzzy logic params
26
- "fuzzy_threshold_item_code": 70,
26
+ "fuzzy_threshold_item_code": 90,
27
27
  "fuzzy_threshold_reverse_charge": 80,
28
28
  "fuzzy_threshold_invoice_classification": 70,
29
29
  # Chunking params
@@ -226,7 +226,11 @@ async def process_line_items_batch(
226
226
 
227
227
  # Add reverse charge here if exists
228
228
  if reverse_charge:
229
- [item.update({"reverseChargeSentence": reverse_charge}) for item in line_items]
229
+ [
230
+ item.update({"reverseChargeSentence": reverse_charge})
231
+ for item in line_items
232
+ if item["itemCode"]["formattedValue"] != "CDU"
233
+ ]
230
234
  return line_items
231
235
 
232
236