ConceptNode - possibly unbound variable or unbound variable - how to declare class/concept?

33 views
Skip to first unread message

Alex

unread,
Mar 8, 2017, 4:18:13 PM3/8/17
to opencog
Hi again!

I want to write my first rule and as far as I know I should start with declaring classes (Nodes). I want to declare class/concept Invoice. So - I try to write in guile (after loading of the usual OpenCog modules):
(ConceptNode "Invoice")
But this gives error warning "possibly unbound variable 'ConceptNode'" and error message 'Unbound variable: ConceptNode'

I receive similar warning and error when I enter the following in the guile shell:
(define InvoiceClass (ConceptNode "Invoice"))

So - what is wrong with my understanding about ConceptNode, about classes and concepts. My intuition is that I should first declare concepts before using them in BindLink or other rules. How can I define knowledge in OpenCog?

Nil Geisweiller

unread,
Mar 8, 2017, 4:22:47 PM3/8/17
to ope...@googlegroups.com
Hi,

Did you enter first

(add-to-load-path "/usr/local/share/opencog/scm")
(add-to-load-path ".")
(use-modules (ice-9 readline))
(activate-readline)
(use-modules (opencog))

?

Also, you may add that in your .guile file so you don't have to retype
it every time.

Nil
> --
> You received this message because you are subscribed to the Google
> Groups "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opencog+u...@googlegroups.com
> <mailto:opencog+u...@googlegroups.com>.
> To post to this group, send email to ope...@googlegroups.com
> <mailto:ope...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/opencog/92956591-7484-4d2a-a2db-02263f7ece5e%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/92956591-7484-4d2a-a2db-02263f7ece5e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Alex

unread,
Mar 8, 2017, 4:27:38 PM3/8/17
to opencog
Now it is better. It appears that I constanty entered line (define-module CiteauxLegal) and this somehow made guile to forget about previously loaded modules. OK, I will continute my trial and error process... Thanks.

Linas Vepstas

unread,
Mar 10, 2017, 4:55:00 AM3/10/17
to opencog
while you are defining modules, you are in a module context, and that is confusing. Best to work at the top level, and not inside of any module at all.

(for c++ this would be like calling main inside of a function ... it would just be .. weird)

On Thu, Mar 9, 2017 at 5:27 AM, Alex <alexand...@gmail.com> wrote:
Now it is better. It appears that I constanty entered line (define-module CiteauxLegal) and this somehow made guile to forget about previously loaded modules. OK, I will continute my trial and error process... Thanks.

--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages