fuzzy-dl-owl2 1.0.8__py3-none-any.whl → 1.0.9__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.
@@ -4,8 +4,9 @@ import os
4
4
  import sys
5
5
  import typing
6
6
  from functools import partial
7
+ import urllib.parse
7
8
 
8
- from rdflib import RDF, XSD, Literal, Namespace, URIRef
9
+ from rdflib import RDF, RDFS, XSD, Literal, Namespace, URIRef
9
10
 
10
11
  from fuzzy_dl_owl2.fuzzydl.assertion.assertion import Assertion
11
12
  from fuzzy_dl_owl2.fuzzydl.concept.all_some_concept import AllSomeConcept
@@ -61,6 +62,7 @@ from fuzzy_dl_owl2.fuzzydl.primitive_concept_definition import (
61
62
  PrimitiveConceptDefinition,
62
63
  )
63
64
  from fuzzy_dl_owl2.fuzzydl.util import constants
65
+ from fuzzy_dl_owl2.fuzzydl.util.config_reader import ConfigReader
64
66
  from fuzzy_dl_owl2.fuzzydl.util.constants import ConceptType, ConcreteFeatureType
65
67
  from fuzzy_dl_owl2.fuzzydl.util.util import Util
66
68
  from fuzzy_dl_owl2.fuzzyowl2.util.constants import FuzzyOWL2Keyword
@@ -128,8 +130,7 @@ from pyowl2.expressions.object_property import OWLObjectProperty
128
130
  from pyowl2.individual.named_individual import OWLNamedIndividual
129
131
  from pyowl2.literal.literal import OWLLiteral
130
132
  from pyowl2.ontology import OWLOntology
131
-
132
- from fuzzy_dl_owl2.fuzzydl.util.config_reader import ConfigReader
133
+ import urllib
133
134
 
134
135
 
135
136
  # @utils.timer_decorator
@@ -143,10 +144,12 @@ class FuzzydlToOwl2:
143
144
  # base_iri: str = "http://www.semanticweb.org/ontologies/fuzzydl_ontology.owl",
144
145
  base_iri: str = "http://www.semanticweb.org/ontologies/fuzzydl_ontology#",
145
146
  ) -> None:
147
+ base_iri = urllib.parse.urlparse(base_iri).geturl().rstrip("/").rstrip("#")
148
+
146
149
  self.num_classes: int = 0
147
150
  self.kb, _ = DLParser.get_kb(input_file)
148
- self.ontology_path: str = base_iri
149
- self.ontology_iri: IRI = IRI(Namespace(URIRef(base_iri)))
151
+ self.ontology_path: str = f"{base_iri}#"
152
+ self.ontology_iri: IRI = IRI(Namespace(URIRef(self.ontology_path)))
150
153
  self.ontology: OWLOntology = OWLOntology(
151
154
  self.ontology_iri, OWL1_annotations=True
152
155
  )
@@ -154,7 +157,19 @@ class FuzzydlToOwl2:
154
157
  IRI(self.ontology_iri.namespace, ConfigReader.OWL_ANNOTATION_LABEL)
155
158
  )
156
159
 
157
- self.ontology.add_axiom(OWLDeclaration(self.fuzzyLabel))
160
+ self.ontology.add_axiom(
161
+ OWLDeclaration(
162
+ self.fuzzyLabel,
163
+ [
164
+ OWLAnnotation(
165
+ OWLAnnotationProperty(URIRef(RDFS.label)),
166
+ OWLLiteral(
167
+ Literal(ConfigReader.OWL_ANNOTATION_LABEL, lang="en")
168
+ ),
169
+ )
170
+ ],
171
+ )
172
+ )
158
173
 
159
174
  self.concepts: dict[str, OWLClassExpression] = dict()
160
175
  self.datatypes: dict[str, OWLDatatype] = dict()
@@ -162,9 +177,46 @@ class FuzzydlToOwl2:
162
177
  self.input_FDL: str = input_file
163
178
  self.output_FOWL: str = os.path.join(constants.RESULTS_PATH, output_file)
164
179
 
165
- def iri(self, o: object) -> IRI:
180
+ def iri(self, o: object, iri_type: type = OWLClass) -> IRI:
166
181
  """Convert object to IRI string"""
167
- return IRI(self.ontology_iri.namespace, str(o))
182
+ namespace: URIRef = self.ontology_iri.namespace
183
+ if iri_type == OWLClass:
184
+ namespace = Namespace(f"{self.ontology_path[:-1]}/class#")
185
+ elif iri_type == OWLDataProperty:
186
+ namespace = Namespace(f"{self.ontology_path[:-1]}/data-property#")
187
+ elif iri_type == OWLObjectProperty:
188
+ namespace = Namespace(f"{self.ontology_path[:-1]}/object-property#")
189
+ elif iri_type == OWLNamedIndividual:
190
+ namespace = Namespace(f"{self.ontology_path[:-1]}/individual#")
191
+ elif iri_type == OWLDatatype:
192
+ namespace = Namespace(f"{self.ontology_path[:-1]}/datatype#")
193
+ elif iri_type == OWLAnnotationProperty:
194
+ namespace = Namespace(f"{self.ontology_path[:-1]}/annotation-property#")
195
+ return IRI(namespace, str(o))
196
+
197
+ def individual_iri(self, o: object) -> IRI:
198
+ """Convert individual object to IRI string"""
199
+ return self.iri(o, OWLNamedIndividual)
200
+
201
+ def class_iri(self, o: object) -> IRI:
202
+ """Convert class to IRI string"""
203
+ return self.iri(o, OWLClass)
204
+
205
+ def data_property_iri(self, o: object) -> IRI:
206
+ """Convert data property to IRI string"""
207
+ return self.iri(o, OWLDataProperty)
208
+
209
+ def object_property_iri(self, o: object) -> IRI:
210
+ """Convert object property to IRI string"""
211
+ return self.iri(o, OWLObjectProperty)
212
+
213
+ def datatype_iri(self, o: object) -> IRI:
214
+ """Convert datatype to IRI string"""
215
+ return self.iri(o, OWLDatatype)
216
+
217
+ def annotation_property_iri(self, o: object) -> IRI:
218
+ """Convert datatype to IRI string"""
219
+ return self.iri(o, OWLAnnotationProperty)
168
220
 
