kodexa 7.0.7437070809__py3-none-any.whl → 7.0.7437125198__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 +27 -0
- {kodexa-7.0.7437070809.dist-info → kodexa-7.0.7437125198.dist-info}/METADATA +1 -1
- {kodexa-7.0.7437070809.dist-info → kodexa-7.0.7437125198.dist-info}/RECORD +5 -5
- {kodexa-7.0.7437070809.dist-info → kodexa-7.0.7437125198.dist-info}/LICENSE +0 -0
- {kodexa-7.0.7437070809.dist-info → kodexa-7.0.7437125198.dist-info}/WHEEL +0 -0
kodexa/model/objects.py
CHANGED
@@ -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,25 @@ 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, guidance_tags=None):
|
5213
|
+
if guidance_tags is None:
|
5214
|
+
guidance_tags = {}
|
5215
|
+
for taxon in self.taxons:
|
5216
|
+
new_tags = []
|
5217
|
+
for example in taxon.examples:
|
5218
|
+
new_tags.append(GuidanceTagResult(
|
5219
|
+
value=example.value, line_uuids=example.line_uuid
|
5220
|
+
))
|
5221
|
+
guidance_tags[taxon.path] = new_tags
|
5222
|
+
if len(taxon.children) > 0:
|
5223
|
+
self.build_guidance_tags(taxon.children, guidance_tags)
|
5224
|
+
|
5225
|
+
return guidance_tags
|
5226
|
+
|
5200
5227
|
|
5201
5228
|
class RuleSet(ExtensionPackProvided):
|
5202
5229
|
"""
|
@@ -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=kUz4EBXdnIwanYW_RPuRMS3U-lIMVkoPaFPtVB4kGKE,168735
|
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.7437125198.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
38
|
+
kodexa-7.0.7437125198.dist-info/METADATA,sha256=fwOMIw7iXN5mEMbI2Vf8ZTZFwNEuM_DY2vdcbRzz890,4067
|
39
|
+
kodexa-7.0.7437125198.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
40
|
+
kodexa-7.0.7437125198.dist-info/RECORD,,
|
File without changes
|
File without changes
|