From d726c1cdd997a1a77626e912f9a96f5bdefce33b Mon Sep 17 00:00:00 2001 From: Robin Nolte Date: Tue, 14 May 2024 18:55:38 +0200 Subject: [PATCH] Update owl_reader.py --- docs/vocab/owl_reader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/vocab/owl_reader.py b/docs/vocab/owl_reader.py index cc3e2c0d..76fb9336 100644 --- a/docs/vocab/owl_reader.py +++ b/docs/vocab/owl_reader.py @@ -60,10 +60,10 @@ def _printdict(class_obj): for obj in class_obj: if obj.comment: print(r'\appendixstyle{{{}}} {{$\sqsubseteq$ }} \textit{{{}}} {{--}} {{{}}}\\'.format( - obj.label, str(obj.superclass), str(obj.comment))) + obj.label.replace("_", "\\_"), str(obj.superclass).replace("_", "\\_"), str(obj.comment).replace("_", "\\_"))) else: print(r'\appendixstyle{{{}}} {{$\sqsubseteq$ }} \textit{{{}}}.\\'.format( - obj.label, str(obj.superclass))) + obj.label.replace("_", "\\_"), str(obj.superclass).replace("_", "\\_"))) def _get_valid_string(temp_val): @@ -108,7 +108,7 @@ def _create_class_objects(self): objects = [] for class_name in list(self.ontology.classes()): if str(class_name).startswith(self.prefix): - class_name = str(class_name).split(".")[1].replace("_", "\\_") + class_name = str(class_name).split(".")[1] class_info = self.set_class_info(class_name) objects.append(OWLClassInfo(name=class_name, label=class_info[0][0] if class_info[0] else class_name,