169
221
  def get_base(self, c: Concept) -> OWLClassExpression:
170
222
  """Get the base class for a concept"""
@@ -189,8 +241,18 @@ class FuzzydlToOwl2:
189
241
 
190
242
  def __get_class_1(self, name: str) -> OWLClassExpression:
191
243
  """Get or create an OWL class by name"""
192
- cls = OWLClass(self.iri(name))
193
- self.ontology.add_axiom(OWLDeclaration(cls))
244
+ cls = OWLClass(self.class_iri(name))
245
+ self.ontology.add_axiom(
246
+ OWLDeclaration(
247
+ cls,
248
+ [
249
+ OWLAnnotation(
250
+ OWLAnnotationProperty(URIRef(RDFS.label)),
251
+ OWLLiteral(Literal(name, lang="en")),
252
+ )
253
+ ],
254
+ )
255
+ )
194
256
  return cls
195
257
 
196
258
  def __get_class_2(self, c: Concept) -> OWLClassExpression:
@@ -199,7 +261,17 @@ class FuzzydlToOwl2:
199
261
  c_type: ConceptType = c.type
200
262
  if c_type in (ConceptType.ATOMIC, ConceptType.CONCRETE):
201
263
  cls = self.get_class(str(c))
202
- self.ontology.add_axiom(OWLDeclaration(cls))
264
+ self.ontology.add_axiom(
265
+ OWLDeclaration(
266
+ cls,
267
+ [
268
+ OWLAnnotation(
269
+ OWLAnnotationProperty(URIRef(RDFS.label)),
270
+ OWLLiteral(Literal(str(c), lang="en")),
271
+ )
272
+ ],
273
+ )
274
+ )
203
275
  return cls
204
276
  elif c_type == ConceptType.TOP:
205
277
  return OWLClass.thing()
@@ -382,8 +454,18 @@ class FuzzydlToOwl2:
382
454
  return self.__get_class_weighted(c)
383
455
  elif c_type == ConceptType.QUANTIFIED_OWA:
384
456
  return self.__get_class_q_owa(c)
385
- cls = OWLClass(self.iri(str(c)))
386
- self.ontology.add_axiom(OWLDeclaration(cls))
457
+ cls = OWLClass(self.class_iri(str(c)))
458
+ self.ontology.add_axiom(
459
+ OWLDeclaration(
460
+ cls,
461
+ [
462
+ OWLAnnotation(
463
+ OWLAnnotationProperty(URIRef(RDFS.label)),
464
+ OWLLiteral(Literal(str(c), lang="en")),
465
+ )
466
+ ],
467
+ )
468
+ )
387
469
  return cls
388
470
 
389
471
  def __get_class_weighted_min_max_sum(self, c: Concept) -> OWLClassExpression:
@@ -528,14 +610,24 @@ class FuzzydlToOwl2:
528
610
 
529
611
  self.num_classes += 1
530
612
  Util.debug(f"Creating new atomic concept -> {name}")
531
- c2: OWLClass = OWLClass(self.iri(f"class__{self.num_classes}"))
613
+ c2: OWLClass = OWLClass(self.class_iri(f"class__{self.num_classes}"))
532
614
  self.concepts[name] = c2
533
- self.ontology.add_axiom(OWLDeclaration(c2))
615
+ self.ontology.add_axiom(
616
+ OWLDeclaration(
617
+ c2,
618
+ [
619
+ OWLAnnotation(
620
+ OWLAnnotationProperty(URIRef(RDFS.label)),
621
+ OWLLiteral(Literal(name, lang="en")),
622
+ )
623
+ ],
624
+ )
625
+ )
534
626
  return c2
535
627
 
536
628
  def exist_object_property(self, role: str) -> bool:
537
629
  """Check if an object property exists"""
538
- iri: IRI = self.iri(role)
630
+ iri: IRI = self.object_property_iri(role)
539
631
  return self.ontology.getter.exists_object_property(iri.to_uriref())
540
632
  # return any(
541
633
  # typing.cast(OWLObjectProperty, typing.cast(OWLDeclaration, prop).entity).iri
@@ -545,7 +637,7 @@ class FuzzydlToOwl2:
545
637
 
546
638
  def exist_data_property(self, role: str) -> bool:
547
639
  """Check if a data property exists"""
548
- iri: IRI = self.iri(role)
640
+ iri: IRI = self.data_property_iri(role)
549
641
  return self.ontology.getter.exists_data_property(iri.to_uriref())
550
642
  # return any(
