kodexa 7.4.413039380629__tar.gz → 7.4.413041815779__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/PKG-INFO +1 -1
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/dataclasses/__init__.py +14 -4
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/pyproject.toml +1 -1
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/LICENSE +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/README.md +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/base.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/entities/product_group.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/model.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/objects.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/persistence.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/utils.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/platform/client.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/core.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/steps/common.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/training/__init__.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/utils/__init__.py +0 -0
@@ -73,7 +73,11 @@ class LLMDataAttribute(BaseModel):
|
|
73
73
|
def to_dict(self, taxonomy: Taxonomy) -> dict:
|
74
74
|
"""Convert attribute to JSON with normalized value"""
|
75
75
|
|
76
|
-
|
76
|
+
target_taxon = taxonomy.get_taxon_by_path(self.taxon_path)
|
77
|
+
if target_taxon is None:
|
78
|
+
return {}
|
79
|
+
|
80
|
+
taxon_external_name = target_taxon.external_name
|
77
81
|
return {
|
78
82
|
taxon_external_name: self.normalized_text if self.normalized_text else self.value
|
79
83
|
}
|
@@ -167,12 +171,18 @@ class LLMDataObject(BaseModel):
|
|
167
171
|
result = {}
|
168
172
|
for field in self.__fields__:
|
169
173
|
value = getattr(self, field)
|
170
|
-
|
171
|
-
|
174
|
+
|
175
|
+
if isinstance(value, list) and len(value) > 0:
|
176
|
+
|
177
|
+
target_taxon = taxonomy.get_taxon_by_path(value[0].taxon_path)
|
178
|
+
if target_taxon is not None:
|
179
|
+
result[target_taxon.external_name] = [item.to_dict(taxonomy) for item in value if isinstance(item, (LLMDataObject, LLMDataAttribute))]
|
172
180
|
elif isinstance(value, LLMDataAttribute):
|
173
181
|
result.update(value.to_dict(taxonomy))
|
174
182
|
elif isinstance(value, LLMDataObject):
|
175
|
-
|
183
|
+
target_taxon = taxonomy.get_taxon_by_path(value.taxon_path)
|
184
|
+
if target_taxon is not None:
|
185
|
+
result[target_taxon.external_name] = value.to_dict(taxonomy)
|
176
186
|
return result
|
177
187
|
|
178
188
|
def to_review(self, page_number=None):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.4.
|
3
|
+
version = "7.4.413041815779"
|
4
4
|
description = "Python SDK for the Kodexa Platform"
|
5
5
|
authors = ["Austin Redenbaugh <austin@kodexa.com>", "Philip Dodds <philip@kodexa.com>", "Romar Cablao <rcablao@kodexa.com>", "Amadea Paula Dodds <amadeapaula@kodexa.com>"]
|
6
6
|
readme = "README.md"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/dataclasses/templates/llm_data_class.j2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.413039380629 → kodexa-7.4.413041815779}/kodexa/model/entities/product_subscription.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|