我无法访问现有本体的类公理。我知道某些类包含我需要的公理。例如,“cold”类包含以下公理:
冷 ⊓ 啤酒 ⊑ 正能量,和
冷⊓披萨⊑负面
有没有办法访问这些?
from owlready2 import *
onto_path.append("\Path_to_owl_file")
onto = get_ontology("some_owl_file.owl")
onto = onto.load()
classes = list(onto.classes()) # Get all classes from the ontology
first_class = classes[0]
# Access axioms from this class
提前致谢!