551
643
  # typing.cast(OWLDataProperty, typing.cast(OWLDeclaration, prop).entity).iri
@@ -560,8 +652,18 @@ class FuzzydlToOwl2:
560
652
  Util.debug(f"Getting object property -> {role}")
561
653
  if self.exist_data_property(role):
562
654
  return self.get_data_property(role)
563
- obj = OWLObjectProperty(self.iri(role))
564
- self.ontology.add_axiom(OWLDeclaration(obj))
655
+ obj = OWLObjectProperty(self.object_property_iri(role))
656
+ self.ontology.add_axiom(
657
+ OWLDeclaration(
658
+ obj,
659
+ [
660
+ OWLAnnotation(
661
+ OWLAnnotationProperty(URIRef(RDFS.label)),
662
+ OWLLiteral(Literal(role, lang="en")),
663
+ )
664
+ ],
665
+ )
666
+ )
565
667
  return obj
566
668
 
567
669
  def get_data_property(
@@ -571,15 +673,35 @@ class FuzzydlToOwl2:
571
673
  Util.debug(f"Getting data property -> {role}")
572
674
  if self.exist_object_property(role):
573
675
  return self.get_object_property(role)
574
- data = OWLDataProperty(self.iri(role))
575
- self.ontology.add_axiom(OWLDeclaration(data))
676
+ data = OWLDataProperty(self.data_property_iri(role))
677
+ self.ontology.add_axiom(
678
+ OWLDeclaration(
679
+ data,
680
+ [
681
+ OWLAnnotation(
682
+ OWLAnnotationProperty(URIRef(RDFS.label)),
683
+ OWLLiteral(Literal(role, lang="en")),
684
+ )
685
+ ],
686
+ )
687
+ )
576
688
  return data
577
689
 
578
690
  def get_individual(self, name: str) -> OWLNamedIndividual:
579
691
  """Get or create a named individual"""
580
692
  Util.debug(f"Getting individual -> {name}")
581
- ind = OWLNamedIndividual(self.iri(f"{name}_Individual"))
582
- self.ontology.add_axiom(OWLDeclaration(ind))
693
+ ind = OWLNamedIndividual(self.individual_iri(f"{name}"))
694
+ self.ontology.add_axiom(
695
+ OWLDeclaration(
696
+ ind,
697
+ [
698
+ OWLAnnotation(
699
+ OWLAnnotationProperty(URIRef(RDFS.label)),
700
+ OWLLiteral(Literal(name, lang="en")),
701
+ )
702
+ ],
703
+ )
704
+ )
583
705
  return ind
584
706
 
585
707
  def to_owl_annotation(self, annotation: str) -> OWLAnnotation:
@@ -890,7 +1012,7 @@ class FuzzydlToOwl2:
890
1012
  def _process_concrete_concept(self, c: FuzzyConcreteConcept) -> None:
891
1013
  """Process a concrete concept"""
892
1014
  Util.debug(f"Process concrete concept -> {c}")
893
- current_datatype: OWLDatatype = OWLDatatype(self.iri(c))
1015
+ current_datatype: OWLDatatype = OWLDatatype(self.datatype_iri(c))
894
1016
  self.datatypes[str(c)] = current_datatype
895
1017
 
896
1018
  # specific: str = self._get_concrete_concept_specifics(c)
@@ -921,7 +1043,17 @@ class FuzzydlToOwl2:
921
1043
  definition: OWLDatatypeDefinition = OWLDatatypeDefinition(
922
1044
  current_datatype, unit_interval
923
1045
  )
924
- self.ontology.add_axiom(OWLDeclaration(current_datatype))
1046
+ self.ontology.add_axiom(
1047
+ OWLDeclaration(
1048
+ current_datatype,
1049
+ [
1050
+ OWLAnnotation(
1051
+ OWLAnnotationProperty(URIRef(RDFS.label)),
1052
+ OWLLiteral(Literal(str(c), lang="en")),
1053
+ )
1054
+ ],
1055
+ )
1056
+ )
925
1057
  self.ontology.add_axiom(definition)
926
1058
 
927
1059
  main_xml = FuzzyXML.build_main_xml(FuzzyOWL2Keyword.DATATYPE.get_str_value())
@@ -1020,9 +1152,19 @@ class FuzzydlToOwl2:
1020
1152
  main_xml.append(modifier_xml)
1021
1153
  annotation: str = FuzzyXML.to_str(main_xml)
1022
1154
 
1023
- current_datatype: OWLDatatype = OWLDatatype(self.iri(mod))
1155
+ current_datatype: OWLDatatype = OWLDatatype(self.datatype_iri(mod))
1024
1156
  self.modifiers[str(mod)] = current_datatype
1025
- self.ontology.add_axiom(OWLDeclaration(current_datatype))
1157
+ self.ontology.add_axiom(
1158
+ OWLDeclaration(
1159
+ current_datatype,
1160
+ [
1161
+ OWLAnnotation(
1162
+ OWLAnnotationProperty(URIRef(RDFS.label)),
1163
+ OWLLiteral(Literal(str(mod), lang="en")),
1164
+ )
1165
+ ],
1166
+ )
1167
+ )
1026
1168
  self.add_entity_annotation(annotation, current_datatype)
1027
1169
 
1028
1170
  def _process_assertion(self, ass: Assertion) -> None:
@@ -10139,7 +10139,7 @@ class CreatedIndividualHandler:
10139
10139
  ) -> bool:
