data-science-document-ai 1.61.0__py3-none-any.whl → 1.61.1__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.61.0.dist-info → data_science_document_ai-1.61.1.dist-info}/METADATA +1 -1
- {data_science_document_ai-1.61.0.dist-info → data_science_document_ai-1.61.1.dist-info}/RECORD +16 -16
- src/constants.py +2 -2
- src/postprocessing/common.py +17 -10
- src/prompts/library/bookingConfirmation/evergreen/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/maersk/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/maersk/prompt.txt +1 -1
- src/prompts/library/bookingConfirmation/msc/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/msc/prompt.txt +1 -1
- src/prompts/library/bookingConfirmation/oocl/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/oocl/prompt.txt +1 -1
- src/prompts/library/bookingConfirmation/other/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/yangming/placeholders.json +2 -2
- src/prompts/library/bookingConfirmation/yangming/prompt.txt +1 -1
- {data_science_document_ai-1.61.0.dist-info → data_science_document_ai-1.61.1.dist-info}/WHEEL +0 -0
{data_science_document_ai-1.61.0.dist-info → data_science_document_ai-1.61.1.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
src/constants.py,sha256=
|
|
1
|
+
src/constants.py,sha256=JjSdPW8wbo_sI6NgKHZxVsMBaiWAJs4o018fmOfygg4,3537
|
|
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=ZewXqbyiftzmVAaS08BoNp5trY6WXx3HMWDfPwmKfaI,256
|
|
@@ -7,26 +7,26 @@ src/io.py,sha256=rYjXVLlriEacw1uNuPIYhg12bXNu48Qs9GYMY2YcVTE,5563
|
|
|
7
7
|
src/llm.py,sha256=a7UYA4ITUNjzct_2fHgM-bma_XWc28VC0FV71g9tnUI,7137
|
|
8
8
|
src/log_setup.py,sha256=RhHnpXqcl-ii4EJzRt47CF2R-Q3YPF68tepg_Kg7tkw,2895
|
|
9
9
|
src/pdf_processing.py,sha256=Fx-Glb9niEUU3WUCrBZ02ZYV-E2vWoUM0ifN7-0A1Q4,19961
|
|
10
|
-
src/postprocessing/common.py,sha256=
|
|
10
|
+
src/postprocessing/common.py,sha256=uFaJYpctS4vr-0Z3InRyfRZcEar0UWpcTxdB_TDCJ5E,26671
|
|
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=WuaTQK5D09dV_QNrh29ZoKX9IvQn2Ub-WnAMyRjCsvI,14240
|
|
14
14
|
src/prompts/library/arrivalNotice/other/placeholders.json,sha256=1vzly1amgyKt3jr2JJQbb24kNZsnI289iduvoUo5dJU,3061
|
|
15
15
|
src/prompts/library/arrivalNotice/other/prompt.txt,sha256=QNuU-BvMA8VbdupVNapad4O3WmCotH5cKNxImRMbKDk,2906
|
|
16
|
-
src/prompts/library/bookingConfirmation/evergreen/placeholders.json,sha256=
|
|
16
|
+
src/prompts/library/bookingConfirmation/evergreen/placeholders.json,sha256=49mmxxjExniMqLkT37zd5q8ILCLPGsfugKOMkR926kk,5854
|
|
17
17
|
src/prompts/library/bookingConfirmation/evergreen/prompt.txt,sha256=dhcqzzTJ9ycMCc5fFznVxW9PwIYMwwxxJ344IIF0vNo,5020
|
|
18
|
-
src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json,sha256=
|
|
18
|
+
src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json,sha256=WpooLsv-1ak4-_2HBmAKjyOCuYa3QYSzZg9AfyZKZrc,6137
|
|
19
19
|
src/prompts/library/bookingConfirmation/hapag-lloyd/prompt.txt,sha256=UDUJC6zKujOc9mAoAJLwnxbsXVrTrMFD4alziwqf0Jc,5196
|
|
20
|
-
src/prompts/library/bookingConfirmation/maersk/placeholders.json,sha256=
|
|
21
|
-
src/prompts/library/bookingConfirmation/maersk/prompt.txt,sha256=
|
|
22
|
-
src/prompts/library/bookingConfirmation/msc/placeholders.json,sha256=
|
|
23
|
-
src/prompts/library/bookingConfirmation/msc/prompt.txt,sha256=
|
|
24
|
-
src/prompts/library/bookingConfirmation/oocl/placeholders.json,sha256=
|
|
25
|
-
src/prompts/library/bookingConfirmation/oocl/prompt.txt,sha256=
|
|
26
|
-
src/prompts/library/bookingConfirmation/other/placeholders.json,sha256=
|
|
20
|
+
src/prompts/library/bookingConfirmation/maersk/placeholders.json,sha256=JaOES8YCMudqRujHjNq4r81JHdz1geYRJ5clciySmvs,6356
|
|
21
|
+
src/prompts/library/bookingConfirmation/maersk/prompt.txt,sha256=SyBsu0qjXhRzsPLgNfaftqWAtKo8eoBwsfU9XOZ55N4,5684
|
|
22
|
+
src/prompts/library/bookingConfirmation/msc/placeholders.json,sha256=XAg1JcXiehzCgjWCCIS0F5zrVVlbOpQsjpPGG20ozrs,6086
|
|
23
|
+
src/prompts/library/bookingConfirmation/msc/prompt.txt,sha256=8eiuALucSu9OVsHJNKQc07Cdggv95zyNDZAeSbzCwiI,5878
|
|
24
|
+
src/prompts/library/bookingConfirmation/oocl/placeholders.json,sha256=9riPyLadreieLrz3Zb4Wg5CwwqF8C244UJy8UlNe01k,6356
|
|
25
|
+
src/prompts/library/bookingConfirmation/oocl/prompt.txt,sha256=sAqtzDNwzL45-FCxtFlaa3WQt9gug2LwRaEHZm5WI6U,4498
|
|
26
|
+
src/prompts/library/bookingConfirmation/other/placeholders.json,sha256=Epcgf8r9GHZ9Tn3iBtbLtmqrDfbxbwjyHs49FSlSA_0,7452
|
|
27
27
|
src/prompts/library/bookingConfirmation/other/prompt.txt,sha256=EMmKLDX7ir96KcU7Ca12B7k5-crdioU-Sw3VebX33HY,7867
|
|
28
|
-
src/prompts/library/bookingConfirmation/yangming/placeholders.json,sha256=
|
|
29
|
-
src/prompts/library/bookingConfirmation/yangming/prompt.txt,sha256=
|
|
28
|
+
src/prompts/library/bookingConfirmation/yangming/placeholders.json,sha256=VWx3nLRnMPtRjZZ9TSnjeLckbkGoCDY4pPPsMaIADXI,6246
|
|
29
|
+
src/prompts/library/bookingConfirmation/yangming/prompt.txt,sha256=OG33AZ0DSLhWLFgpO5WCx1H1RumVmT7f_ln-QrBJsd8,4601
|
|
30
30
|
src/prompts/library/bundeskasse/other/placeholders.json,sha256=6VvXUluc_shZNg8jb40JiaDjovNhuoEHpNSfsTzoRs4,4456
|
|
31
31
|
src/prompts/library/bundeskasse/other/prompt.txt,sha256=prmk2BIGlSZ_1vhi5WcBUm91D5zGJJT3fbbLEQ3YeTk,3487
|
|
32
32
|
src/prompts/library/commercialInvoice/other/placeholders.json,sha256=zUK2mg9MnHiEQRYF6VgTiUiq68WGy5f7_4qL63CWyR0,4700
|
|
@@ -55,6 +55,6 @@ src/prompts/prompt_library.py,sha256=VJWHeXN-s501C2GiidIIvQQuZdU6T1R27hE2dKBiI40
|
|
|
55
55
|
src/setup.py,sha256=8-vZWjC8Iwa3xxdk3iR4412VCjtNtgzVqkXcFon7UBE,7309
|
|
56
56
|
src/tms.py,sha256=UXbIo1QE--hIX6NZi5Qyp2R_CP338syrY9pCTPrfgnE,1741
|
|
57
57
|
src/utils.py,sha256=Ow5_Jals88o8mbZ1BoHfZpHZoCfig_UQb5aalH-mpWE,17278
|
|
58
|
-
data_science_document_ai-1.61.
|
|
59
|
-
data_science_document_ai-1.61.
|
|
60
|
-
data_science_document_ai-1.61.
|
|
58
|
+
data_science_document_ai-1.61.1.dist-info/METADATA,sha256=knwcr94ybymLp_FaGl4Pu9uRJj-gVWh2lrDFhiPEddg,2152
|
|
59
|
+
data_science_document_ai-1.61.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
60
|
+
data_science_document_ai-1.61.1.dist-info/RECORD,,
|
src/constants.py
CHANGED
|
@@ -93,8 +93,8 @@ formatting_rules = {
|
|
|
93
93
|
"bookingConfirmation": {
|
|
94
94
|
"pickUpDepotCode": "depot",
|
|
95
95
|
"dropOffDepotCode": "depot",
|
|
96
|
-
"
|
|
97
|
-
"
|
|
96
|
+
"gateInTerminal": "terminal",
|
|
97
|
+
"pickUpTerminal": "terminal",
|
|
98
98
|
},
|
|
99
99
|
"deliveryOrder": {"pickUpTerminal": "terminal", "EmptyContainerDepot": "depot"},
|
|
100
100
|
}
|
src/postprocessing/common.py
CHANGED
|
@@ -723,16 +723,23 @@ async def format_all_entities(result, document_type_code, params, mime_type):
|
|
|
723
723
|
if document_type_code in ["partnerInvoice", "bundeskasse"]:
|
|
724
724
|
await process_partner_invoice(params, aggregated_data, document_type_code)
|
|
725
725
|
|
|
726
|
-
#
|
|
727
|
-
|
|
728
|
-
if "
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
726
|
+
# Post process terminals with code and name
|
|
727
|
+
for key in list(aggregated_data):
|
|
728
|
+
if "terminal" not in key.lower():
|
|
729
|
+
continue
|
|
730
|
+
|
|
731
|
+
entity = aggregated_data.pop(key)
|
|
732
|
+
formatted = entity.get("formattedValue", {})
|
|
733
|
+
|
|
734
|
+
if formatted is None:
|
|
735
|
+
aggregated_data[key] = {**entity}
|
|
736
|
+
continue
|
|
737
|
+
|
|
738
|
+
aggregated_data[key] = {**entity, "formattedValue": formatted.get("id")}
|
|
739
|
+
aggregated_data[f"{key}Code"] = {
|
|
740
|
+
**entity,
|
|
741
|
+
"formattedValue": formatted.get("code"),
|
|
742
|
+
}
|
|
736
743
|
|
|
737
744
|
logger.info("Data Extraction completed successfully")
|
|
738
745
|
return aggregated_data
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN TO or Export terminal name."
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be mentioned as Contract No., Contract Reference, or Quotation No. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., Export terminal delivery address, Export terminal location, or Export terminal name."
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., Export terminal delivery address, Export terminal location, or Return Equip Delivery Terminal."
|
|
@@ -16,7 +16,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
16
16
|
<INSTRUCTIONS>
|
|
17
17
|
- bookingNumber: A unique identifier for the booking.
|
|
18
18
|
|
|
19
|
-
-
|
|
19
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
20
20
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
21
21
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
22
22
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be found as Service Contract/Rate Reff. No. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It can be found as GATE IN AT TERMINAL/DEPOT"
|
|
@@ -14,7 +14,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
14
14
|
<CONTEXT>
|
|
15
15
|
|
|
16
16
|
<INSTRUCTIONS>
|
|
17
|
-
-
|
|
17
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
18
18
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
19
19
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
20
20
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be referred as Rate Agreement Number or Contract No.. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN LOCATION"
|
|
@@ -19,7 +19,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
19
19
|
|
|
20
20
|
- bookingNumber: Extract the booking number. This information can be found at the top section of the document".
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It can be called as FULL RETURN LOCATION. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
23
23
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
24
24
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
25
25
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It can be found as Gate In At Terminal, Gate in Terminal, Full Return To Terminal, Full Return Location, Cargo Delivery At, Delivery Terminal, Full Return CY, eyc.."
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It is mentioned as Delivery Terminal."
|
|
@@ -17,7 +17,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
17
17
|
- Populate fields as defined in the response schema.
|
|
18
18
|
- Use the data field description to understand the context of the data.
|
|
19
19
|
|
|
20
|
-
-
|
|
20
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It is mentioned as Delivery Terminal. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
21
21
|
- cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be found at Cargo Cut Off or FCL delivery cut-off.
|
|
22
22
|
|
|
23
23
|
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
{data_science_document_ai-1.61.0.dist-info → data_science_document_ai-1.61.1.dist-info}/WHEEL
RENAMED
|
File without changes
|