From 5117435cb73f45eb396fe9cad4cffadfb46f01ba Mon Sep 17 00:00:00 2001 From: Robin Nolte Date: Tue, 14 May 2024 18:25:01 +0200 Subject: [PATCH] Update owl_reader.py --- docs/vocab/owl_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/vocab/owl_reader.py b/docs/vocab/owl_reader.py index 887e5f2c..ab8b9b9b 100644 --- a/docs/vocab/owl_reader.py +++ b/docs/vocab/owl_reader.py @@ -21,7 +21,7 @@ def __init__(self, iri_list): self.class_objects = [] def get_classes(self): - ''' + ''' Gets the classes defined in the ontology their corresponding superclass, label and comment ''' @@ -45,7 +45,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] + class_name = str(class_name).split(".")[1].replace("_", "\\_") 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,