10140
10140
  """
10141
10141
  Gets if the individual is indirectly blocked with respect to a fuzzy KB.
10142
- Case SUBSET or SET blocking.
10142
+ Case SUBSET or SET blocking.
10143
10143
  A node v is indirectly blocked iff one of its ancestors are blocked.
10144
10144
  """
10145
10145
  # Don't test if not deep enough in completion forest
@@ -10353,11 +10353,7 @@ class CreatedIndividualHandler:
10353
10353
  ) -> bool:
10354
10354
  """
10355
10355
  Gets if the individual is directly blocked with respect to a fuzzy KB.
10356
-
10357
- A node v is directly blocked iff none of its ancestors are blocked
10358
- and there exists an ancestor w such that
10359
- L(v) = L(w),
10360
- where L(*) is the set of Concept's labels for a node.
10356
+ A node v is directly blocked iff none of its ancestors are blocked and there exists an ancestor w such that L(v) = L(w), where L(*) is the set of Concept's labels for a node.
10361
10357
  In this case we say that w directly blocks v.
10362
10358
  """
10363
10359
  type: BlockingDynamicType = kb.blocking_type
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fuzzy-dl-owl2
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
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
5
  License: CC-BY-SA-4.0
6
6
  Author: Giuseppe Filippone
@@ -13,19 +13,28 @@ Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Dist: networkx (>=3.3,<4.0)
15
15
  Requires-Dist: owlready2 (>=0.47,<0.48)
16
- Requires-Dist: pyowl2 (>=1.0.2,<2.0.0)
16
+ Requires-Dist: pyowl2 (>=1.0.3,<2.0.0)
17
17
  Requires-Dist: pyparsing (>=3.2.3,<4.0.0)
18
18
  Requires-Dist: rdflib (>=7.1.4,<8.0.0)
19
19
  Requires-Dist: setuptools (>=80.8.0,<81.0.0)
20
20
  Requires-Dist: sortedcontainers (>=2.4.0,<3.0.0)
21
21
  Requires-Dist: trycast (>=1.2.0,<2.0.0)
22
+ Project-URL: Documentation, https://fuzzy-dl-owl2.readthedocs.io/en/latest/
22
23
  Project-URL: Repository, https://github.com/giuseppefilippone/fuzzy_dl_owl2
23
24
  Description-Content-Type: text/markdown
24
25
 
