Capturing "Unless explcitly stated"

View: New views
3 Messages — Rating Filter:   Alert me  

Capturing "Unless explcitly stated"

by Rangarajan Krishnamoorthy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

Consider the following KB in PowerLoom:

 

(defconcept BodyPart)

(defconcept BodyRegion)

 

(defrelation part-of ((?part1 BodyPart) (?part2 BodyPart)))

(defrelation region-of ((?part BodyPart) (?region BodyRegion)))   

 

(assert (part-of abdomen trunk))

(assert (region-of abdomen abdominal-region))

 

(assert (part-of abdominal-wall abdomen))

 

At this point, I want to state a rule:

"if A is not explicitly known to be in the region-of B, then A is in the region of the part C that contains A"

 

That is, in the above KB, I want to infer:  (region-of abdominal-wall abdominal-region)

 

However, if we explicitly state the following:

(assert (region-of abdominal-wall something-else))

 

then, we should not conclude: (region-of abdominal-wall abdominal-region), but only (region-of abdominal-wall something-else)

 

I defined the following rule:

(assert

    (=> (and (region-of ?part ?region) (part-of ?another ?part))

        (region-of ?another ?region)))

 

But this does not work correctly because it allows us to infer both the following:

(region-of abdominal-wall abdominal-region)

(region-of abdominal-wall something-else)

 

How do we capture the effect of "unless stated explicitly"?

 

Regards,

Rangarajan


_______________________________________________
powerloom-forum mailing list
powerloom-forum@...
http://mailman.isi.edu/mailman/listinfo/powerloom-forum

Re: Capturing "Unless explcitly stated"

by Hans Chalupsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rangarajan,

here is what you need to do: the rule below uses two constructs that
venture outside the realm of stanrad FOL to achieve what you want:

(1) we use the `query' predicate which allows you to basically run a
retrieve inside a rule, the main purpose of which is to supply various
inference control options.  For example, in this case we supply an
inference level which will only retrieve bindings for ?r that have
been explicitly asserted.  The use of `query' is a bit esotheric, and
we should probably invent a nice meta-predicate for this common situation.

(2) we use `fail' to test that no such explicitly asserted regions
exist in the KB (this is similar to Prolog's negation by failure):

This should give you what you  want, for example:

STELLA(69): (assert (=> (and (fail (exists ?r (query (region-of ?another ?r)
                                                     :inference-level :assertion
                                                     :how-many :all)))
                             (region-of ?part ?region)
                             (part-of ?another ?part))
                        (region-of ?another ?region)))
|P|(FORALL (?another ?part ?region)
   (<= (REGION-OF ?another ?region)
       (AND (FAIL (EXISTS (?r)
                     (QUERY (REGION-OF ?another ?r) :INFERENCE-LEVEL :ASSERTION :HOW-MANY :ALL))) (REGION-OF ?part ?region) (PART-OF ?another ?part))))
STELLA(70): (ask (region-of abdominal-wall abdominal-region))
TRUE
STELLA(71): (assert (region-of abdominal-wall something-else))
|P|(REGION-OF ABDOMINAL-WALL SOMETHING-ELSE)
STELLA(72): (ask (region-of abdominal-wall abdominal-region))
UNKNOWN
STELLA(73): (retrieve all (region-of abdominal-wall ?r))
There is 1 solution:
  #1: ?R=SOMETHING-ELSE
STELLA(74):

Another way to do this would be to assert your original rule as a
default rule, e.g.,

 (presume
     (=> (and (region-of ?part ?region) (part-of ?another ?part))
         (region-of ?another ?region)))

To make this work, you'd also have to define `region-of' as a
single-valued relation to make sure an explicit assertion would
override the default conclusion.  Unfortunately, the machinery for
this in PowerLoom isn't quite working yet, so the original approach is
the way to go for now.

This case again illustrates the point that with many real domains, one
reaches the boundaries of standard logic very quickly.

Hans

--------------------------------------------------------------------------
PowerLoom home page:                 http://www.isi.edu/isd/LOOM/PowerLoom
PowerLoom forum:                                   powerloom-forum@...
PowerLoom request line:                      powerloom-forum-admin@...
KOJAK home page:                         http://www.isi.edu/isd/LOOM/kojak
STELLA home page:                       http://www.isi.edu/isd/LOOM/Stella
--------------------------------------------------------------------------

>>>>> Rangarajan Krishnamoorthy <ranga@...> writes:

> Hi,
> Consider the following KB in PowerLoom:

> (defconcept BodyPart)
> (defconcept BodyRegion)

> (defrelation part-of ((?part1 BodyPart) (?part2 BodyPart)))
> (defrelation region-of ((?part BodyPart) (?region BodyRegion)))    

> (assert (part-of abdomen trunk))
> (assert (region-of abdomen abdominal-region))

> (assert (part-of abdominal-wall abdomen))

> At this point, I want to state a rule:
> "if A is not explicitly known to be in the region-of B, then A is in the region of the part C that contains A"

> That is, in the above KB, I want to infer:  (region-of abdominal-wall abdominal-region)

> However, if we explicitly state the following:

> (assert (region-of abdominal-wall something-else))

> then, we should not conclude: (region-of abdominal-wall
> abdominal-region), but only (region-of abdominal-wall
> something-else)

> I defined the following rule:

> (assert
>     (=> (and (region-of ?part ?region) (part-of ?another ?part))
>         (region-of ?another ?region)))

