Owlready2访问公理

时间:2018-04-05 17:26:15

标签: python python-3.x ontology owlready

我无法访问现有本体类的公理。我知道有些类包含了我需要的公理。例如,“冷”类包含公理:

冷⊓啤酒⊑正面,

冷⊓比萨⊑否定

有没有办法访问这些?

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

提前致谢!

0 个答案:

没有答案