Hans Chalupsky | 1 Dec 2005 02:57
Picon
Favicon

Re: forward-chaining issue

Dear Pan Xingzhi,

yes, the PowerLoom forward chainer only considers rules with simple
antecedents and rules with complex antecedents that are marked as
`:forward-only? TRUE'.  You can of course get the answer you are
looking for by using backward inference via `ask':

STELLA(163): (all-facts-of com1)
(|P|(COMPANY COM1) |P|(NUMBER-OF-MANAGERS COM1 10) |P|(NUMBER-OF-EMPLOYEES COM1 50))
STELLA(164): (ask (small-company com1))
TRUE
STELLA(165): 

The division of labor between forward and backward chaining is
primarily a performance issue, since depending on fanout, some rules
are much more efficiently run forward than backward and vice versa.
You can help PowerLoom by annotating which rules you want to run
forward and which ones backwards only.

For example, if you want this to be added with the forward-chainer,
you can mark the rule as "forward-only" with the `=>>' notation:

STELLA(165): (assert
               (forall ?c
                 (=>> (and (number-of-employees ?c 50)
                           (number-of-managers ?c 10))
                      (small-company ?c))))
|P|(FORALL (?c)
   (=>> (AND (NUMBER-OF-EMPLOYEES ?c 50) (NUMBER-OF-MANAGERS ?c 10))
       (SMALL-COMPANY ?c)))
(Continue reading)

Xingzhi Pan | 6 Dec 2005 08:37
Picon

Re: forward-chaining issue

Thanks very much. It's clear now.

2005/12/1, Hans Chalupsky <hans <at> isi.edu>:
> Dear Pan Xingzhi,
>
> yes, the PowerLoom forward chainer only considers rules with simple
> antecedents and rules with complex antecedents that are marked as
> `:forward-only? TRUE'.  You can of course get the answer you are
> looking for by using backward inference via `ask':
>
> STELLA(163): (all-facts-of com1)
> (|P|(COMPANY COM1) |P|(NUMBER-OF-MANAGERS COM1 10) |P|(NUMBER-OF-EMPLOYEES COM1 50))
> STELLA(164): (ask (small-company com1))
> TRUE
> STELLA(165):
>
> The division of labor between forward and backward chaining is
> primarily a performance issue, since depending on fanout, some rules
> are much more efficiently run forward than backward and vice versa.
> You can help PowerLoom by annotating which rules you want to run
> forward and which ones backwards only.
>
> For example, if you want this to be added with the forward-chainer,
> you can mark the rule as "forward-only" with the `=>>' notation:
>
> STELLA(165): (assert
>                (forall ?c
>                  (=>> (and (number-of-employees ?c 50)
>                            (number-of-managers ?c 10))
>                       (small-company ?c))))
(Continue reading)

Xingzhi Pan | 6 Dec 2005 08:51
Picon

OWL support

I'm doing a little work with PowerLoom-OWL conversion, and may have a
series of questions in a few days :)

Some parts of them are easy, but when I was going to export the data
in PL into an OWL KB, I can't find a way to do things like "acquire
all the concepts from the PL KB". At present I'm using
Module.allSymbols, however it's still hard to tell what the returned
Stella_Object is (concept, relation, etc).

I'm wondering if there's a more elegant method to achieve that. Thanks a lot.
--
Pan Xingzhi
Hans Chalupsky | 7 Dec 2005 04:03
Picon
Favicon

Re: OWL support

Hi,

you should use the functions in the PLI (PowerLoom interface) package
for this purpose (they are documented in the manual).  For example, to
find concepts you look for instances of the class CONCEPT.  In Lisp:

STELLA(10): (consify (pli:s-get-concept-instances "CONCEPT" "PL-USER" NULL))
(|c|FLOAT |c|MODULE |c|USER-THING |c|INTERVAL-CACHE |c|INTEGER |c|PROPOSITION |c|CONTEXT
 |c|STRING |c|BINARY-RELATION |c|FRAME-PREDICATE ...)
STELLA(11): 

You can then use other PLI functions to figure out what module the
concepts are in, their name, etc.

Tom Russ has written some preliminary OWL translation support which
should help with this task as well (once we release it :-)

Hans

>>>>> Xingzhi Pan <vengeance.storm <at> gmail.com> writes:

> I'm doing a little work with PowerLoom-OWL conversion, and may have a
> series of questions in a few days :)

> Some parts of them are easy, but when I was going to export the data
> in PL into an OWL KB, I can't find a way to do things like "acquire
> all the concepts from the PL KB". At present I'm using
> Module.allSymbols, however it's still hard to tell what the returned
> Stella_Object is (concept, relation, etc).

(Continue reading)

Xingzhi Pan | 14 Dec 2005 02:31
Picon

failure with RANGE-MIN-CARDINALITY

Hello,
My assignment to RANGE-MIN-CARDINALITY is effectless:
|= (defconcept Person)

|c|PERSON

|= (defrelation rel ((?p1 Person)(?p2 Person)))

|r|REL

|= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))

Processing check-types agenda...
There is 1 solution:
  #1: ?X=0

|= (assert (RANGE-MIN-CARDINALITY rel Person 1))

|P|(= (RANGE-MIN-CARDINALITY REL PERSON) 1)

|= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))

There is 1 solution:
  #1: ?X=0

But RANGE-MAX-CARDINALITY DID work as I've expected. Anyone has ideas
about this? Thanks a lot.

--
Pan Xingzhi
(Continue reading)

Thomas Russ | 14 Dec 2005 17:55
Picon
Favicon

Re: failure with RANGE-MIN-CARDINALITY


On Dec 13, 2005, at 5:31 PM, Xingzhi Pan wrote:

> Hello,
> My assignment to RANGE-MIN-CARDINALITY is effectless:
> |= (defconcept Person)
>
> |c|PERSON
>
> |= (defrelation rel ((?p1 Person)(?p2 Person)))
>
> |r|REL
>
> |= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))
>
> Processing check-types agenda...
> There is 1 solution:
>   #1: ?X=0
>
> |= (assert (RANGE-MIN-CARDINALITY rel Person 1))
>
> |P|(= (RANGE-MIN-CARDINALITY REL PERSON) 1)
>
> |= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))
>
> There is 1 solution:
>   #1: ?X=0

This is a bug in the released version of PowerLoom.  It has been fixed
in newer versions, but we haven't yet had the time to put a release  
(Continue reading)

Xingzhi Pan | 16 Dec 2005 09:40
Picon

Re: failure with RANGE-MIN-CARDINALITY

Thanks a lot :)

2005/12/15, Thomas Russ <tar <at> isi.edu>:
>
> On Dec 13, 2005, at 5:31 PM, Xingzhi Pan wrote:
>
> > Hello,
> > My assignment to RANGE-MIN-CARDINALITY is effectless:
> > |= (defconcept Person)
> >
> > |c|PERSON
> >
> > |= (defrelation rel ((?p1 Person)(?p2 Person)))
> >
> > |r|REL
> >
> > |= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))
> >
> > Processing check-types agenda...
> > There is 1 solution:
> >   #1: ?X=0
> >
> > |= (assert (RANGE-MIN-CARDINALITY rel Person 1))
> >
> > |P|(= (RANGE-MIN-CARDINALITY REL PERSON) 1)
> >
> > |= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))
> >
> > There is 1 solution:
> >   #1: ?X=0
(Continue reading)


Gmane