@@ -132,7 +132,7 @@ def from_kg_graph(graph: Graph, node_limit: int = 100,):
132132            attributes  =  graph .query (
133133                f"""MATCH (a:{ label [0 ]}  
134134                WITH types limit { node_limit }  ).result_set 
135-             ontology .add_entity (Entity (label [0 ], [Attribute (attr [0 ][0 ], attr [0 ][1 ],  False ,  False ) for  attr  in  attributes ]))
135+             ontology .add_entity (Entity (label [0 ], [Attribute (attr [0 ][0 ], attr [0 ][1 ]) for  attr  in  attributes ]))
136136
137137        # Process each relationship type and extract attributes, limited to the specified number of nodes 
138138        for  label  in  r_labels :
@@ -143,7 +143,7 @@ def from_kg_graph(graph: Graph, node_limit: int = 100,):
143143                        attributes  =  graph .query (
144144                            f"""MATCH ()-[a:{ label [0 ]}  
145145                            WITH types limit { node_limit }  ).result_set 
146-                         ontology .add_relation (Relation (label [0 ], label_s [0 ], label_t [0 ], [Attribute (attr [0 ][0 ], attr [0 ][1 ],  False ,  False ) for  attr  in  attributes ]))
146+                         ontology .add_relation (Relation (label [0 ], label_s [0 ], label_t [0 ], [Attribute (attr [0 ][0 ], attr [0 ][1 ]) for  attr  in  attributes ]))
147147
148148        return  ontology 
149149
@@ -165,16 +165,16 @@ def add_relation(self, relation: Relation):
165165        """ 
166166        self .relations .append (relation )
167167
168-     def  to_json (self ,  include_all :  bool   =   True ) ->  dict :
168+     def  to_json (self ) ->  dict :
169169        """ 
170170        Converts the ontology object to a JSON representation. 
171171
172172        Returns: 
173173            A dictionary representing the ontology object in JSON format. 
174174        """ 
175175        return  {
176-             "entities" : [entity .to_json (include_all ) for  entity  in  self .entities ],
177-             "relations" : [relation .to_json (include_all ) for  relation  in  self .relations ],
176+             "entities" : [entity .to_json () for  entity  in  self .entities ],
177+             "relations" : [relation .to_json () for  relation  in  self .relations ],
178178        }
179179
180180    def  merge_with (self , o : "Ontology" ):
0 commit comments