Re: very basic question

Thomas Russ <[email protected]>
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
On Sep 22, 2004, at 9:18 AM, Leo Ferres wrote:

> Dear people;
>
> I'm new to PowerLoom, so my question is probably the most basic one
> anyone could ask, but I'd appreciate if someone could give me a hand
> with this:
>
> Suppose that:
> 	1. I have a KB in an ascii file called "myKB.ploom"
> 	2. Say myKB.ploom is in the kbs directory in powerloom
>
> Question:
> 	1. How do you load myKB.ploom? Please provide an example. I'm
> using 	(load "kbs/myKB.ploom"). Please tell me if this is incorrect.

That would generally be correct, although the exact handling
of relative pathnames is somewhat implementation dependent.
By that I mean that the starting point for the search may
depend on where in the file system you are when you start
PowerLoom.  Normally, something like that should work.

> 	2. Is there something like a relative path that I'm missing?
> 	3. When the file is loaded, is there a message saying "File
> successfully loaded"

No.  The prompt just returns.  If there is a problem, then
there will be a message.  For example:

|= (load "kbs/no-such-file.ploom")

 >> Error: File `kbs/no-such-file.ploom' does not exist.

If there is a problem reading something in the file,
then messages will also be printed.  The reason nothing
is printed in the normal case is that the LOAD function
doesn't return any value.

> 	4. When the KB is loaded, can I pose a query in the
> listener/java 	shell?

Yes.  But you may need to switch to the module (context)
in which you defined your knowledge base.  If you just
used PL-USER, then you should already be in the right place.
If you define your own module, then you would need to change
to that module.

A useful functions for setting the module is the CC function.

With no arguments, it prints the current context.  With a name
as an argument, it changes to that context.  For example:

|= (cc)

|MDL|/PL-KERNEL-KB/PL-USER


>  What would something like (retrieve) do?

Without any particular arguments, it will do nothing except
tell you that there isn't any particular context for a follow-up
retrieval.  The word "context" in the error doesn't refer to
actual CONTEXT objects, but rather to a more general notion of
the state of queries.

You would have to provide a query expression in order for
retrieve to find anything.  For example:

|=  (retrieve (concept ?x))

should retrieve any 1 concept.  Once such a query has been
issued, you can then call (retrieve) without arguments to
get successive bindings of the variable "?x".   You can also
give retrieve an argument that specifies how many answers to
return.  This can be either an integer or the keyword "all".
For example

|= (retrieve all (concept ?x))

lists all the concepts visible from your module.  This will
include not only what you defined, but the built-in ones as
well, so I'm pretty sure this will give you something back.

You can also ask questions about specific entities in your
own knowledge base.

> I hope this gives you an idea of where I'm hanging up. Any pointers to
> the documentation would be appreciated also.

http://www.isi.edu/isd/LOOM/PowerLoom/documentation/documentation.html


>
> Thanks.
>
> Leo
>
> ---
> Leo Ferres
> Post-Doctoral Fellow
> Human-Oriented Technology Lab
>
>
> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.