Presentation is loading. Please wait.

Presentation is loading. Please wait.

ece 720 intelligent web: ontology and beyond

Similar presentations


Presentation on theme: "ece 720 intelligent web: ontology and beyond"— Presentation transcript:

1 ece 720 intelligent web: ontology and beyond
lecture 17: semantic web rules

2 logic importance high-level language for expressing knowledge
high expressive power well-understood formal semantics precise notion of logical consequence systems that can automatically derive statements syntactically from a set of premises ece 720, winter ‘12

3 logic importance (2) proof systems for which semantic logical consequence coincides with syntactic derivation within the proof system soundness & completeness predicate logic is unique in the sense that sound and complete proof systems do exist not the case for more expressive logics (higher-order logics) ece 720, winter ‘12

4 logic importance (3) trace the proof that leads to a logical consequence logic can provide explanations for answers by tracing a proof ece 720, winter ‘12

5 specializations of logic RDF and OWL
RDF/S and OWL (Lite and DL) are specializations of predicate logic – they correspond (roughly) to a description logic they define reasonable subsets of logic trade-off between the expressive power and the computational complexity (the more expressive the language, the less efficient the corresponding proof systems) ece 720, winter ‘12

6 specializations of logic Horn logic
a rule has the form: A1, . . ., An  B Ai and B are atomic formulas ece 720, winter ‘12

7 specializations of logic Horn logic
there are two ways of reading such a rule deductive if A1,..., An are known to be true, then B is also true reactive if the conditions A1,..., An are true, then carry out the action B ece 720, winter ‘12

8 logic: description vs Horn OWL vs rules
it is impossible to assert that a person X who is brother of Y is uncle of Z (where Z is child of Y) in OWL this can be done easily using rules: brother(X,Y), childOf(Z,Y)  uncle(X,Z) ece 720, winter ‘12

9 logic: description vs Horn OWL vs rules (2)
rules cannot assert the information that a person is either a man or a woman this information is easily expressed in OWL using disjoint union OWL needs rules !!! ece 720, winter ‘12

10 rule languages rule languages define how to synthesize new facts form those stored in the knowledge base rule markup language – RuleML semantic web rule language - SWRL ece 720, winter ‘12

11 rule markup language RuleML
effort to standardize inference rules RuleML is a markup language for publishing and sharing rule bases on the World Wide Web focus is on rule interoperation between industry standards provides an XML syntax for Datalog clauses ece 720, winter ‘12

12 rule markup language Datalog
its alphabet is a set of predicate symbols, constants, and variables atom – is an expression of the form P(t1, t2, … , tn), where P is an n-ary predicate symbol and t1, …, tn are terms term – is a variable or constant ece 720, winter ‘12

13 rule markup language Datalog – examples
(1): book(“Semantic Web”, “U.K.”, “2007”) (2): book(title, counry, “2005”) ece 720, winter ‘12

14 rule markup language Datalog – clause
clause is either a fact or a rule fact is an expression of the form B where B is a variable-free atom rule is an expression of the form A1, …, Am  C where A1, …, Am atoms are called antecedents, C atom is called the consequent or head ece 720, winter ‘12

15 rule markup language Datalog – example
(3): book(x, “U.K.”, y)  UKbook(x) ece 720, winter ‘12

16 rule markup language RuleML – example (1)
book(“Semantic Web”, “U.K.”, “2007”) <Atom> <Rel>book</Rel> <Ind>Semantic Web</Ind> <Ind>U.K.</Ind> <Ind>2007</Ind> </Atom> ece 720, winter ‘12

17 rule markup language RuleML – example (2)
book(tilte, country, “2005”) <Atom> <Rel>book</Rel> <Var>title</Var> <Var>country</Var> <Ind>2007</Ind> </Atom> ece 720, winter ‘12

18 rule markup language RuleML – example (3)
book(x, “U.K.”, y)  UKbook(x) <Implies> <head> <Atom> <Rel>UKbook</Rel> <Var>x</Var> </Atom> </head> ece 720, winter ‘12

19 rule markup language RuleML – example (3) continuation
<body> <Atom> <Rel>book</Rel> <Var>x</Var> <Ind>U.K.</Ind> <Var>y</Var> </Atom> </body> </Implies> ece 720, winter ‘12

20 SWRL SWRL is an acronym for Semantic Web Rule Language
SWRL is intended to be the rule language of the Semantic Web SWRL is based on OWL: all rules are expressed in terms of OWL concepts (classes, properties, individuals, literals...). ece 720, winter ‘12

21 SWRL atoms (predicates)
C(x) C is an OWL class P(x,y) P is an OWL predicate sameAs(x,y) sameAs belongs to the OWL differentFrom(x,y) differentFrom belongs to the OWL vocabulary builtIn(r,x,…) r is a built-in relation x,y – are either variables, individuals, or data values ece 720, winter ‘12

22 SWRL example (1) from Datalog
book(“Semantic Web”, “U.K.”, “2007”) Book(B) title(B,”Semantic Web”) countryOfPub(B,”U.K”) yearOfPub(B,”2007”) ece 720, winter ‘12

23 SWRL atoms (predicates)
differences to Datalog atoms are only unary or binary predicates (no restrictions in RuleML) OWL class descriptions can be viewed as unary predicates (nothing like that in RuleML) ece 720, winter ‘12

24 SWRL atoms (predicates) – 1
C(x) C is an OWL class holds iff x is an individual of the class description or data range C Person(John) Person(?x) ece 720, winter ‘12

25 SWRL atoms (predicates) – 2
P(x,y) P is an OWL predicate holds iff x is related to y by property P hasBrother(John, Bill) hasBrother(John, ?y) hasBrother(?x, ?y) ece 720, winter ‘12

26 SWRL atoms (predicates) – 3
sameAs(x,y) sameAs belongs to the OWL vocabulary holds iff x is interpreted as the same object y sameAs(?x, ?y) ece 720, winter ‘12

27 SWRL atoms (predicates) – 4
differentFrom(x,y) differentFrom belongs to the OWL vocabulary holds iff x and y are interpreted as different objects differentFrom(?x, ?y) ece 720, winter ‘12

28 SWRL atoms (predicates) – 5
builtIn(r,x,…) r is a built-in relation holds iff the built-in relation r holds for the interpretations of the arguments swrlb:greaterThan(?x,?y) (builtIn(greaterThan,?x,?y)) swrlb:startsWith(?x, "+") ece 720, winter ‘12

29 SWRL rule example – reclassification
Man(?m) → Person(?m) ece 720, winter ‘12

30 SWRL rule example – property value assignment
Person(?p) hasSibling(?p, ?s) Man(?s) hasBrother(?p, ?s) ece 720, winter ‘12

31 SWRL rule example – named individuals
Person(Fred) hasSibling(Fred, ?s) Man(?s) hasBrother(Fred, ?s) ece 720, winter ‘12

32 SWRL rule example – with individuals & literals
Person(Fred) hasSibling(Fred, ?s) Man(?s) hasAge(?s, 40) has40YearOldBrother(Fred, ?s) ece 720, winter ‘12

33 SWRL rule example – with built-ins
hasBrother(?x1,?x2) hasAge(?x1,?age1) hasAge(?x2,?age2) swrlb:greaterThan(?age2,?age1) hasOlderBrother(?x1,?x2) ece 720, winter ‘12

34 SWRL rule example – with built-ins (2)
hasBrother(?x1,?x2) hasAge(?x1,?age1) hasAge(?x2,?age2) swrlb:subtract(10,?age2,?age1) hasDecadeOlderBrother(?x1,?x2) ece 720, winter ‘12

35 SWRL characteristics W3C Submission in 2004
rules saved as part of ontology increasing tool support: Bossam, R2ML, Hoolet, Pellet, KAON2, RacerPro, SWRLTab can work with reasoners ece 720, winter ‘12


Download ppt "ece 720 intelligent web: ontology and beyond"

Similar presentations


Ads by Google