[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Generating New Knowledge by Deductive Reasoning usingSchem

  • From: rjelliffe <rjelliffe@allette.com.au>
  • To: <stephengreenubl@gmail.com>
  • Date: Sun, 21 Nov 2010 22:45:54 +1100

Re:  Generating New Knowledge by Deductive Reasoning usingSchem
 On Fri, 19 Nov 2010 14:56:35 +0000, Stephen Green 
 <stephengreenubl@gmail.com> wrote:
> A very nice example, Roger. Maybe what would make it look more
> useful would be to demonstrate how to chain the deductions so that
> the deductions can themselves add to the 'knowledge' and further
> deductions be made based on those initial deductions. This might then
> provide an improved parallel methodology to the more typical OWL
> or RDF knowledge-base / triple-store / inference-engine approach.
>

 Just use the <sch:let> expressions more. You can have arbitrarily long 
 chains of deductions, and pull all the logic out of the assert or report 
 tests.

 <sch:let name="speeder-driversLicenseNumber" value="."/>

 <sch:let name="GunLicense"
 value="for $i in 
 collection('GunLicenseFolder?select=*.xml;recurse=yes;on-error=ignore')
 return $i/GunLicense[.//Person/driversLicenseNumber eq 
 $speeder-driversLicenseNumber]"/>

 <sch:let name="matching-drivers-license" 
 value="$speeder-driversLicenseNumber eq
 $GunLicense//Person/driversLicenseNumber" />

 <sch:let name="matching-gun" 
 value="$GunLicense/registeredGun/Gun/serial eq
 doc('Robbery.xml')/RobberyEvent/evidence/Gun/serial" />

 <sch:let name="has-gun-license"  value="count($GunLicense) eq 1"/>

 <sch:let name="only-person-licensed"  value="count($GunLicense//Person) 
 eq 1" />

 <sch:let name="is-bad-guy"  value="$matching-drivers-license and 
 $matching-gun and $has-gun-license and $only-person-licensed" />

 <sch:let name="is-our-bad-guy"  value="parent::Person/child::name = 
 document('licensed-to-kill.xml')/agents/agent/name "/>

 <sch:report test="$is-bad-guy  and not( $is-our-bad-guy)" >
 Therefore, <sch:value-of select="parent::Person/child::name"/> is the 
 Robber.
 </sch:report>


 So you can add extra deductions on the same subject.  (The let 
 expressions are scoped to schema, pattern, or rules, but I don't know 
 that this is a disadvantage.)

 Another way to approach this is neural net fashion: you have one 
 Schematron schema generating individual deductions, then subsequent 
 schemas as layers generating deductions based on the results of layer 
 before (eg the SVRL output.)  (Schematron supports an attribute "flag" 
 to help declare the found properties of a pattern/rule/assertion too 
 (such as "incomplete data" or "security risk found".)  You can 
 physically combine the patterns for the different layers into the same 
 text file using the phases mechanism, if appropriate too. (Of course, 
 command-line parameterization has been available for the last decade 
 with Schematron, however a WWW technology may be more interested in 
 configuration from XML documents at some URLs rather than just command 
 line arguments.)

 By the way, there has been a version of Schematron that operated on RDF 
 not XML: Schemarama used the Squish query language. However, I imagine 
 that there are a lot of research tools available for RDF.

 Cheers
 Rick Jelliffe



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.