kodexa 7.0.7436852193__py3-none-any.whl → 7.0.7437107295__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.
- kodexa/model/objects.py +26 -1
- {kodexa-7.0.7436852193.dist-info → kodexa-7.0.7437107295.dist-info}/METADATA +1 -1
- {kodexa-7.0.7436852193.dist-info → kodexa-7.0.7437107295.dist-info}/RECORD +5 -5
- {kodexa-7.0.7436852193.dist-info → kodexa-7.0.7437107295.dist-info}/LICENSE +0 -0
- {kodexa-7.0.7436852193.dist-info → kodexa-7.0.7437107295.dist-info}/WHEEL +0 -0
kodexa/model/objects.py
CHANGED
@@ -2592,7 +2592,7 @@ class Taxon(BaseModel):
|
|
2592
2592
|
alias="semanticDefinition",
|
2593
2593
|
description="The semantic definition of the taxon",
|
2594
2594
|
)
|
2595
|
-
examples: Optional[List[
|
2595
|
+
examples: Optional[List[GuidanceTagResult]] = Field(
|
2596
2596
|
None,
|
2597
2597
|
description="A list of examples of the taxon values, used to understand the taxon",
|
2598
2598
|
)
|
@@ -2602,6 +2602,14 @@ class Taxon(BaseModel):
|
|
2602
2602
|
description="A list of synonyms of the taxon values, used to understand the taxon",
|
2603
2603
|
)
|
2604
2604
|
|
2605
|
+
def update_path(self, parent_path=None):
|
2606
|
+
if parent_path is None:
|
2607
|
+
parent_path = ""
|
2608
|
+
self.path = parent_path + self.name
|
2609
|
+
if self.children is not None:
|
2610
|
+
for child in self.children:
|
2611
|
+
child.update_path(self.path + "/")
|
2612
|
+
|
2605
2613
|
|
2606
2614
|
class ContentObject(BaseModel):
|
2607
2615
|
"""
|
@@ -5197,6 +5205,23 @@ class Taxonomy(ExtensionPackProvided):
|
|
5197
5205
|
description="The total number of taxons in the taxonomy",
|
5198
5206
|
)
|
5199
5207
|
|
5208
|
+
def update_paths(self):
|
5209
|
+
for taxon in self.taxons:
|
5210
|
+
taxon.update_path()
|
5211
|
+
|
5212
|
+
def build_guidance_tags(self, taxons: List[Taxon], guidance_tags: dict[str, List[GuidanceTagResult]]):
|
5213
|
+
for taxon in taxons:
|
5214
|
+
new_tags = []
|
5215
|
+
for example in taxon.examples:
|
5216
|
+
new_tags.append(GuidanceTagResult(
|
5217
|
+
value=example.value, line_uuids=example.line_uuid
|
5218
|
+
))
|
5219
|
+
guidance_tags[taxon.path] = new_tags
|
5220
|
+
if len(taxon.children) > 0:
|
5221
|
+
self.build_guidance_tags(taxon.children, guidance_tags)
|
5222
|
+
|
5223
|
+
return guidance_tags
|
5224
|
+
|
5200
5225
|
|
5201
5226
|
class RuleSet(ExtensionPackProvided):
|
5202
5227
|
"""
|
@@ -6,7 +6,7 @@ kodexa/connectors/connectors.py,sha256=FpUZDkSyHld2b9eYRuVOWzaFtuGoaRuPXXicJB7TH
|
|
6
6
|
kodexa/model/__init__.py,sha256=rtLXYJBxB-rnukhslN9rlqoB3--1H3253HyHGbD_Gc8,796
|
7
7
|
kodexa/model/base.py,sha256=CaZK8nMhT1LdCpt4aLhebJGcorjq9qRID1FjnXnP14M,521
|
8
8
|
kodexa/model/model.py,sha256=GIHdQkFhE2xu8oLBgSXhZ_bvECcnS6_qrqwCtSbqnZI,114148
|
9
|
-
kodexa/model/objects.py,sha256=
|
9
|
+
kodexa/model/objects.py,sha256=xtAf6LZfeOEVBlsbsO7P4Pj7GLaXEaNNIwByymjYp9s,168717
|
10
10
|
kodexa/model/persistence.py,sha256=TajtXfHp7dL85R5ui9A2h6rLMecDUr6OYZHVgm8CVJw,57360
|
11
11
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
12
12
|
kodexa/pipeline/pipeline.py,sha256=cIRFOoJkguIYgNzx6FYrODdBpcY25CM_SULsqSsHeXE,24323
|
@@ -34,7 +34,7 @@ kodexa/testing/test_components.py,sha256=4BnzCCOA5v__82mB1TIBPHfNIGJbkZz9PiTZiNK
|
|
34
34
|
kodexa/testing/test_utils.py,sha256=IWLKBvMHATzrsoO9PQFGcwoGcuZykhAS3QRddfzb_XE,14043
|
35
35
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
36
36
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
-
kodexa-7.0.
|
38
|
-
kodexa-7.0.
|
39
|
-
kodexa-7.0.
|
40
|
-
kodexa-7.0.
|
37
|
+
kodexa-7.0.7437107295.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
38
|
+
kodexa-7.0.7437107295.dist-info/METADATA,sha256=g50vCdefLxqbJVqmecpoaR9Lnp3xM77kSgZFyJa3Gcg,4067
|
39
|
+
kodexa-7.0.7437107295.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
40
|
+
kodexa-7.0.7437107295.dist-info/RECORD,,
|
File without changes
|
File without changes
|