ripple-down-rules 0.0.11__py3-none-any.whl → 0.0.12__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.
- ripple_down_rules/rdr.py +3 -4
- {ripple_down_rules-0.0.11.dist-info → ripple_down_rules-0.0.12.dist-info}/METADATA +1 -1
- {ripple_down_rules-0.0.11.dist-info → ripple_down_rules-0.0.12.dist-info}/RECORD +6 -6
- {ripple_down_rules-0.0.11.dist-info → ripple_down_rules-0.0.12.dist-info}/WHEEL +0 -0
- {ripple_down_rules-0.0.11.dist-info → ripple_down_rules-0.0.12.dist-info}/licenses/LICENSE +0 -0
- {ripple_down_rules-0.0.11.dist-info → ripple_down_rules-0.0.12.dist-info}/top_level.txt +0 -0
ripple_down_rules/rdr.py
CHANGED
@@ -199,7 +199,7 @@ class RDRWithCodeWriter(RDR, ABC):
|
|
199
199
|
"""
|
200
200
|
func_def = f"def classify(case: {self.case_type.__name__}) -> {self._get_conclusion_type_hint()}:\n"
|
201
201
|
with open(file_path + f"/{self.generated_python_file_name}.py", "w") as f:
|
202
|
-
f.write(self._get_imports())
|
202
|
+
f.write(self._get_imports() + "\n\n")
|
203
203
|
f.write(func_def)
|
204
204
|
f.write(f"{' '*4}if not isinstance(case, Case):\n"
|
205
205
|
f"{' '*4} case = create_case(case, recursion_idx=3)\n""")
|
@@ -222,7 +222,6 @@ class RDRWithCodeWriter(RDR, ABC):
|
|
222
222
|
if self.conclusion_type.__module__ != "builtins":
|
223
223
|
imports += f"from {self.conclusion_type.__module__} import {self.conclusion_type.__name__}\n"
|
224
224
|
imports += "from ripple_down_rules.datastructures import Case, create_case\n"
|
225
|
-
imports += "\n\n"
|
226
225
|
return imports
|
227
226
|
|
228
227
|
def get_rdr_classifier_from_python_file(self, package_name) -> Callable[[Any], Any]:
|
@@ -452,8 +451,8 @@ class MultiClassRDR(RDRWithCodeWriter):
|
|
452
451
|
return f"Set[{self.conclusion_type.__name__}]"
|
453
452
|
|
454
453
|
def _get_imports(self) -> str:
|
455
|
-
imports = super()._get_imports()
|
456
|
-
imports += "
|
454
|
+
imports = super()._get_imports()
|
455
|
+
imports += "from typing_extensions import Set\n"
|
457
456
|
return imports
|
458
457
|
|
459
458
|
def update_start_rule(self, case: Union[Case, SQLTable], target: Any, expert: Expert):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.12
|
4
4
|
Summary: Implements the various versions of Ripple Down Rules (RDR) for knowledge representation and reasoning.
|
5
5
|
Author-email: Abdelrhman Bassiouny <abassiou@uni-bremen.de>
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
@@ -3,7 +3,7 @@ ripple_down_rules/datasets.py,sha256=qYX7IF7ACm0VRbaKfEgQ32j0YbUUyt2GfGU5Lo42CqI
|
|
3
3
|
ripple_down_rules/experts.py,sha256=wg1uY0ox9dUMR4s1RdGjzpX1_WUqnCa060r1U9lrKYI,11214
|
4
4
|
ripple_down_rules/failures.py,sha256=E6ajDUsw3Blom8eVLbA7d_Qnov2conhtZ0UmpQ9ZtSE,302
|
5
5
|
ripple_down_rules/prompt.py,sha256=QAmxg4ssrGUAlK7lbyKw2nuRczTZColpjc9uMC1ts3I,4210
|
6
|
-
ripple_down_rules/rdr.py,sha256=
|
6
|
+
ripple_down_rules/rdr.py,sha256=pczC9h5jgT810U1QYGnavqUzbbdRMGqJ9DBnyeGZxGE,37443
|
7
7
|
ripple_down_rules/rules.py,sha256=PaQMPhMZFlwQnx9Iz4TFonldsSFX8fz4-SKxtAMulbA,13080
|
8
8
|
ripple_down_rules/utils.py,sha256=pmjIPjF9wq6dmCHCoUKFRsJmSaI0b-hRLn375WHgWgQ,18010
|
9
9
|
ripple_down_rules/datastructures/__init__.py,sha256=zpmiYm4WkwNHaGdTIfacS7llN5d2xyU6U-saH_TpydI,103
|
@@ -11,8 +11,8 @@ ripple_down_rules/datastructures/callable_expression.py,sha256=TN6bi4VYjyLlSLTEA
|
|
11
11
|
ripple_down_rules/datastructures/case.py,sha256=UYHz-Ag7TjwP9MRQuUTVH0nmph6ddutTSZMEXGFkxf4,13676
|
12
12
|
ripple_down_rules/datastructures/dataclasses.py,sha256=EVQ1jBKW7K7q7_JNgikHX9fm3EmQQKA74sNjEQ4rXn8,2449
|
13
13
|
ripple_down_rules/datastructures/enums.py,sha256=l0Eu-TeJ6qB2XHoJycXmUgLw-3yUebQ8SsEbW8bBZdM,4543
|
14
|
-
ripple_down_rules-0.0.
|
15
|
-
ripple_down_rules-0.0.
|
16
|
-
ripple_down_rules-0.0.
|
17
|
-
ripple_down_rules-0.0.
|
18
|
-
ripple_down_rules-0.0.
|
14
|
+
ripple_down_rules-0.0.12.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
15
|
+
ripple_down_rules-0.0.12.dist-info/METADATA,sha256=7h-kRihJGfF19iAvIZJa_iy7esfmmP982yO_AsYeXFo,42519
|
16
|
+
ripple_down_rules-0.0.12.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
17
|
+
ripple_down_rules-0.0.12.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
|
18
|
+
ripple_down_rules-0.0.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|