kodexa 7.4.415054063273__py3-none-any.whl → 7.4.415277494319__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.
@@ -318,9 +318,27 @@ class LLMDataObject(BaseModel):
318
318
  tag_uuid = str(uuid.uuid4())
319
319
  for node in nodes_to_label:
320
320
  if node:
321
+ confidence = -1 if value.value_path == 'DERIVED' else 1
322
+
323
+ textract_confidence_score_feature = node.get_feature(
324
+ "textract", "confidence"
325
+ )
326
+ if textract_confidence_score_feature is not None:
327
+ textract_confidence_value = (
328
+ textract_confidence_score_feature.value
329
+ )
330
+
331
+ if (
332
+ textract_confidence_value
333
+ and len(textract_confidence_value) > 0
334
+ ):
335
+ confidence = textract_confidence_value[0]
336
+ confidence = confidence / 100
337
+
338
+ logger.info(f"Confidence: {confidence}")
339
+
321
340
  if not node.has_tag(tag):
322
- try:
323
- confidence = -1 if value.value_path == 'DERIVED' else 1
341
+ try:
324
342
  node.tag(
325
343
  tag_to_apply=tag,
326
344
  value=value.normalized_text,
@@ -339,7 +357,7 @@ class LLMDataObject(BaseModel):
339
357
  new_tag = Tag(cell_index=self.cell_index,
340
358
  uuid=tag_uuid,
341
359
  value=value.normalized_text,
342
- confidence=-1,
360
+ confidence=confidence,
343
361
  group_uuid=self.group_uuid,
344
362
  parent_group_uuid=parent_group_uuid,
345
363
  owner_uri=f"assistant://{assistant.id}" if assistant else f"model://taxonomy-llm")
kodexa/model/objects.py CHANGED
@@ -3636,7 +3636,7 @@ class DataAttribute(BaseModel):
3636
3636
  alias="dataExceptions",
3637
3637
  description="A list of the data exceptions",
3638
3638
  )
3639
- tag: str
3639
+ tag: Optional[str] = None
3640
3640
  tag_uuid: Optional[str] = Field(None, alias="tagUuid")
3641
3641
  date_value: Optional[StandardDateTime] = Field(None, alias="dateValue")
3642
3642
  float_value: Optional[float] = Field(None, alias="floatValue")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kodexa
3
- Version: 7.4.415054063273
3
+ Version: 7.4.415277494319
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -3,7 +3,7 @@ kodexa/assistant/__init__.py,sha256=nlXm_YnV_50hgn0TIT2Fkc2fQ-86OjmctY_j8My9nc4,
3
3
  kodexa/assistant/assistant.py,sha256=5KFdbqFSLIZJyDRyZdpcfr448fT-CW4JhYu9A6B9DGY,14663
4
4
  kodexa/connectors/__init__.py,sha256=WF6G_MUeU32TlKSUKkpNoNX7dq8iBPliFMep4E8BmZc,328
5
5
  kodexa/connectors/connectors.py,sha256=FpUZDkSyHld2b9eYRuVOWzaFtuGoaRuPXXicJB7THbc,10413
6
- kodexa/dataclasses/__init__.py,sha256=CHMNsOamWA3gY5203gn8Ef5q1fgcczMtWKEvNjIOzPs,19486
6
+ kodexa/dataclasses/__init__.py,sha256=TuSMJAG9rMr5FHjBk66yFnlRmCMvrkBVnD7bORRmi38,20287
7
7
  kodexa/dataclasses/templates/llm_data_class.j2,sha256=YWjStW136chV_59JM3AYis3i-0jdrqDvLXsISUW9zDU,660
8
8
  kodexa/model/__init__.py,sha256=rtLXYJBxB-rnukhslN9rlqoB3--1H3253HyHGbD_Gc8,796
9
9
  kodexa/model/base.py,sha256=CaZK8nMhT1LdCpt4aLhebJGcorjq9qRID1FjnXnP14M,521
@@ -13,7 +13,7 @@ kodexa/model/entities/product.py,sha256=StUhTEeLXmc05cj6XnZppQfeJsqCPbX1jdhsysHH
13
13
  kodexa/model/entities/product_group.py,sha256=540fRGyUf34h1BzAN1DiWu6rGgvaj3xDFhZ2k-RvSFY,3617
14
14
  kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
15
15
  kodexa/model/model.py,sha256=q3zEm6pPOB-xPCKbOxmTMqLALzmQr2Ppam8knApoSEE,119645
16
- kodexa/model/objects.py,sha256=TodfJK9PVIopsdzx3pO-a-HdS7VJRiyGcWq7_Z7iqis,200470
16
+ kodexa/model/objects.py,sha256=ZxoGPKgSxl7XHqTg24vnQUGzArMTEnQc7hGEwwN7ERE,200487
17
17
  kodexa/model/persistence.py,sha256=jUgQ8xwsAFIoZ_bEynxCDEWhUII42eN0e0Mum0dkQPg,72043
18
18
  kodexa/model/utils.py,sha256=YEG3f8YzBil06D0P3_dfx2S9GnHREzyrjnlWwQ7oPlU,3038
19
19
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
@@ -45,7 +45,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
45
45
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
46
46
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
48
- kodexa-7.4.415054063273.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
49
- kodexa-7.4.415054063273.dist-info/METADATA,sha256=KjcnjzP0szJ8aHEfEzCoGwNpMQeltCDB5Y73j5X4iNk,2916
50
- kodexa-7.4.415054063273.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
51
- kodexa-7.4.415054063273.dist-info/RECORD,,
48
+ kodexa-7.4.415277494319.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
49
+ kodexa-7.4.415277494319.dist-info/METADATA,sha256=qIlyCdmayC9XQR8xjR2oEa5bYvgOWKVeIXK09Q93T3Y,2916
50
+ kodexa-7.4.415277494319.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
51
+ kodexa-7.4.415277494319.dist-info/RECORD,,