Alex He

...永远保持希望与激情...约会未来更强大的自己...

 

语义WEB之逻辑规则[A Semantic Web Primer阅读笔记]

1. 逻辑,特别是谓词逻辑(一阶逻辑)是知识表示的基础。

2. Specializations of Predicate Logic:RDF and OWL

描述逻辑(description logic)是谓词逻辑的子集,就像Horn子句一样,RDF/S 和 OWL (Lite and DL) 基本上可以与描述逻辑对应。

3. 描述逻辑与Horn逻辑Description Logics vs. Horn Logic

4. Monotonic vs. Non-monotonic Rules

非单调的逻辑系统的就是说来了新知识还可以改变原来的推理过程,主要是改变推理结果。

而单调的逻辑系统不能改变推理结果,如果不同的规则产生结果有冲突,那么可以采用对规则设置优先级的策略加以解决。

5. 单调规则的语法Monotonic Rules – Syntax

loyalCustomer(X), age(X) > 60 --> discount(X)

这里有几个概念:变量,常量,谓词和函数

B1, . . . , Bn --> A 称A为head,B1...BN为body.

6. 描述逻辑程序Description Logic Programs

DLP可以认为是horn逻辑和描述逻辑的综合产物,它可以使用描述逻辑的试图但是基于规则去解释。

三元组(a,p,b)可以表述为p(a,b), type(a,C)可描述为C(a), C是D的子类可表示为C(X)-->D(X)等等。

7. 语义WEB规则语言Semantic Web Rules Language (SWRL)

SWRL的规则为如下形式:B1, … , Bn --> A1, … , Am

8. 规则标记语言Rule Markup Language (RuleML)

”The discount for a customer buying a product is 7.5 percent if the customer is premium and the product is luxury.”可表示为

<Implies>

     <head>

          <Atom>

               <Rel>discount</Rel>

               <Var>customer</Var>

               <Var>product</Var>

               <Ind>7.5 percent</Ind>

          </Atom>

     </head>

     <body>

          <And>

               <Atom>

                    <Rel>premium</Rel>

                    <Var>customer</Var>

               </Atom>

               <Atom>

                    <Rel>luxury</Rel>

                    <Var>product</Var>

               </Atom>

          </And>

     </body>

</Implies>

brother(X, Y ), childOf(Z, Y ) → uncle(X,Z) 可表示为

<ruleml:Implies>

     <ruleml:head>

          <swrlx:individualPropertyAtom swrlx:property="uncle">

               <ruleml:Var>X</ruleml:Var>

               <ruleml:Var>Z</ruleml:Var>

          </swrlx:individualPropertyAtom>

     </ruleml:head>

     <ruleml:body>

          <ruleml:And>

               <swrlx:individualPropertyAtom swrlx:property="brother">

                    <ruleml:Var>X</ruleml:Var>

                    <ruleml:Var>Y</ruleml:Var>

               </swrlx:individualPropertyAtom>

               <swrlx:individualPropertyAtom swrlx:property="childOf">

                    <ruleml:Var>Z</ruleml:Var>

                    <ruleml:Var>Y</ruleml:Var>

               </swrlx:individualPropertyAtom>

          </ruleml:And>

     </ruleml:body>

</ruleml:Implies>

posted on 2013-02-21 11:09  Alex木头  阅读(732)  评论(0编辑  收藏  举报

导航