Andrew n marshall | 6 Nov 2003 23:49
Picon
Favicon

All classes for an instnace?


How do I retrieve the class sets an instance is a member of?

By example, given:
    (defconcept MyClassA)
    (defconcept MyClassB)
    (assert (and (MyClassA myInstance)
                 (isa myInstance MyClassB)))
What (retrieve?) statement could return both MyClassA and MyClassB?

Thanks.

Anm
Andrew n marshall | 7 Nov 2003 00:02
Picon
Favicon

Re: All classes for an instnace?

Nevermind... I found the type-of relation

(retrieve all (type-of ?concept myInstance))

Andrew n marshall wrote:

> 
> How do I retrieve the class sets an instance is a member of?
> 
> By example, given:
>    (defconcept MyClassA)
>    (defconcept MyClassB)
>    (assert (and (MyClassA myInstance)
>                 (isa myInstance MyClassB)))
> What (retrieve?) statement could return both MyClassA and MyClassB?
> 
> 
> Thanks.
> 
> 
> 
> Anm
> 
> _______________________________________________
> powerloom-forum mailing list
> powerloom-forum <at> isi.edu
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
Chow Ian Castor | 24 Nov 2003 05:32
Picon
Favicon

Access GUM with Powerloom

Hi. I am a new user of PowerLoom. I am doing a project on Generalized Upper 
Model.  I would like to ask is it possible to import GUM to PowerLoom? If yes, 
how? Thank you.

Ian
Hans Chalupsky | 24 Nov 2003 09:40
Picon
Favicon

Access GUM with Powerloom

The Generalized Upper Model is written in Loom, so, unless you have a
specific reason why you want to use PowerLoom I'd recomment using Loom
instead.

If you really want to use PowerLoom, you'd have to translate it into a
PowerLoom KB first.  PowerLoom has a preliminary Loom-to-PowerLoom
translator that you could use to translate the GUM ontology, however, it
will only work on fairly vanilla Loom files.  You might have to clean
them first from any Lisp-isms before this will work.

The function to call is

    (translate-loom-file "<infile>" "<outfile>")

Unfortunatly, this function is not yet a PowerLoom command (will be
fixed in an upcoming patch set) which means you can only call it
interactively in Lisp for now.  To use it in C++ or Java you'd have to
call it programmatically.

You might need to do some manual post processing on the translated
file, e.g., add a proper module definition, etc.  Once that is done
you can load it via the standard PowerLoom `load' command.

If you have more questions about Loom-to-PowerLoom translation you
might want to contact Tom Russ directly.

Hans

>>>>> Chow Ian Castor <50353784 <at> student.cityu.edu.hk> writes:

(Continue reading)


Gmane