在我的本体中,我想说一个人可以根据他/她的性别赢得奖品。
我有一个“演员”类和一个“奖品”类,它有两个子类:“男奖”和“女奖”。
我以这种方式在 protege 上指定了“Actor”类:
Actor subclass of:
Actor that gender value "female" and won_prize some Female_Prizes
Actor that gender value "male" and won_prize some Male_Prizes
这是处理这个问题的正确方法吗?我不太确定。OWL 输出为:
Prefix: : <http://www.semanticweb.org/mary/ontologies/2017/4/MoviesOntology#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>
Prefix: foaf: <http://xmlns.com/foaf/0.1/>
Ontology: <http://www.semanticweb.org/mary/ontologies/2017/4/MoviesOntology>
Datatype: rdf:PlainLiteral
ObjectProperty: starred_in
ObjectProperty: won_prize
DataProperty: foaf:gender
Class: foaf:Person
Class: Actor
SubClassOf:
foaf:Person,
Actor
and (won_prize some Female_Prizes)
and (foaf:gender value "female"),
Actor
and (won_prize some Male_Prizes)
and (foaf:gender value "male"),
starred_in some Movie
Class: Female_Prizes
Class: Male_Prizes
Class: Movie