> But this does not work correctly because it allows us to infer both the following:

> (region-of abdominal-wall abdominal-region)
> (region-of abdominal-wall something-else)

> How do we capture the effect of "unless stated explicitly"?

> Regards,

> Rangarajan
_______________________________________________
powerloom-forum mailing list
powerloom-forum@...
http://mailman.isi.edu/mailman/listinfo/powerloom-forum

Re: Capturing "Unless explcitly stated"

by Rangarajan Krishnamoorthy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you.

Regards,
Rangarajan

----- Original Message -----
From: "Hans Chalupsky" <hans@...>
To: "Rangarajan Krishnamoorthy" <ranga@...>
Cc: <powerloom-forum@...>
Sent: Thursday, July 03, 2008 4:28 AM
Subject: Re: Capturing "Unless explcitly stated"


> Rangarajan,
>
> here is what you need to do: the rule below uses two constructs that
> venture outside the realm of stanrad FOL to achieve what you want:
>
> (1) we use the `query' predicate which allows you to basically run a
> retrieve inside a rule, the main purpose of which is to supply various
> inference control options.  For example, in this case we supply an
> inference level which will only retrieve bindings for ?r that have
> been explicitly asserted.  The use of `query' is a bit esotheric, and
> we should probably invent a nice meta-predicate for this common situation.
>
> (2) we use `fail' to test that no such explicitly asserted regions
> exist in the KB (this is similar to Prolog's negation by failure):
>
> This should give you what you  want, for example:
>
> STELLA(69): (assert (=> (and (fail (exists ?r (query (region-of ?another
> ?r)
>                                                     :inference-level
> :assertion
>                                                     :how-many :all)))
>                             (region-of ?part ?region)
>                             (part-of ?another ?part))
>                        (region-of ?another ?region)))
> |P|(FORALL (?another ?part ?region)
>   (<= (REGION-OF ?another ?region)
>       (AND (FAIL (EXISTS (?r)
>                     (QUERY (REGION-OF ?another ?r) :INFERENCE-LEVEL
> :ASSERTION :HOW-MANY :ALL))) (REGION-OF ?part ?region) (PART-OF ?another
> ?part))))
> STELLA(70): (ask (region-of abdominal-wall abdominal-region))
> TRUE
> STELLA(71): (assert (region-of abdominal-wall something-else))
> |P|(REGION-OF ABDOMINAL-WALL SOMETHING-ELSE)
> STELLA(72): (ask (region-of abdominal-wall abdominal-region))
> UNKNOWN
> STELLA(73): (retrieve all (region-of abdominal-wall ?r))
> There is 1 solution:
>  #1: ?R=SOMETHING-ELSE
> STELLA(74):
>
> Another way to do this would be to assert your original rule as a
> default rule, e.g.,
>
> (presume
>     (=> (and (region-of ?part ?region) (part-of ?another ?part))
>         (region-of ?another ?region)))
>
> To make this work, you'd also have to define `region-of' as a
> single-valued relation to make sure an explicit assertion would
> override the default conclusion.  Unfortunately, the machinery for
> this in PowerLoom isn't quite working yet, so the original approach is
> the way to go for now.
>
> This case again illustrates the point that with many real domains, one
> reaches the boundaries of standard logic very quickly.
>
> Hans
>
> --------------------------------------------------------------------------
> PowerLoom home page:                 http://www.isi.edu/isd/LOOM/PowerLoom
> PowerLoom forum:                                   powerloom-forum@...
> PowerLoom request line:                      powerloom-forum-admin@...
> KOJAK home page:                         http://www.isi.edu/isd/LOOM/kojak
> STELLA home page:                       http://www.isi.edu/isd/LOOM/Stella
> --------------------------------------------------------------------------
>
>>>>>> Rangarajan Krishnamoorthy <ranga@...> writes:
>
>> Hi,
>> Consider the following KB in PowerLoom:
>
>> (defconcept BodyPart)
>> (defconcept BodyRegion)
>
>> (defrelation part-of ((?part1 BodyPart) (?part2 BodyPart)))
>> (defrelation region-of ((?part BodyPart) (?region BodyRegion)))
>
>> (assert (part-of abdomen trunk))
>> (assert (region-of abdomen abdominal-region))
>
>> (assert (part-of abdominal-wall abdomen))
>
>> At this point, I want to state a rule:
>> "if A is not explicitly known to be in the region-of B, then A is in the
>> region of the part C that contains A"
>
>> That is, in the above KB, I want to infer:  (region-of abdominal-wall
>> abdominal-region)
>
>> However, if we explicitly state the following:
>
>> (assert (region-of abdominal-wall something-else))
>
>> then, we should not conclude: (region-of abdominal-wall
>> abdominal-region), but only (region-of abdominal-wall
>> something-else)
>
>> I defined the following rule:
>
>> (assert
>>     (=> (and (region-of ?part ?region) (part-of ?another ?part))
>>         (region-of ?another ?region)))
>
>> But this does not work correctly because it allows us to infer both the
>> following:
>
>> (region-of abdominal-wall abdominal-region)
>> (region-of abdominal-wall something-else)
>
>> How do we capture the effect of "unless stated explicitly"?
>
>> Regards,
>
>> Rangarajan


_______________________________________________
powerloom-forum mailing list
powerloom-forum@...
http://mailman.isi.edu/mailman/listinfo/powerloom-forum