26
+ ![Docs](https://img.shields.io/badge/docs-passing-brightgreen.svg)
27
+ ![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)
28
+ [![Documentation](https://img.shields.io/badge/Read%20the%20Docs-8CA1AF?logo=readthedocs&logoColor=white)](https://fuzzy-dl-owl2.readthedocs.io/en/latest)
29
+ [![PyPI](https://img.shields.io/pypi/v/fuzzy-dl-owl2.svg)](https://pypi.org/project/fuzzy-dl-owl2/)
30
+ ![Python Versions](https://img.shields.io/pypi/pyversions/fuzzy-dl-owl2.svg)
31
+ ![Code Style](https://img.shields.io/badge/code%20style-python-green)
32
+
33
+
25
34
  # Fuzzy DL OWL 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).
35
+ A python porting of the [Fuzzy Description Language](https://www.umbertostraccia.it/cs/software/fuzzyDL/fuzzyDL.html) and the [Fuzzy OWL 2](https://www.umbertostraccia.it/cs/software/FuzzyOWL/index.html) framework.
27
36
 
28
-
37
+ ---
29
38
 
30
39
  A lightweight Python porting of the Fuzzy Description Language (FuzzyDL) and the Fuzzy OWL 2 framework, designed for representing fuzzy logic within description logic and for mapping an knowledge base represented in FuzzyDL to a Fuzzy OWL 2 construct in RDF/XML format.
31
40
 
@@ -36,7 +45,7 @@ Features:
36
45
  - Mapping from Fuzzy OWL 2 to FuzzyDL
37
46
  - Reasoning in FuzzyDL
38
47
 
39
-
48
+ ---
40
49
 
41
50
  # Installation
42
51
 
@@ -44,7 +53,7 @@ Features:
44
53
  pip install fuzzy-dl-owl2
45
54
  ```
46
55
 
47
-
56
+ ---
48
57
 
49
58
  Examples of supported Fuzzy Description Logic Constructs
50
59
 
@@ -54,13 +63,13 @@ Examples of supported Fuzzy Description Logic Constructs
54
63
  | ChoquetIntegral | Define a choquet integral concept |
55
64
  | ApproximationConcept | Define a tight/upper/* lower/upper approximation concept |
56
65
 
57
-
66
+ ---
58
67
 
59
68
  # Directory dl-examples
60
69
 
61
70
  The directory `dl-examples` contains a few examples of Knowledge Bases written using the Fuzzy Description Logic language.
62
71
 
63
-
72
+ ---
64
73
 
65
74
  # Configuration of the MILP solver
66
75
 
@@ -102,10 +111,12 @@ Supported MILP Providers:
102
111
  | HiGHS | pulp_highs |
103
112
  | MIP | mip |
104
113
 
105
-
114
+ ---
106
115
 
107
116
  # MILP Provider Usage and Configuration
108
117
 
118
+ <details><summary>See configurations for each provider</summary>
119
+
109
120
  ## GUROBI
110
121
 
111
122
  - Install [gurobipy](https://pypi.org/project/gurobipy/):
@@ -158,10 +169,14 @@ pip install pulp==3.2.1
158
169
  ```
159
170
  - Add HiGHS to the PATH
160
171
 
161
-
172
+ </details>
173
+
174
+ ---
162
175
 
163
176
  # Fuzzy Description Logic Grammatics
164
177
 
178
+ <details><summary>See all grammatics</summary>
179
+
165
180
  ## String and Numbers
166
181
  ```python
167
182
  name := ["][a-zA-Z_][a-zA-Z0-9_]*["]
@@ -567,7 +582,9 @@ queries := (
567
582
 
568
583
  - In defuzzify queries, the concept $C$ represents several Mamdani/Rules IF-THEN fuzzy rules expressing how to obtain the value of the concrete feature F.
569
584
 
570
-
585
+ </details>
586
+
587
+ ---
571
588
 
572
589
  # Usage - Reasoning
573
590
 
@@ -592,7 +609,8 @@ from fuzzy_dl_owl2 import DLParser
592
609
 
593
610
  DLParser.main("./example.fdl") # "Is audi instance of SportCar ? >= 0.92"
594
611
  ```
595
-
612
+
613
+ ---
596
614
 
597
615
  # Usage - Fuzzy OWL 2
598
616
 
@@ -613,203 +631,216 @@ from fuzzy_dl_owl2 import FuzzyOwl2ToFuzzyDL
613
631
  fdl = FuzzyOwl2ToFuzzyDL("./results/example.owl", "example.fdl")
614
632
  fdl.translate_owl2ontology() # save example.fdl in the subdirectory "./results"
615
633
  ```
616
-
634
+
635
+ ---
617
636
 
618
637
  # Project Structure
619
638
 
639
+ <details><summary>See project structure</summary>
640
+
620
641
  ```text
621
642
  fuzzy_dl_owl2
622
643
  ├── __init__.py
623
644
  ├── fuzzydl
624
-    ├── __init__.py
625
-    ├── assertion
626
-       ├── __init__.py
627
-       ├── assertion.py
628
-       └── atomic_assertion.py
629
-    ├── concept
630
-    │   ├── __init__.py
631
-       ├── all_some_concept.py
632
-       ├── approximation_concept.py
633
-       ├── atomic_concept.py
634
-       ├── choquet_integral.py
635
-       ├── concept.py
636
-       ├── concrete
637
-       │   ├── __init__.py
638
-          ├── crisp_concrete_concept.py
639
-          ├── fuzzy_concrete_concept.py
640
-          ├── fuzzy_number
641
-          │   ├── __init__.py
642
-          │   └── triangular_fuzzy_number.py
643
-          ├── left_concrete_concept.py
644
-          ├── linear_concrete_concept.py
645
-          ├── modified_concrete_concept.py
646
-          ├── right_concrete_concept.py
647
-          ├── trapezoidal_concrete_concept.py
648
-          └── triangular_concrete_concept.py
649
-       ├── ext_threshold_concept.py
650
-       ├── has_value_concept.py
651
-       ├── implies_concept.py
652
-       ├── interface
653
-       │   ├── __init__.py
654
-       │   ├── has_concept_interface.py
655
-          ├── has_concepts_interface.py
656
-          ├── has_role_concept_interface.py
657
-          ├── has_role_interface.py
658
-          ├── has_value_interface.py
659
-          └── has_weighted_concepts_interface.py
660
-       ├── modified
661
-          ├── __init__.py
662
-          ├── linearly_modified_concept.py
663
-       │   ├── modified_concept.py
664
-          └── triangularly_modified_concept.py
665
-       ├── negated_nominal.py
666
-       ├── operator_concept.py
667
-       ├── owa_concept.py
668
-       ├── qowa_concept.py
669
-       ├── quasi_sugeno_integral.py
670
-       ├── self_concept.py
671
-       ├── string_concept.py
672
-       ├── sugeno_integral.py
673
-       ├── threshold_concept.py
674
-       ├── truth_concept.py
675
-       ├── value_concept.py
676
-       ├── weighted_concept.py
677
-       ├── weighted_max_concept.py
678
-       ├── weighted_min_concept.py
679
-       ├── weighted_sum_concept.py
680
-       └── weighted_sum_zero_concept.py
681
-    ├── concept_equivalence.py
682
-    ├── concrete_feature.py
683
-    ├── degree
684
-       ├── __init__.py
685
-       ├── degree_expression.py
686
-    │   ├── degree_numeric.py
687
-    │   ├── degree_variable.py
688
-    │   └── degree.py
689
-    ├── domain_axiom.py
690
-    ├── exception
691
-       ├── __init__.py
692
-       ├── fuzzy_ontology_exception.py
693
-       └── inconsistent_ontology_exception.py
694
-    ├── feature_function.py
695
-    ├── fuzzydl_to_owl2.py
696
-    ├── general_concept_inclusion.py
697
-    ├── individual
698
-       ├── __init__.py
699
-    │   ├── created_individual.py
700
-    │   ├── individual.py
701
-    │   └── representative_individual.py
702
-    ├── knowledge_base.py
703
-    ├── label.py
704
-    ├── milp
705
-       ├── __init__.py
706
-       ├── expression.py
707
-    │   ├── inequation.py
708
-    │   ├── milp_helper.py
709
-    │   ├── show_variables_helper.py
710
-       ├── solution.py
711
-       ├── term.py
712
-       └── variable.py
713
-    ├── modifier
714
-       ├── __init__.py
715
-       ├── linear_modifier.py
716
-       ├── modifier.py
717
-       └── triangular_modifier.py
718
-    ├── parser
719
-       ├── __init__.py
720
-       ├── dl_parser.py
721
-       ├── ebnf.lark
722
-       ├── larkx.py
723
-    │   └── ParserConstants.py
724
-    ├── primitive_concept_definition.py
725
-    ├── query
726
-    │   ├── __init__.py
727
-    │   ├── all_instances_query.py
728
-       ├── bnp_query.py
729
-       ├── defuzzify
730
-       │   ├── __init__.py
731
-       │   ├── defuzzify_query.py
732
-       │   ├── lom_defuzzify_query.py
733
-          ├── mom_defuzzify_query.py
734
-          └── som_defuzzify_query.py
735
-       ├── instance_query.py
736
-       ├── kb_satisfiable_query.py
737
-       ├── max
738
-       │   ├── __init__.py
739
-       │   ├── max_instance_query.py
740
-       │   ├── max_query.py
741
-          ├── max_related_query.py
742
-          ├── max_satisfiable_query.py
743
-          └── max_subsumes_query.py
744
-       ├── min
745
-          ├── __init__.py
746
-          ├── min_instance_query.py
747
-       │   ├── min_query.py
748
-          ├── min_related_query.py
749
-          ├── min_satisfiable_query.py
750
-          └── min_subsumes_query.py
751
-       ├── query.py
752
-       ├── related_query.py
753
-       ├── satisfiable_query.py
754
-       └── subsumption_query.py
755
-    ├── range_axiom.py
756
-    ├── relation.py
757
-    ├── restriction
758
-    │   ├── __init__.py
759
-    │   ├── has_value_restriction.py
760
-    │   └── restriction.py
761
-    ├── role_parent_with_degree.py
762
-    └── util
763
-    ├── __init__.py
764
-    ├── config_reader.py
765
-    ├── constants.py
766
-    ├── util.py
767
-    └── utils.py
645
+ ├── __init__.py
646
+ ├── assertion
647
+ ├── __init__.py
648
+ ├── assertion.py
649
+ └── atomic_assertion.py
650
+ ├── classification_node.py
651
+ ├── concept
652
+ ├── __init__.py
653
+ ├── all_some_concept.py
654
+ ├── approximation_concept.py
655
+ ├── atomic_concept.py
656
+ ├── choquet_integral.py
657
+ ├── concept.py
658
+ ├── concrete
659
+ ├── __init__.py
660
+ ├── __pycache__
661
+ ├── crisp_concrete_concept.py
662
+ ├── fuzzy_concrete_concept.py
663
+ ├── fuzzy_number
664
+ ├── __init__.py
665
+ │ └── triangular_fuzzy_number.py
666
+ ├── left_concrete_concept.py
667
+ ├── linear_concrete_concept.py
668
+ ├── modified_concrete_concept.py
669
+ ├── right_concrete_concept.py
670
+ ├── trapezoidal_concrete_concept.py
671
+ │ └── triangular_concrete_concept.py
672
+ ├── ext_threshold_concept.py
673
+ ├── has_value_concept.py
674
+ ├── implies_concept.py
675
+ ├── interface
676
+ ├── __init__.py
677
+ ├── __pycache__
678
+ ├── has_concept_interface.py
679
+ ├── has_concepts_interface.py
680
+ ├── has_role_concept_interface.py
681
+ ├── has_role_interface.py
682
+ ├── has_value_interface.py
683
+ └── has_weighted_concepts_interface.py
684
+ ├── modified
685
+ ├── __init__.py
686
+ ├── linearly_modified_concept.py
687
+ ├── modified_concept.py
688
+ │ └── triangularly_modified_concept.py
689
+ ├── negated_nominal.py
690
+ ├── operator_concept.py
691
+ ├── owa_concept.py
692
+ ├── qowa_concept.py
693
+ ├── quasi_sugeno_integral.py
694
+ ├── self_concept.py
695
+ ├── sigma_concept.py
696
+ ├── sigma_count.py
697
+ ├── string_concept.py
698
+ ├── sugeno_integral.py
699
+ ├── threshold_concept.py
700
+ ├── truth_concept.py
701
+ ├── value_concept.py
702
+ ├── weighted_concept.py
703
+ ├── weighted_max_concept.py
704
+ ├── weighted_min_concept.py
705
+ ├── weighted_sum_concept.py
706
+ └── weighted_sum_zero_concept.py
707
+ ├── concept_equivalence.py
708
+ ├── concrete_feature.py
709
+ ├── degree
710
+ ├── __init__.py
711
+ ├── degree_expression.py
712
+ ├── degree_numeric.py
713
+ ├── degree_variable.py
714
+ └── degree.py
715
+ ├── domain_axiom.py
716
+ ├── exception
717
+ ├── __init__.py
718
+ ├── fuzzy_ontology_exception.py
719
+ └── inconsistent_ontology_exception.py
720
+ ├── feature_function.py
721
+ ├── fuzzydl_to_owl2.py
722
+ ├── general_concept_inclusion.py
723
+ ├── individual
724
+ ├── __init__.py
725
+ ├── created_individual.py
726
+ ├── individual.py
727
+ └── representative_individual.py
728
+ ├── knowledge_base.py
729
+ ├── label.py
730
+ ├── milp
731
+ ├── __init__.py
732
+ ├── expression.py
733
+ ├── inequation.py
734
+ ├── milp_helper.py
735
+ ├── show_variables_helper.py
736
+ ├── solution.py
737
+ ├── term.py
738
+ └── variable.py
739
+ ├── modifier
740
+ ├── __init__.py
741
+ ├── linear_modifier.py
742
+ ├── modifier.py
743
+ └── triangular_modifier.py
744
+ ├── parser
745
+ ├── __init__.py
746
+ │ └── dl_parser.py
747
+ ├── primitive_concept_definition.py
748
+ ├── query
749
+ ├── __init__.py
750
+ ├── all_instances_query.py
751
+ ├── bnp_query.py
752
+ ├── classification_query.py
753
+ ├── defuzzify
754
+ ├── __init__.py
755
+ ├── defuzzify_query.py
756
+ ├── lom_defuzzify_query.py
757
+ ├── mom_defuzzify_query.py
758
+ │ └── som_defuzzify_query.py
759
+ ├── instance_query.py
760
+ ├── kb_satisfiable_query.py
761
+ ├── max
762
+ ├── __init__.py
763
+ ├── max_instance_query.py
764
+ ├── max_query.py
765
+ ├── max_related_query.py
766
+ ├── max_satisfiable_query.py
767
+ └── max_subsumes_query.py
768
+ ├── min
769
+ ├── __init__.py
770
+ ├── min_instance_query.py
771
+ ├── min_query.py
772
+ ├── min_related_query.py
773
+ ├── min_satisfiable_query.py
774
+ │ └── min_subsumes_query.py
775
+ ├── query.py
776
+ ├── related_query.py
777
+ ├── satisfiable_query.py
778
+ │ └── subsumption_query.py
779
+ ├── range_axiom.py
780
+ ├── relation.py
781
+ ├── restriction
782
+ ├── __init__.py
783
+ │ ├── has_value_restriction.py
784
+ │ └── restriction.py
785
+ ├── role_parent_with_degree.py
786
+ └── util
787
+ ├── __init__.py
788
+ ├── config_reader.py
789
+ │ ├── constants.py
790
+ │ ├── util.py
791
+ │ └── utils.py
768
792
  └── fuzzyowl2
769
793
  ├── __init__.py
770
794
  ├── fuzzyowl2_to_fuzzydl.py
771
795
  ├── fuzzyowl2.py
772
796
  ├── owl_types
773
-    ├── __init__.py
774
-    ├── choquet_concept.py
775
-    ├── concept_definition.py
776
-    ├── fuzzy_datatype.py
777
-    ├── fuzzy_modifier.py
778
-    ├── fuzzy_nominal_concept.py
779
-    ├── fuzzy_property.py
780
-    ├── left_shoulder_function.py
781
-    ├── linear_function.py
782
-    ├── linear_modifier.py
783
-    ├── modified_concept.py
784
-    ├── modified_function.py
785
-    ├── modified_property.py
786
-    ├── owa_concept.py
787
-    ├── property_definition.py
788
-    ├── qowa_concept.py
789
-    ├── quasi_sugeno_concept.py
790
-    ├── right_shoulder_function.py
791
-    ├── sugeno_concept.py
792
-    ├── trapezoidal_function.py
793
-    ├── triangular_function.py
794
-    ├── triangular_modifer.py
795
-    ├── weighted_concept.py
796
-    ├── weighted_max_concept.py
797
-    ├── weighted_min_concept.py
798
-    ├── weighted_sum_concept.py
799
-    └── weighted_sum_zero_concept.py
797
+ ├── __init__.py
798
+ ├── choquet_concept.py
799
+ ├── concept_definition.py
800
+ ├── fuzzy_datatype.py
801
+ ├── fuzzy_modifier.py
802
+ ├── fuzzy_nominal_concept.py
803
+ ├── fuzzy_property.py
804
+ ├── left_shoulder_function.py
805
+ ├── linear_function.py
806
+ ├── linear_modifier.py
807
+ ├── modified_concept.py
808
+ ├── modified_function.py
809
+ ├── modified_property.py
810
+ ├── owa_concept.py
811
+ ├── property_definition.py
812
+ ├── qowa_concept.py
813
+ ├── quasi_sugeno_concept.py
814
+ ├── right_shoulder_function.py
815
+ ├── sugeno_concept.py
816
+ ├── trapezoidal_function.py
817
+ ├── triangular_function.py
818
+ ├── triangular_modifer.py
819
+ ├── weighted_concept.py
820
+ ├── weighted_max_concept.py
821
+ ├── weighted_min_concept.py
822
+ ├── weighted_sum_concept.py
823
+ └── weighted_sum_zero_concept.py
800
824
  ├── parser
801
-    └── owl2_parser.py
825
+ ├── __init__.py
826
+ │ ├── owl2_parser.py
827
+ │ └── owl2_xml_parser.py
802
828
  └── util
803
- └── constants.py
829
+ ├── __init__.py
830
+ ├── constants.py
831
+ └── fuzzy_xml.py
804
832
  ```
805
-
833
+
834
+ </details>
835
+
836
+ ---
806
837
 
807
838
  # Test
808
839
 
809
840
  The directory `test` contains the `unittest` files. In particular, the file `test_suite.py` contains all the test suite.
810
841
  The directory `examples/TestSuite` contains all the knowledge bases used for the tests.
811
842
 
812
-
843
+ ---
813
844
 
814
845
  # License
815
846
 
@@ -65,13 +65,13 @@ fuzzy_dl_owl2/fuzzydl/exception/__init__.py,sha256=IoYY5IQoU4UYyoB-dFOVLZyDvJN20
65
65
  fuzzy_dl_owl2/fuzzydl/exception/fuzzy_ontology_exception.py,sha256=eH1ybBCx1QoZaf8PLCq1rC_3tiBRA-gKCwECTcUUuro,122
66
66
  fuzzy_dl_owl2/fuzzydl/exception/inconsistent_ontology_exception.py,sha256=ez0RQN4KGlNRcfB7IXfPz3bM86CFLl6zo-RRTBRpa_o,129
67
67
  fuzzy_dl_owl2/fuzzydl/feature_function.py,sha256=DXc2ZgjSqAIK5TauJzhcXgifQOB2ZkPxfElRAhJsGVw,6716
68
- fuzzy_dl_owl2/fuzzydl/fuzzydl_to_owl2.py,sha256=VjmHtokMAE0jC9jI8WjGeiCTQ-A8YmmUH14FEVTyrDU,53111
68
+ fuzzy_dl_owl2/fuzzydl/fuzzydl_to_owl2.py,sha256=hBYvkfhgwdzhewvAHWUbhie6gNGyfuhVivdnHsDKPvE,57885
69
69
  fuzzy_dl_owl2/fuzzydl/general_concept_inclusion.py,sha256=X2gIpmKs0RsU7VoKILxpQdBs2yyLAIqWd5UWOAuk22M,2557
70
70
  fuzzy_dl_owl2/fuzzydl/individual/__init__.py,sha256=zBCa24kE2nv08VgtphjLshpbGNEARUJgCdtyv9r6JGc,110
71
71
  fuzzy_dl_owl2/fuzzydl/individual/created_individual.py,sha256=lERkUgXkhYJgLJjuEbqLHimd5O2ABuMkMDnNipliJtY,9293
72
72
  fuzzy_dl_owl2/fuzzydl/individual/individual.py,sha256=iQIqQvbrQ9XOQABVQTt9UF-3MTc2zrcZgBprNYWJfgA,4408
73
73
  fuzzy_dl_owl2/fuzzydl/individual/representative_individual.py,sha256=nayeaoV0B-9xO_I8mttHZTi1CWHs7X7ezhiIjQP7ZBs,1538
74
- fuzzy_dl_owl2/fuzzydl/knowledge_base.py,sha256=Ep0s4sTUy0cbL6xa9w9OmLfM-RmZXVIYD1nEX-HNJl0,449543
74
+ fuzzy_dl_owl2/fuzzydl/knowledge_base.py,sha256=7KcbsRRUS6rsftknzXkDZKXUvlzH9NeqSw56UI8YQqI,449486
75
75
  fuzzy_dl_owl2/fuzzydl/label.py,sha256=gh4V0LTwzucaOWoV2n4JIATjs5EbxIIdtppOZttaiw0,1187
76
76
  fuzzy_dl_owl2/fuzzydl/milp/__init__.py,sha256=g2oFT2Ge8W5Li2kP2CJjpjJ1a0PRI2vDoDdzYDsEtDY,246
77
77
  fuzzy_dl_owl2/fuzzydl/milp/expression.py,sha256=KBGIBid5kZhOT5l4buWmAtPAvm_8JfK3lUNg10GhANg,7160
@@ -162,7 +162,7 @@ fuzzy_dl_owl2/fuzzyowl2/parser/owl2_xml_parser.py,sha256=qbx6SsrYUdDOn1-qClq-0EC
162
162
  fuzzy_dl_owl2/fuzzyowl2/util/__init__.py,sha256=4qG4CwkdYoT0vh3uX9N8DlmXh4QfKimVUqR4h2DR8Gg,50
163
163
  fuzzy_dl_owl2/fuzzyowl2/util/constants.py,sha256=Oev5Q-H4mhmdvV3nrp0fZKZx8jpo9beXjJwm0dfDUSc,6970
164
164
  fuzzy_dl_owl2/fuzzyowl2/util/fuzzy_xml.py,sha256=iYAodtBkZYt3cOvMBA0VEMOU87ljb-06_aUfH14gvwE,3416
165
- fuzzy_dl_owl2-1.0.8.dist-info/LICENSE,sha256=er4Z7Ju3OzYUG5mbhh0krYVegIuv4PgehMzihVb2wpc,20131
166
- fuzzy_dl_owl2-1.0.8.dist-info/METADATA,sha256=G8aFZIYWtLlCLW7wIYyYyECzzLRSfaATIK42YGLjHKk,43338
167
- fuzzy_dl_owl2-1.0.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
168
- fuzzy_dl_owl2-1.0.8.dist-info/RECORD,,
165
+ fuzzy_dl_owl2-1.0.9.dist-info/LICENSE,sha256=er4Z7Ju3OzYUG5mbhh0krYVegIuv4PgehMzihVb2wpc,20131
166
+ fuzzy_dl_owl2-1.0.9.dist-info/METADATA,sha256=4ZAdUZlkFAlvimwzfmr2c6nwNElsiKGE8x4Ai7l4nI4,43763
167
+ fuzzy_dl_owl2-1.0.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
168
+ fuzzy_dl_owl2-1.0.9.dist-info/RECORD,,