IWn3 Integrating CWM with Inference Web


Table of Contents

1. Introduction
1.1 Tasks
2. Features
3. Examples
3.1 Example1: one step justification
3.2 Scenario3: more evidences
4. Issues
4.1 Unresolved Issues
5. Links


1. Introduction

Tasks


2. Features


3. Examples

resources:

3.1 Example1: justified arrest

3.2 Scenario3: more evidences


4. Issues

Unresolved issues

  1. Huge Conclusion
    1. Problem: some conclusion are huge for display purpose. This case is observed when a conclusion trying to reference a big background knowledge base that hosts many formula.
    2. observations
      scenario3.proof actually host the following information
          (a). justification trace (proof, conjunction, inference, extraction, parsing)    e.g. foo:ns_g402
          (b). justification trace (facts)    e.g.  foo:_g33     a pr:Fact; pr:gives {....} .
          (c). formula definition (kb)       e.g. {formula-blah} pr:representedBy foo:_g2; = = foo:_g0,... g_26 .
      1. pr:Fact is a new concept to the reason ontology !  How and why it is there? It looks very like assumption since it does not have pr:source !
      2. However, the current PML can only represent (a) and (b) because (c) is essentially a reference of background KB which is not asserted in conclusion.
      3. Do we need to differentiate pr:Fact (obtained from KB?)  from pr:Parsing (extracted from KB?) ? As far as I know, the latter has additional SourceUsage while the former is directly assumed. I can see two types of translation
           (i) if pr:Fact is assumption. Then we can translated it into a node set without inference step.
           (ii) if pr:Fact is truth. then we may stick to current translation (Direct assertion without source usage).
      4. (c) requires higher order logic: we are making assertions about an RDF graph.
      5. In general IW Browser should not attempt to understand N3 file or
    3. solution 1: Lalana
      1. add new properties to associate node set with a mapping from variable to a formula.
      2. e.g.  _g11 a iw:NodeSet;   iw:usesFormula   { [] a iw:Formula; iw:hasFormula "blah",  iw:hasVariable "blah"}.
      3. cons:  the size of file remains huge; the semantics of mapping is specific to N3 only
    4. solution 2: Li - source usage
      1. citing an N3 document that host the definition of the formula using source usage.
        1. We don't need to embed the huge-formula in PML conclusion and we can always use an URI to reference a formula; therefore, the conclusion can be as simple as
                     foo:_g2     a :TamiData .  
            where foo:_g2 is an URI whose absolute URI is http://people.csail.mit.edu/lkagal/scenario3.proof#_g2
            When parsing this N3 conclusion, a N3 parse may decide retrieve related data from http://people.csail.mit.edu/lkagal/scenario3.proof, thus find one asserted fact.
            {  huge-formula-blah... } pr:representedBy foo:_g2;

        1.1 I also noticed that the N3 file http://people.csail.mit.edu/lkagal/scenario3.proof is not N3-rdf syntax, i.e. it cannot be parsed by Jena N3 reader.
        This solution assume the existence of scenario3.proof, which embed the fact/formula in proof. Is it a good practice?

        1.2 we may even generate an N3-ref document for each huge formula, and add one more statement
            <document-URI>   log:semantics  foo:_g2
           to each conclusion.
        Note that each huge formula is valid N3-rdf (CWM did a good job, but I'm still having problems parsing it using Jena).
        Example N3 formula:  http://iw.stanford.edu/doc/project/tami/test/huge-conclusion-kb-g2.n3
        RDF/XML generated by CWM:  http://iw.stanford.edu/doc/project/tami/test/huge-conclusion-kb-g2.rdf

        2. In order to access the embedded huge-formula, we may specify SourceUsage:

            <iw:InferenceStep rdf:about="#is__g419">
                <iw:hasAntecedent rdf:resource="#ns__g465"/>
                <iw:hasInferenceEngine rdf:resource="http://inferenceweb.stanford.edu/registry/IE/CWM.owl#CWM"/>
                <iw:hasRule rdf:resource="http://inferenceweb.stanford.edu/registry/DPR/Extraction.owl#Extraction"/>
                <iw:hasSourceUsage rdf:parseType="Resource">
                    <rdf:type rdf:resource="http://inferenceweb.stanford.edu/2004/07/iw.owl#SourceUsage"/>
                    <iw:hasSource rdf:resource="http://people.csail.mit.edu/lkagal/scenario3.proof#_g2"/>
                    <iw:usageTime rdf:resource="cwm-pml.n3#NOW_T"/>
                </iw:hasSourceUsage>
            </iw:InferenceStep>

        Here, http://people.csail.mit.edu/lkagal/scenario3.proof#_g2 is the source document that stores the embedded formula.
        This approach enables users access the embedded formula by viewing the source data.
        Therefore, we don't need to add iw:usesFormula, iw:Formula, iw:hasVariable, ...

        I have generated an example file
            http://iw.stanford.edu/doc/project/tami/test/tami-scenario3-pml-en.rdf#ns__g415
        more links and screen dumps can be found at 
            http://iw.stanford.edu/doc/project/tami/#Scenario3
        you may browse it using the prototype PML browser too.
           http://logos.cs.umbc.edu:8080/iw/pmlbrowser?sourceURI=http%3A%2F%2Fiw.stanford.edu%2Fdoc%2Fproject%2Ftami%2Ftest%2Ftami-scenario3-pml-en.rdf%23ns__g415
         

        3. how to generate the PML
        the following changes need to be made in the translation rule: cwm-pml.n3.

        { ?NODESET iw:isConsequentOf ?C; rea:step ?S.
          ?S rea:gives ?G.
          FORMULA rea:representedBy VAR.
          ?G log:includes { VAR [] [] }.
          FORMULA log:n3String ?str.
        #} => { ?NODESET iw:usesFormula [ a iw:Formula; iw:hasVariable VAR; iw:hasFormula ?str ] }.
        }=> { ?C iw:hasSourceUsage [
           a iw:SourceUsage;
           iw:hasSource VAR;
           iw:usageTime ?NOW_T
          ]
        }. 

        { ?NODESET iw:isConsequentOf ?C; rea:step ?S.
          ?S rea:gives ?G.
          FORMULA rea:representedBy VAR.
          ?G log:includes { [] [] VAR }.
          FORMULA log:n3String ?str.
        #} => { ?NODESET iw:usesFormula [ a iw:Formula; iw:hasVariable VAR; iw:hasFormula ?str ] }.
        }=> { ?C iw:hasSourceUsage [
           a iw:SourceUsage;
           iw:hasSource VAR;
           iw:usageTime ?NOW_T
          ]
        }. 

        #{ FORMULA rea:representedBy VAR.
        #  ?NODESET iw:usesFormula [ a iw:Formula; iw:hasVariable VAR; iw:hasFormula ?str ].
        #  FORMULA fromFile FILE.
        #} => { ?NODESET iw:usesFormula
        #    [ a iw:Formula; iw:hasVariable VAR; iw:hasFormula ?str; iw:fromFile FILE ]
        #}.
        { FORMULA rea:representedBy VAR.
          ?X iw:hasSource VAR .
          FORMULA fromFile FILE.
        } => { ?X iw:hasSource FILE}.
      2. pros:
        1. an N3 processor may parse the URI of a formula and then fetch the KB from another N3 file.
        2. no changes need to be made in current IW brwoser.
      3. cons:
        1. confusing semantics:  the conclusion is not derived from the source document, but uses some data from the source document!
        2. the SourceUsage is tied to InferenceStep, but the conclusion maybe shared by multiple Inference Step
    5. solution 3: citing KB
      1. provide the option to attach a conclusion.
        If the end user need but cannot extract the definition of a formula from the the formula's URI,  we may consider using two variations of Lalana's approach:
                 (i) embedded approach:  add iw:hasConclusionKBcontent   which points to an n3 string
                                   e.g. <nodeset-URI>   iw:hasConclusionKBcontent   "@prefix... {formula-blah} pr:representedBy foo:_g2 ."^^XSD.string
                 (ii) reference approach:  add iw:hasConclusionKBImports   which points to a N3 document
                                   e.g. <nodeset-URI>   iw:hasConclusionKBImports   <KB-file-URI>
                                we also need to generate one online document that stores all the background knowledge.
      2. pros: the semantics is clear
      3. cons: (i) we need to update IW Browser.

Pending Issues

  1. translation rules for rea:Extraction

    1. Problem:  rea:Extraction conveys "AND elimination" semantics. In scenario3, it is used with rea:Parsing (extracting knowledge from document) and rea:Inference (generalized Modus Ponens). The current practice that "translating rea:Extraction to iw:DirectAssertion" is not appropriate because rea:Extraction may have rea:Inference as  antecedent.
    2. Solution:
      • proposed by Li
      • status: request for comments
      • justification: we should treat the combinations (i) rea:Extraction+rea:Parsing and (ii) rea:Extraction+rea:Inference differently. For the former combination, rea:Parsing does not have conclusion asserted by rea:gives, so we may combine the two steps  into one node set and use iw:SourceUsage and iw:DirectAssertion. For the latter combination, rea:Extract should be preserved, and the inference rule is "AND elimiation" (i.e., "Extraction"). Therefore, both steps are retained as two separate node sets.
      • suggested action: modify cwm-pml.n3
        #### Parsing step
        { ?S a rea:Extraction; rea:because ?X.
        ?X a rea:Parsing; rea:source ?Y.
        ?NODESET rea:step ?S; iw:isConsequentOf ?C.
        "" time:localTime ?NOW.
        (?NOW dt:dateTime) log:dtlit ?NOW_T.
        } => { ?C iw:hasRule <http://inferenceweb.stanford.edu/registry/DPR/Told.owl#Told>;
        iw:hasSourceUsage [
        a iw:SourceUsage;
        iw:hasSource ?Y;
        iw:usageTime ?NOW_T
        ] }.

        { ?S a rea:Extraction; rea:because ?X; rea:gives ?G.
        ?X a rea:Inference.
        ?G log:n3String ?str.
        ?NODESET1 rea:step ?S; iw:isConsequentOf ?C1.
        ?NODESET2 rea:step ?X.
        } => { ?C1 iw:hasAntecedent ?NODESET2; iw:hasRule <http://inferenceweb.stanford.edu/registry/DPR/Extraction.owl#Extraction> .
        ?NODESET2 iw:hasConclusion ?str;
        iw:hasLanguage <http://inferenceweb.stanford.edu/registry/LG/N3.owl#N3> }.

        ### Extraction step
        #{ ?NODESET iw:isConsequentOf ?C; rea:step ?S.
        # ?S a rea:Extraction
        #} => { ?C iw:hasRule <http://inferenceweb.stanford.edu/registry/DPR/Told.owl#Told> }.

  2. N3 translator

    1. Problem: we don't have an automated tool that translate N3 statements into English
    2. Solution:
      1. proposed by Li
      2. status: request for comments
      3. justification: It might be the best that add this feature to CWM since it has log:n3string feature. However, it is doable in IWBrowser as well. I have written a simple program that help generating English strings, and you can see the result in Examples section.
      4. actions: create some translation rules
        • remove all prefix declaration
        • translate "a" (keyword in N3) to "[is an instance of]"
        • translate ";" (separator of properties in N3)  to "[ and ]"
        • ... anything else?

 


5.Links


This is a joint work between W3C and KSL. This page is maintained by Li Ding. Page last updated 07/05/2006