fuzzy-dl-owl2 1.0.1__tar.gz → 1.0.3__tar.gz
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.
- fuzzy_dl_owl2-1.0.1/README.md → fuzzy_dl_owl2-1.0.3/PKG-INFO +69 -6
- fuzzy_dl_owl2-1.0.1/PKG-INFO → fuzzy_dl_owl2-1.0.3/README.md +44 -28
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/approximation_concept.py +35 -10
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/fuzzy_number/triangular_fuzzy_number.py +2 -1
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/trapezoidal_concrete_concept.py +1 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/implies_concept.py +14 -11
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/operator_concept.py +10 -6
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/value_concept.py +1 -1
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concrete_feature.py +7 -1
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/feature_function.py +16 -2
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/fuzzydl_to_owl2.py +1 -1
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/knowledge_base.py +494 -358
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/expression.py +4 -2
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/milp_helper.py +3 -2
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/variable.py +3 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/modifier/triangular_modifier.py +1 -1
- fuzzy_dl_owl2-1.0.3/fuzzy_dl_owl2/fuzzydl/parser/dl_parser.py +2284 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/defuzzify/mom_defuzzify_query.py +14 -7
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/min/min_subsumes_query.py +2 -2
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/util/config_reader.py +0 -6
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/util/constants.py +10 -9
- fuzzy_dl_owl2-1.0.3/fuzzy_dl_owl2/fuzzydl/util/utils.py +79 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/fuzzyowl2.py +1 -1
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/pyproject.toml +7 -4
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzydl/fuzzydl_to_owl2_java.py +0 -953
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzydl/parser/ParserConstants.py +0 -406
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzydl/parser/dl_parser.py +0 -2029
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzydl/parser/ebnf.lark +0 -290
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzydl/parser/larkx.py +0 -70
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzydl/util/utils.py +0 -38
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzyowl2/fuzzyowl2_java.py +0 -1409
- fuzzy_dl_owl2-1.0.1/fuzzy_dl_owl2/fuzzyowl2/fuzzyowl2_to_fuzzydl_java.py +0 -956
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/LICENSE +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/assertion/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/assertion/assertion.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/assertion/atomic_assertion.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/all_some_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/atomic_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/choquet_integral.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/crisp_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/fuzzy_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/fuzzy_number/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/left_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/linear_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/modified_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/right_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/concrete/triangular_concrete_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/ext_threshold_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/has_value_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/has_concept_interface.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/has_concepts_interface.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/has_role_concept_interface.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/has_role_interface.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/has_value_interface.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/interface/has_weighted_concepts_interface.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/modified/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/modified/linearly_modified_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/modified/modified_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/modified/triangularly_modified_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/negated_nominal.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/owa_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/qowa_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/quasi_sugeno_integral.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/self_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/string_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/sugeno_integral.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/threshold_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/truth_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/weighted_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/weighted_max_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/weighted_min_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/weighted_sum_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/weighted_sum_zero_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept_equivalence.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/degree/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/degree/degree.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/degree/degree_expression.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/degree/degree_numeric.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/degree/degree_variable.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/domain_axiom.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/exception/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/exception/fuzzy_ontology_exception.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/exception/inconsistent_ontology_exception.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/general_concept_inclusion.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/individual/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/individual/created_individual.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/individual/individual.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/individual/representative_individual.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/label.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/inequation.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/show_variables_helper.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/solution.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/milp/term.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/modifier/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/modifier/linear_modifier.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/modifier/modifier.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/parser/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/primitive_concept_definition.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/all_instances_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/bnp_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/defuzzify/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/defuzzify/defuzzify_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/defuzzify/lom_defuzzify_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/defuzzify/som_defuzzify_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/instance_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/kb_satisfiable_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/max/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/max/max_instance_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/max/max_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/max/max_related_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/max/max_satisfiable_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/max/max_subsumes_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/min/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/min/min_instance_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/min/min_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/min/min_related_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/min/min_satisfiable_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/related_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/satisfiable_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/query/subsumption_query.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/range_axiom.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/relation.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/restriction/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/restriction/has_value_restriction.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/restriction/restriction.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/role_parent_with_degree.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/util/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/util/util.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/fuzzyowl2_to_fuzzydl.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/choquet_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/concept_definition.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/fuzzy_datatype.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/fuzzy_modifier.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/fuzzy_nominal_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/fuzzy_property.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/left_shoulder_function.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/linear_function.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/linear_modifier.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/modified_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/modified_function.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/modified_property.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/owa_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/property_definition.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/qowa_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/quasi_sugeno_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/right_shoulder_function.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/sugeno_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/trapezoidal_function.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/triangular_function.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/triangular_modifer.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/weighted_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/weighted_max_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/weighted_min_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/weighted_sum_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/owl_types/weighted_sum_zero_concept.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/parser/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/parser/owl2_parser.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/util/__init__.py +0 -0
- {fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzyowl2/util/constants.py +0 -0
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: fuzzy-dl-owl2
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: A python porting of the Fuzzy Description Language (see https://www.umbertostraccia.it/cs/software/fuzzyDL/fuzzyDL.html) and the Fuzzy OWL 2 framework (see https://www.umbertostraccia.it/cs/software/FuzzyOWL/index.html).
|
|
5
|
+
License: CC-BY-SA-4.0
|
|
6
|
+
Author: Giuseppe Filippone
|
|
7
|
+
Author-email: filipponegiuseppe94@gmail.com
|
|
8
|
+
Requires-Python: >=3.11,<4.0
|
|
9
|
+
Classifier: License :: Other/Proprietary License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Dist: gurobipy (>=12.0.0,<13.0.0)
|
|
15
|
+
Requires-Dist: networkx (>=3.3,<4.0)
|
|
16
|
+
Requires-Dist: owlready2 (>=0.47,<0.48)
|
|
17
|
+
Requires-Dist: pyowl2 (>=1.0.0,<2.0.0)
|
|
18
|
+
Requires-Dist: pyparsing (>=3.2.3,<4.0.0)
|
|
19
|
+
Requires-Dist: rdflib (>=7.1.4,<8.0.0)
|
|
20
|
+
Requires-Dist: sortedcontainers (>=2.4.0,<3.0.0)
|
|
21
|
+
Requires-Dist: trycast (>=1.2.0,<2.0.0)
|
|
22
|
+
Project-URL: Repository, https://github.com/giuseppefilippone/fuzzy_dl_owl2
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
1
25
|
# Fuzzy DL OWL 2
|
|
2
26
|
A python porting of the Fuzzy Description Language (see https://www.umbertostraccia.it/cs/software/fuzzyDL/fuzzyDL.html) and the Fuzzy OWL 2 framework (see https://www.umbertostraccia.it/cs/software/FuzzyOWL/index.html).
|
|
3
27
|
|
|
@@ -17,7 +41,7 @@ Features:
|
|
|
17
41
|
# Installation
|
|
18
42
|
|
|
19
43
|
```python
|
|
20
|
-
pip install fuzzy-
|
|
44
|
+
pip install fuzzy-dl-owl2
|
|
21
45
|
```
|
|
22
46
|
|
|
23
47
|
⸻
|
|
@@ -32,6 +56,42 @@ Examples of supported Fuzzy Description Logic Constructs
|
|
|
32
56
|
|
|
33
57
|
⸻
|
|
34
58
|
|
|
59
|
+
# Directory dl-examples
|
|
60
|
+
|
|
61
|
+
The directory `dl-examples` contains a few examples of Knowledge Bases written using the Fuzzy Description Logic language.
|
|
62
|
+
|
|
63
|
+
⸻
|
|
64
|
+
|
|
65
|
+
# Configuration of the MILP solver
|
|
66
|
+
|
|
67
|
+
Since version 1.0.1 uses `Gurobi Optimizer` (see [gurobipy](https://support.gurobi.com/hc/en-us/articles/360044290292-How-do-I-install-Gurobi-for-Python)= for the Fuzzy DL reasoning, please create a GUROBI license to use this library.
|
|
68
|
+
|
|
69
|
+
For the configuration, create a `CONFIG.ini` file in the same directory used for the execution of the library.
|
|
70
|
+
Example of your execution directory:
|
|
71
|
+
```text
|
|
72
|
+
your_directory
|
|
73
|
+
├── CONFIG.ini
|
|
74
|
+
├── your_file.py
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The file `CONFIG.ini` is structured as follows:
|
|
78
|
+
```text
|
|
79
|
+
[DEFAULT]
|
|
80
|
+
debugPrint = False
|
|
81
|
+
relaxMilp = False
|
|
82
|
+
epsilon = 0.001
|
|
83
|
+
maxIndividuals = -1
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
| Configuration Variable | Description |
|
|
87
|
+
|----------------------|-----------------------------------|
|
|
88
|
+
| debugPrint | Enable/disable debugging |
|
|
89
|
+
| relaxMilp | Enable/disable MILP constraint relaxation. Important: The solution may be wrong by enabling this flag |
|
|
90
|
+
| epsilon | Define the precision of the solution. For instance, epsilon = 0.001 means that the solution will be calculated with an accuracy to the third decimal place |
|
|
91
|
+
| maxIndividuals | Define the maximal number of individuals to handle. The value -1 indicate that there is no maximum |
|
|
92
|
+
|
|
93
|
+
⸻
|
|
94
|
+
|
|
35
95
|
# Usage - Reasoning
|
|
36
96
|
|
|
37
97
|
## Knowledge base in example.fdl
|
|
@@ -81,9 +141,8 @@ fdl.translate_owl2ontology() # save example.fdl in the subdirectory "./results"
|
|
|
81
141
|
# Project Structure
|
|
82
142
|
|
|
83
143
|
```text
|
|
84
|
-
|
|
144
|
+
fuzzy_dl_owl2
|
|
85
145
|
├── __init__.py
|
|
86
|
-
├── app.py
|
|
87
146
|
├── fuzzydl
|
|
88
147
|
│ ├── __init__.py
|
|
89
148
|
│ ├── assertion
|
|
@@ -156,7 +215,6 @@ fuzzy_reasoner
|
|
|
156
215
|
│ │ ├── fuzzy_ontology_exception.py
|
|
157
216
|
│ │ └── inconsistent_ontology_exception.py
|
|
158
217
|
│ ├── feature_function.py
|
|
159
|
-
│ ├── fuzzydl_to_owl2_java.py
|
|
160
218
|
│ ├── fuzzydl_to_owl2.py
|
|
161
219
|
│ ├── general_concept_inclusion.py
|
|
162
220
|
│ ├── individual
|
|
@@ -232,8 +290,6 @@ fuzzy_reasoner
|
|
|
232
290
|
│ └── utils.py
|
|
233
291
|
└── fuzzyowl2
|
|
234
292
|
├── __init__.py
|
|
235
|
-
├── fuzzyowl2_java.py
|
|
236
|
-
├── fuzzyowl2_to_fuzzydl_java.py
|
|
237
293
|
├── fuzzyowl2_to_fuzzydl.py
|
|
238
294
|
├── fuzzyowl2.py
|
|
239
295
|
├── owl_types
|
|
@@ -269,9 +325,16 @@ fuzzy_reasoner
|
|
|
269
325
|
└── util
|
|
270
326
|
└── constants.py
|
|
271
327
|
```
|
|
328
|
+
⸻
|
|
329
|
+
|
|
330
|
+
# Test
|
|
331
|
+
|
|
332
|
+
The directory `test` contains the `unittest` files. In particular, the file `test_suite.py` contains all the test suite.
|
|
333
|
+
The directory `examples/TestSuite` contains all the knowledge bases used for the tests.
|
|
272
334
|
|
|
273
335
|
⸻
|
|
274
336
|
|
|
275
337
|
# License
|
|
276
338
|
|
|
277
339
|
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International.
|
|
340
|
+
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: fuzzy-dl-owl2
|
|
3
|
-
Version: 1.0.1
|
|
4
|
-
Summary:
|
|
5
|
-
License: CC-BY-SA-4.0
|
|
6
|
-
Author: Giuseppe Filippone
|
|
7
|
-
Author-email: filipponegiuseppe94@gmail.com
|
|
8
|
-
Requires-Python: >=3.11,<4.0
|
|
9
|
-
Classifier: License :: Other/Proprietary License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
-
Requires-Dist: gurobipy (>=12.0.0,<13.0.0)
|
|
15
|
-
Requires-Dist: owlready2 (>=0.47,<0.48)
|
|
16
|
-
Requires-Dist: pyowl2 (>=1.0.0,<2.0.0)
|
|
17
|
-
Requires-Dist: pyparsing (>=3.1.1,<4.0.0)
|
|
18
|
-
Requires-Dist: rdflib (>=7.1.1,<8.0.0)
|
|
19
|
-
Project-URL: Repository, https://github.com/giuseppefilippone/fuzzy_dl_owl2
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
|
|
22
1
|
# Fuzzy DL OWL 2
|
|
23
2
|
A python porting of the Fuzzy Description Language (see https://www.umbertostraccia.it/cs/software/fuzzyDL/fuzzyDL.html) and the Fuzzy OWL 2 framework (see https://www.umbertostraccia.it/cs/software/FuzzyOWL/index.html).
|
|
24
3
|
|
|
@@ -38,7 +17,7 @@ Features:
|
|
|
38
17
|
# Installation
|
|
39
18
|
|
|
40
19
|
```python
|
|
41
|
-
pip install fuzzy-
|
|
20
|
+
pip install fuzzy-dl-owl2
|
|
42
21
|
```
|
|
43
22
|
|
|
44
23
|
⸻
|
|
@@ -53,6 +32,42 @@ Examples of supported Fuzzy Description Logic Constructs
|
|
|
53
32
|
|
|
54
33
|
⸻
|
|
55
34
|
|
|
35
|
+
# Directory dl-examples
|
|
36
|
+
|
|
37
|
+
The directory `dl-examples` contains a few examples of Knowledge Bases written using the Fuzzy Description Logic language.
|
|
38
|
+
|
|
39
|
+
⸻
|
|
40
|
+
|
|
41
|
+
# Configuration of the MILP solver
|
|
42
|
+
|
|
43
|
+
Since version 1.0.1 uses `Gurobi Optimizer` (see [gurobipy](https://support.gurobi.com/hc/en-us/articles/360044290292-How-do-I-install-Gurobi-for-Python)= for the Fuzzy DL reasoning, please create a GUROBI license to use this library.
|
|
44
|
+
|
|
45
|
+
For the configuration, create a `CONFIG.ini` file in the same directory used for the execution of the library.
|
|
46
|
+
Example of your execution directory:
|
|
47
|
+
```text
|
|
48
|
+
your_directory
|
|
49
|
+
├── CONFIG.ini
|
|
50
|
+
├── your_file.py
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The file `CONFIG.ini` is structured as follows:
|
|
54
|
+
```text
|
|
55
|
+
[DEFAULT]
|
|
56
|
+
debugPrint = False
|
|
57
|
+
relaxMilp = False
|
|
58
|
+
epsilon = 0.001
|
|
59
|
+
maxIndividuals = -1
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
| Configuration Variable | Description |
|
|
63
|
+
|----------------------|-----------------------------------|
|
|
64
|
+
| debugPrint | Enable/disable debugging |
|
|
65
|
+
| relaxMilp | Enable/disable MILP constraint relaxation. Important: The solution may be wrong by enabling this flag |
|
|
66
|
+
| epsilon | Define the precision of the solution. For instance, epsilon = 0.001 means that the solution will be calculated with an accuracy to the third decimal place |
|
|
67
|
+
| maxIndividuals | Define the maximal number of individuals to handle. The value -1 indicate that there is no maximum |
|
|
68
|
+
|
|
69
|
+
⸻
|
|
70
|
+
|
|
56
71
|
# Usage - Reasoning
|
|
57
72
|
|
|
58
73
|
## Knowledge base in example.fdl
|
|
@@ -102,9 +117,8 @@ fdl.translate_owl2ontology() # save example.fdl in the subdirectory "./results"
|
|
|
102
117
|
# Project Structure
|
|
103
118
|
|
|
104
119
|
```text
|
|
105
|
-
|
|
120
|
+
fuzzy_dl_owl2
|
|
106
121
|
├── __init__.py
|
|
107
|
-
├── app.py
|
|
108
122
|
├── fuzzydl
|
|
109
123
|
│ ├── __init__.py
|
|
110
124
|
│ ├── assertion
|
|
@@ -177,7 +191,6 @@ fuzzy_reasoner
|
|
|
177
191
|
│ │ ├── fuzzy_ontology_exception.py
|
|
178
192
|
│ │ └── inconsistent_ontology_exception.py
|
|
179
193
|
│ ├── feature_function.py
|
|
180
|
-
│ ├── fuzzydl_to_owl2_java.py
|
|
181
194
|
│ ├── fuzzydl_to_owl2.py
|
|
182
195
|
│ ├── general_concept_inclusion.py
|
|
183
196
|
│ ├── individual
|
|
@@ -253,8 +266,6 @@ fuzzy_reasoner
|
|
|
253
266
|
│ └── utils.py
|
|
254
267
|
└── fuzzyowl2
|
|
255
268
|
├── __init__.py
|
|
256
|
-
├── fuzzyowl2_java.py
|
|
257
|
-
├── fuzzyowl2_to_fuzzydl_java.py
|
|
258
269
|
├── fuzzyowl2_to_fuzzydl.py
|
|
259
270
|
├── fuzzyowl2.py
|
|
260
271
|
├── owl_types
|
|
@@ -290,10 +301,15 @@ fuzzy_reasoner
|
|
|
290
301
|
└── util
|
|
291
302
|
└── constants.py
|
|
292
303
|
```
|
|
304
|
+
⸻
|
|
305
|
+
|
|
306
|
+
# Test
|
|
307
|
+
|
|
308
|
+
The directory `test` contains the `unittest` files. In particular, the file `test_suite.py` contains all the test suite.
|
|
309
|
+
The directory `examples/TestSuite` contains all the knowledge bases used for the tests.
|
|
293
310
|
|
|
294
311
|
⸻
|
|
295
312
|
|
|
296
313
|
# License
|
|
297
314
|
|
|
298
315
|
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International.
|
|
299
|
-
|
{fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/approximation_concept.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import typing
|
|
2
2
|
|
|
3
|
+
from fuzzy_dl_owl2.fuzzydl.concept.all_some_concept import AllSomeConcept
|
|
3
4
|
from fuzzy_dl_owl2.fuzzydl.concept.concept import Concept
|
|
4
5
|
from fuzzy_dl_owl2.fuzzydl.concept.interface.has_role_concept_interface import (
|
|
5
6
|
HasRoleConceptInterface,
|
|
@@ -48,29 +49,52 @@ class ApproximationConcept(Concept, HasRoleConceptInterface):
|
|
|
48
49
|
self.name = self.compute_name()
|
|
49
50
|
|
|
50
51
|
@staticmethod
|
|
51
|
-
def lower_approx(role: str, c: Concept) ->
|
|
52
|
+
def lower_approx(role: str, c: Concept) -> typing.Self:
|
|
52
53
|
return ApproximationConcept(ConceptType.LOWER_APPROX, role, c)
|
|
53
54
|
|
|
54
55
|
@staticmethod
|
|
55
|
-
def loose_lower_approx(role: str, c: Concept) ->
|
|
56
|
+
def loose_lower_approx(role: str, c: Concept) -> typing.Self:
|
|
56
57
|
return ApproximationConcept(ConceptType.LOOSE_LOWER_APPROX, role, c)
|
|
57
58
|
|
|
58
59
|
@staticmethod
|
|
59
|
-
def tight_lower_approx(role: str, c: Concept) ->
|
|
60
|
+
def tight_lower_approx(role: str, c: Concept) -> typing.Self:
|
|
60
61
|
return ApproximationConcept(ConceptType.TIGHT_LOWER_APPROX, role, c)
|
|
61
62
|
|
|
62
63
|
@staticmethod
|
|
63
|
-
def upper_approx(role: str, c: Concept) ->
|
|
64
|
+
def upper_approx(role: str, c: Concept) -> typing.Self:
|
|
64
65
|
return ApproximationConcept(ConceptType.UPPER_APPROX, role, c)
|
|
65
66
|
|
|
66
67
|
@staticmethod
|
|
67
|
-
def loose_upper_approx(role: str, c: Concept) ->
|
|
68
|
+
def loose_upper_approx(role: str, c: Concept) -> typing.Self:
|
|
68
69
|
return ApproximationConcept(ConceptType.LOOSE_UPPER_APPROX, role, c)
|
|
69
70
|
|
|
70
71
|
@staticmethod
|
|
71
|
-
def tight_upper_approx(role: str, c: Concept) ->
|
|
72
|
+
def tight_upper_approx(role: str, c: Concept) -> typing.Self:
|
|
72
73
|
return ApproximationConcept(ConceptType.TIGHT_UPPER_APPROX, role, c)
|
|
73
74
|
|
|
75
|
+
def to_all_some_concept(self) -> AllSomeConcept:
|
|
76
|
+
if self.type == ConceptType.LOWER_APPROX:
|
|
77
|
+
return AllSomeConcept.all(self.role, self.curr_concept)
|
|
78
|
+
if self.type == ConceptType.TIGHT_LOWER_APPROX:
|
|
79
|
+
return AllSomeConcept.all(
|
|
80
|
+
self.role, AllSomeConcept.all(self.role, self.curr_concept)
|
|
81
|
+
)
|
|
82
|
+
if self.type == ConceptType.LOOSE_LOWER_APPROX:
|
|
83
|
+
return AllSomeConcept.some(
|
|
84
|
+
self.role, AllSomeConcept.all(self.role, self.curr_concept)
|
|
85
|
+
)
|
|
86
|
+
if self.type == ConceptType.UPPER_APPROX:
|
|
87
|
+
return AllSomeConcept.some(self.role, self.curr_concept)
|
|
88
|
+
if self.type == ConceptType.TIGHT_UPPER_APPROX:
|
|
89
|
+
return AllSomeConcept.all(
|
|
90
|
+
self.role, AllSomeConcept.some(self.role, self.curr_concept)
|
|
91
|
+
)
|
|
92
|
+
if self.type == ConceptType.LOOSE_UPPER_APPROX:
|
|
93
|
+
return AllSomeConcept.some(
|
|
94
|
+
self.role, AllSomeConcept.some(self.role, self.curr_concept)
|
|
95
|
+
)
|
|
96
|
+
raise ValueError
|
|
97
|
+
|
|
74
98
|
def clone(self) -> typing.Self:
|
|
75
99
|
return ApproximationConcept(self.type, self.role, self.curr_concept)
|
|
76
100
|
|
|
@@ -111,10 +135,11 @@ class ApproximationConcept(Concept, HasRoleConceptInterface):
|
|
|
111
135
|
return f"(lla {self.role} {self.curr_concept})"
|
|
112
136
|
elif self.type == ConceptType.UPPER_APPROX:
|
|
113
137
|
return f"(ua {self.role} {self.curr_concept})"
|
|
114
|
-
elif self.type == ConceptType.
|
|
115
|
-
return f"(
|
|
116
|
-
elif self.type == ConceptType.
|
|
117
|
-
return f"(
|
|
138
|
+
elif self.type == ConceptType.TIGHT_UPPER_APPROX:
|
|
139
|
+
return f"(tua {self.role} {self.curr_concept})"
|
|
140
|
+
elif self.type == ConceptType.TIGHT_LOWER_APPROX:
|
|
141
|
+
return f"(tla {self.role} {self.curr_concept})"
|
|
142
|
+
raise ValueError
|
|
118
143
|
|
|
119
144
|
def compute_atomic_concepts(self) -> set[Concept]:
|
|
120
145
|
return self.curr_concept.compute_atomic_concepts()
|
|
@@ -34,6 +34,7 @@ class TriangularFuzzyNumber(TriangularConcreteConcept):
|
|
|
34
34
|
def __tringular_fn_init_1(self, name: str, a: float, b: float, c: float) -> None:
|
|
35
35
|
super().__init__(name, self.K1, self.K2, a, b, c)
|
|
36
36
|
self.type = ConceptType.FUZZY_NUMBER
|
|
37
|
+
self.name = name or self.compute_name()
|
|
37
38
|
|
|
38
39
|
def __tringular_fn_init_2(self, a: float, b: float, c: float) -> None:
|
|
39
40
|
self.__init__(f"({a}, {b}, {c})", a, b, c)
|
|
@@ -76,7 +77,7 @@ class TriangularFuzzyNumber(TriangularConcreteConcept):
|
|
|
76
77
|
return self.a == self.b == self.c
|
|
77
78
|
|
|
78
79
|
def compute_name(self) -> str:
|
|
79
|
-
return f"({self.k1}, {self.k2}
|
|
80
|
+
return f"({self.k1}, {self.k2}; {self.a}, {self.b}, {self.c})"
|
|
80
81
|
|
|
81
82
|
def __add__(self, other: typing.Self) -> typing.Self:
|
|
82
83
|
return TriangularFuzzyNumber(
|
|
@@ -14,6 +14,7 @@ class TrapezoidalConcreteConcept(FuzzyConcreteConcept):
|
|
|
14
14
|
def __init__(
|
|
15
15
|
self, name: str, k1: float, k2: float, a: float, b: float, c: float, d: float
|
|
16
16
|
) -> None:
|
|
17
|
+
super().__init__(name)
|
|
17
18
|
if a > b or b > c or c > d:
|
|
18
19
|
Util.error(f"Error: Trapezoidal functions require {a} <= {b} <= {c} <= {d}")
|
|
19
20
|
if k1 > a:
|
{fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/implies_concept.py
RENAMED
|
@@ -10,10 +10,12 @@ from fuzzy_dl_owl2.fuzzydl.concept.operator_concept import (
|
|
|
10
10
|
GoedelOr,
|
|
11
11
|
LukasiewiczOr,
|
|
12
12
|
Not,
|
|
13
|
+
OperatorConcept,
|
|
13
14
|
Or,
|
|
14
15
|
)
|
|
15
16
|
from fuzzy_dl_owl2.fuzzydl.concept.truth_concept import TruthConcept
|
|
16
|
-
from fuzzy_dl_owl2.fuzzydl.util
|
|
17
|
+
from fuzzy_dl_owl2.fuzzydl.util import constants
|
|
18
|
+
from fuzzy_dl_owl2.fuzzydl.util.constants import ConceptType, FuzzyLogic
|
|
17
19
|
from fuzzy_dl_owl2.fuzzydl.util.util import Util
|
|
18
20
|
|
|
19
21
|
|
|
@@ -26,7 +28,6 @@ class ImpliesConcept(Concept, HasConceptsInterface):
|
|
|
26
28
|
assert c_type in (
|
|
27
29
|
ConceptType.ZADEH_IMPLIES,
|
|
28
30
|
ConceptType.GOEDEL_IMPLIES,
|
|
29
|
-
ConceptType,
|
|
30
31
|
)
|
|
31
32
|
|
|
32
33
|
self.name: str = self.compute_name()
|
|
@@ -42,8 +43,8 @@ class ImpliesConcept(Concept, HasConceptsInterface):
|
|
|
42
43
|
return TruthConcept.get_top()
|
|
43
44
|
if c2.type == ConceptType.BOTTOM:
|
|
44
45
|
return -c1
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
if constants.KNOWLEDGE_BASE_SEMANTICS == FuzzyLogic.CLASSICAL:
|
|
47
|
+
return Or(-c1, c2)
|
|
47
48
|
return LukasiewiczOr(-c1, c2)
|
|
48
49
|
|
|
49
50
|
@staticmethod
|
|
@@ -52,8 +53,8 @@ class ImpliesConcept(Concept, HasConceptsInterface):
|
|
|
52
53
|
return c2
|
|
53
54
|
if c2.type == ConceptType.TOP or c1.type == ConceptType.BOTTOM:
|
|
54
55
|
return TruthConcept.get_top()
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
if constants.KNOWLEDGE_BASE_SEMANTICS == FuzzyLogic.CLASSICAL:
|
|
57
|
+
return Or(-c1, c2)
|
|
57
58
|
return GoedelOr(-c1, c2)
|
|
58
59
|
|
|
59
60
|
@staticmethod
|
|
@@ -62,16 +63,18 @@ class ImpliesConcept(Concept, HasConceptsInterface):
|
|
|
62
63
|
return c2
|
|
63
64
|
if c2.type == ConceptType.TOP or c1.type == ConceptType.BOTTOM:
|
|
64
65
|
return TruthConcept.get_top()
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
if constants.KNOWLEDGE_BASE_SEMANTICS == FuzzyLogic.CLASSICAL:
|
|
67
|
+
return Or(-c1, c2)
|
|
67
68
|
if c1.type == ConceptType.GOEDEL_OR:
|
|
68
|
-
return GoedelAnd(
|
|
69
|
+
return GoedelAnd(
|
|
70
|
+
[GoedelOr(ci, c2) for ci in typing.cast(OperatorConcept, c1).concepts]
|
|
71
|
+
)
|
|
69
72
|
return ImpliesConcept(ConceptType.GOEDEL_IMPLIES, [c1, c2])
|
|
70
73
|
|
|
71
74
|
@staticmethod
|
|
72
75
|
def zadeh_implies(c1: Concept, c2: Concept) -> Concept:
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
if constants.KNOWLEDGE_BASE_SEMANTICS == FuzzyLogic.CLASSICAL:
|
|
77
|
+
return Or(-c1, c2)
|
|
75
78
|
return ImpliesConcept(ConceptType.ZADEH_IMPLIES, [c1, c2])
|
|
76
79
|
|
|
77
80
|
def replace(self, a: Concept, c: Concept) -> Concept:
|
{fuzzy_dl_owl2-1.0.1 → fuzzy_dl_owl2-1.0.3}/fuzzy_dl_owl2/fuzzydl/concept/operator_concept.py
RENAMED
|
@@ -360,16 +360,20 @@ class OperatorConcept(Concept, HasConceptsInterface):
|
|
|
360
360
|
A | A = A
|
|
361
361
|
"""
|
|
362
362
|
if OperatorConcept.is_and(self.type):
|
|
363
|
-
if
|
|
364
|
-
|
|
363
|
+
if (
|
|
364
|
+
ConceptType.BOTTOM in [c.type for c in self.concepts]
|
|
365
|
+
or any(-c in self.concepts for c in self.concepts)
|
|
366
|
+
and constants.KNOWLEDGE_BASE_SEMANTICS == FuzzyLogic.CLASSICAL
|
|
365
367
|
):
|
|
366
368
|
return TruthConcept.get_bottom()
|
|
367
369
|
if self.type in OperatorConcept.ABSORPTION_OPERATORS:
|
|
368
370
|
self.concepts = sorted(set(self.concepts))
|
|
369
371
|
self.concepts = [c for c in self.concepts if c.type != ConceptType.TOP]
|
|
370
372
|
elif OperatorConcept.is_or(self.type):
|
|
371
|
-
if
|
|
372
|
-
|
|
373
|
+
if (
|
|
374
|
+
ConceptType.TOP in [c.type for c in self.concepts]
|
|
375
|
+
or any(-c in self.concepts for c in self.concepts)
|
|
376
|
+
and constants.KNOWLEDGE_BASE_SEMANTICS == FuzzyLogic.CLASSICAL
|
|
373
377
|
):
|
|
374
378
|
return TruthConcept.get_top()
|
|
375
379
|
if self.type in OperatorConcept.ABSORPTION_OPERATORS:
|
|
@@ -458,8 +462,8 @@ class OperatorConcept(Concept, HasConceptsInterface):
|
|
|
458
462
|
if a not in [TruthConcept.get_bottom(), TruthConcept.get_top()]
|
|
459
463
|
]
|
|
460
464
|
)
|
|
461
|
-
if len(self.concepts) == 1:
|
|
462
|
-
|
|
465
|
+
# if len(self.concepts) == 1:
|
|
466
|
+
# return self.concepts[0]
|
|
463
467
|
return OperatorConcept.__op(self.type, self.concepts)
|
|
464
468
|
|
|
465
469
|
def reduce_quantifiers(self) -> typing.Self:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import typing
|
|
2
2
|
|
|
3
|
+
from fuzzy_dl_owl2.fuzzydl.util import constants
|
|
3
4
|
from fuzzy_dl_owl2.fuzzydl.util.constants import ConcreteFeatureType
|
|
4
5
|
|
|
5
6
|
|
|
@@ -29,7 +30,9 @@ class ConcreteFeature:
|
|
|
29
30
|
elif len(args) == 3:
|
|
30
31
|
if isinstance(args[1], int) and isinstance(args[2], int):
|
|
31
32
|
self.__concrete_feature_init_3(*args)
|
|
32
|
-
elif isinstance(args[1],
|
|
33
|
+
elif isinstance(args[1], constants.NUMBER) and isinstance(
|
|
34
|
+
args[2], constants.NUMBER
|
|
35
|
+
):
|
|
33
36
|
self.__concrete_feature_init_4(*args)
|
|
34
37
|
else:
|
|
35
38
|
raise ValueError
|
|
@@ -90,5 +93,8 @@ class ConcreteFeature:
|
|
|
90
93
|
def get_name(self) -> str:
|
|
91
94
|
return self.name
|
|
92
95
|
|
|
96
|
+
def __repr__(self) -> str:
|
|
97
|
+
return str(self)
|
|
98
|
+
|
|
93
99
|
def __str__(self) -> str:
|
|
94
100
|
return self.get_name()
|
|
@@ -13,6 +13,9 @@ from fuzzy_dl_owl2.fuzzydl.util.constants import FeatureFunctionType
|
|
|
13
13
|
|
|
14
14
|
class FeatureFunction:
|
|
15
15
|
|
|
16
|
+
@typing.overload
|
|
17
|
+
def __init__(self, feature: typing.Self) -> None: ...
|
|
18
|
+
|
|
16
19
|
@typing.overload
|
|
17
20
|
def __init__(self, feature: str) -> None: ...
|
|
18
21
|
|
|
@@ -31,7 +34,9 @@ class FeatureFunction:
|
|
|
31
34
|
def __init__(self, *args) -> None:
|
|
32
35
|
assert len(args) in [1, 2]
|
|
33
36
|
if len(args) == 1:
|
|
34
|
-
if isinstance(args[0],
|
|
37
|
+
if isinstance(args[0], FeatureFunction):
|
|
38
|
+
self.__feature_function_init_6(*args)
|
|
39
|
+
elif isinstance(args[0], str):
|
|
35
40
|
self.__feature_function_init_1(*args)
|
|
36
41
|
elif isinstance(args[0], constants.NUMBER):
|
|
37
42
|
self.__feature_function_init_2(*args)
|
|
@@ -87,6 +92,12 @@ class FeatureFunction:
|
|
|
87
92
|
self.feature: str = ""
|
|
88
93
|
self.n: float = n
|
|
89
94
|
|
|
95
|
+
def __feature_function_init_6(self, feature: typing.Self) -> None:
|
|
96
|
+
self.type: FeatureFunctionType = feature.type
|
|
97
|
+
self.f: list[FeatureFunction] = feature.f
|
|
98
|
+
self.feature: str = feature.feature
|
|
99
|
+
self.n: float = feature.n
|
|
100
|
+
|
|
90
101
|
def get_type(self) -> FeatureFunctionType:
|
|
91
102
|
return self.type
|
|
92
103
|
|
|
@@ -134,6 +145,9 @@ class FeatureFunction:
|
|
|
134
145
|
return ex1
|
|
135
146
|
return None
|
|
136
147
|
|
|
148
|
+
def __repr__(self) -> str:
|
|
149
|
+
return str(self)
|
|
150
|
+
|
|
137
151
|
def __str__(self) -> str:
|
|
138
152
|
if self.type == FeatureFunctionType.ATOMIC:
|
|
139
153
|
return self.feature
|
|
@@ -144,5 +158,5 @@ class FeatureFunction:
|
|
|
144
158
|
elif self.type == FeatureFunctionType.SUBTRACTION:
|
|
145
159
|
return f"({self.f[0]} - {self.f[1]})"
|
|
146
160
|
elif self.type == FeatureFunctionType.SUM:
|
|
147
|
-
return f"({' + '.join(map(str, self.f))}"
|
|
161
|
+
return f"({' + '.join(map(str, self.f))})"
|
|
148
162
|
return ""
|
|
@@ -517,7 +517,7 @@ class FuzzydlToOwl2:
|
|
|
517
517
|
self, value: typing.Union[float, DegreeNumeric]
|
|
518
518
|
) -> set[OWLAnnotation]:
|
|
519
519
|
"""Get annotations for an axiom with degree"""
|
|
520
|
-
if isinstance(value,
|
|
520
|
+
if isinstance(value, constants.NUMBER):
|
|
521
521
|
n = value
|
|
522
522
|
elif isinstance(value, DegreeNumeric): # Degree object
|
|
523
523
|
n = value.get_numerical_value()
|