引自http://hi.baidu.com/wxmsona/blog/item/8e1db7a9aac6d3bacb130cc0.html
下面是家族族谱的推理规则文件,其中都是自己臆想出来的,其中必有许多疏漏和不足之处
都是前向规则,没有完全掌握后向推理规则(刚学),希望有高手继续步进!!!
family.rules:
@prefix fa: <http://www.semanticweb.org/ontologies/2010/0/family.owl #>. @include <RDFS>. @include <OWL>. [rule1: (?a fa:hasHusband ?b)(?a fa:isMotherOf ?c)->(?b fa:isFatherOf ?c)] [rule2: (?a fa:hasHusband ?b)(?a fa:hasDaughter ?c)->(?b fa:isFartherOf ?c)] [rule3: (?a fa:hasHusband ?b)(?a fa:hasDaughter ?c)->(?b fa:hasDaughter ?c)] [rule4: (?a fa:hasHusband ?b)(?a fa:hasDaughter ?c)->(?c fa:hasFather ?b)] [rule5: (?a fa:hasHusband ?b)(?a fa:hasDaughter ?c)->(?c fa:isDaughterOf ?b)] [rule6: (?a fa:hasHusband ?b)(?a fa:hasSon ?c)->(?b fa:isFatherOf ?c)] [rule7: (?a fa:hasHusband ?b)(?a fa:hasSon ?c)->(?b fa:hasSon ?c)] [rule8: (?a fa:hasHusband ?b)(?a fa:hasSon ?c)->(?c fa:hasFather ?b)] [rule9: (?a fa:hasHusband ?b)(?a fa:hasSon ?c)->(?c fa:isSonOf ?b)] [rule10:(?a fa:hasWife ?b)(?a fa:isFatherOf ?c)->(?b fa:isMotherOf ?c)] [rule11:(?a fa:hasWife ?b)(?a fa:haDaughter ?c)->(?b fa:isMotherOf ?c)] [rule12:(?a fa:hasWife ?b)(?a fa:haDaughter ?c)->(?b fa:hasDaugher ?c)] [rule13:(?a fa:hasWife ?b)(?a fa:haDaughter ?c)->(?c fa:hasMother ?b)] [rule14:(?a fa:hasWife ?b)(?a fa:haDaughter ?c)->(?c fa:isDaughterOf ?b)] [rule15:(?a fa:hasWife ?b)(?a fa:hasSon ?c)->(?b fa:isMotherOf ?c)] [rule16:(?a fa:hasWife ?b)(?a fa:hasSon ?c)->(?b fa:hasSon ?c)] [rule17:(?a fa:hasWife ?b)(?a fa:hasSon ?c)->(?c fa:hasMother ?b)] [rule18:(?a fa:hasWife ?b)(?a fa:hasSon ?c)->(?c fa:isSonOf ?b)] [rule19:(?a fa:hasWife ?b)->(?a fa:isHusbandOf ?b)] [rule20:(?a fa:hasHusband ?b)->(?a fa:isWifeOf ?b)] [rule21:(?a fa:isHusbandOf ?b)->(?a fa:hasWife ?b)] [rule22:(?a fa:isWifeOf ?b)->(?a fa:hasHusband ?b)] [rule23:(?a fa:hasFather ?b) (?c fa:hasFather ?d) (?b fa:hasBrother ?d) notEqual(?b,?d)->(?a fa:hasCousin ?b)] [rule24:(?a fa:hasFather ?b)(?c fa:hasFather ?d)(?b fa:hasFather ?e)(?d fa:hasFather ?e) notEqual(?b,?d)->(?a fa:hasCousin ?c)] [rule25:(?a fa:hasSon ?b)(?b fa:hasSon ?c)->(?a fa:hasGrandSon ?c)] [rule26:(?a fa:hasSon ?b)(?b fa:hasDaughter ?c)->(?a fa:hasGrandDaughter ?c)] [rule27:(?a fa:hasFather ?b)(?b fa:hasBrother ?c)->(?a fa:hasUncle ?c)] [rule28:(?a fa:hasFather ?b)(?b fa:hasSister ?c)->(?a fa:hasAunt ?c)] [rule29:(?a fa:hasGrandSon ?b)->(?b fa:isGrandSonOf ?a)] [rule30:(?a fa:hasAunt ?b)->(?b fa:isAuntOf ?a)] [rule31:(?a fa:hasFather ?b)->(?b fa:isFatherOf ?a)] [rule32:(?a fa:hasMother ?b)->(?b fa:isMotherOf ?a)] [rule33:(?a fa:hasBrother ?b)->(?b fa:isBrotherOf ?a)] [rule34:(?a fa:hasSister ?b)->(?b fa:isSisterOf ?b)] [rule35:(?a fa:hasCousin ?b)->(?b fa:isCousinOf ?a)] [rule36:(?a fa:hasSon ?b)->(?b fa:isSonOf ?a)] [rule37:(?a fa:hasDaughter ?b)->(?b fa:isDaughterOf ?a)] [rule38:(?a fa:hasGrandDaughter ?b)->(?b fa:isGrandDaughterOf ?a)] [rule39:(?a fa:hasWife ?b)->(?b fa:isWifeOf ?a)] [rule40:(?a fa:hasHusband ?b)->(?b fa:isHusbandOf ?a)] [rule41:(?a fa:hasUncle ?b)->(?b fa:isUncleOf ?a)] |
下面是家族族谱ObjectProperty属性图: