Skip to content

Commit dd016fd

Browse files
committed
📝 add print functionality to ontologizer
1 parent 8c3af86 commit dd016fd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ontolearner/base/ontology.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ def __init__(self, language: str = 'en', base_dir: Optional[str] = None) -> None
7171
self.language = language
7272
self.base_dir = base_dir
7373

74+
def __str__(self):
75+
return (
76+
f"ontology_id: {self.ontology_id}\n"
77+
f"ontology_full_name: {self.ontology_full_name}\n"
78+
f"domain: {self.domain}\n"
79+
f"category: {self.category}\n"
80+
f"version: {self.version}\n"
81+
f"last_updated: {self.last_updated}\n"
82+
f"creator: {self.creator}\n"
83+
f"license: {self.license}\n"
84+
f"format: {self.format}\n"
85+
f"download_url: {self.download_url}\n"
86+
)
87+
7488
def from_huggingface(self):
7589
"""
7690
Download an ontology file from a Hugging Face repository.

0 commit comments

Comments
 (0)