kodexa 7.4.415054195687__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")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kodexa
3
- Version: 7.4.415054195687
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
@@ -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.415054195687.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
49
- kodexa-7.4.415054195687.dist-info/METADATA,sha256=cGDYEHLSuNus18safzpEQ2nX1zD7eoaOycgDJ48_nRM,2916
50
- kodexa-7.4.415054195687.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
51
- kodexa-7.4.415054195687.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,,