New Pattern Miner question

35 views
Skip to first unread message

Masayuki Hatta

unread,
Dec 18, 2018, 1:59:41 AM12/18/18
to opencog
Hi,

I'm now trying out "new" pattern miner.

"Simple" example seems to work (I guess, or not?):

$ guile -l simple.scm
GNU Guile 2.2.4
Copyright (C) 1995-2017 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (cog-mine (cog-atomspace) #minsup 2)
$1 = (SetLink
   (LambdaLink
      (VariableList
         (VariableNode "$PM-4c2b3a57")
         (VariableNode "$PM-e84bdd8")
      )
      (InheritanceLink
         (VariableNode "$PM-4c2b3a57")
         (VariableNode "$PM-e84bdd8")
      )
   )
   (LambdaLink
      (VariableNode "$PM-e84bdd8")
      (InheritanceLink
         (ConceptNode "A")
         (VariableNode "$PM-e84bdd8")
      )
   )
   (LambdaLink
      (VariableList
         (VariableNode "$PM-51de97f")
         (VariableNode "$PM-a083600")
      )
      (VariableList
         (VariableNode "$PM-51de97f")
         (VariableNode "$PM-a083600")
      )
   )
   (LambdaLink
      (VariableNode "$top-arg")
      (VariableNode "$top-arg")
   )
)

However, "ugly-male-soda-drinker" example fails. It gives the following:

Backtrace:
           5 (apply-smob/1 #<catch-closure 5654470958c0>)                     
In ice-9/boot-9.scm:
    705:2  4 (call-with-prompt _ _ #<procedure default-prompt-handle…>)       
In ice-9/eval.scm:
    619:8  3 (_ #(#(#<directory (guile-user) 56544712a140>)))                 
In ice-9/boot-9.scm:
   2312:4  2 (save-module-excursion _)
  3831:12  1 (_)
In unknown file:
           0 (_)

ERROR: Wrong type to apply: (SetLink
   (LambdaLink
      (VariableList
         (VariableNode "$PM-793e6063")
         (VariableNode "$PM-762382f3")
      )
      (AndLink
         (InheritanceLink
            (VariableNode "$PM-793e6063")
            (VariableNode "$PM-762382f3")
         )
         (InheritanceLink
            (VariableNode "$PM-793e6063")
            (ConceptNode "ugly")
         )
         (InheritanceLink
            (ConceptNode "Cason")
            (VariableNode "$PM-762382f3")
         )
      )
   )
...
(data dump continues)

I'm not sure this is a bug or my build/configuration problem (or expected behavior).  Could you give me hints?

Best regards,
MH

Nil Geisweiller

unread,
Dec 18, 2018, 3:24:20 AM12/18/18
to ope...@googlegroups.com
Hi MH,

it works for me.

There's been structure changes lately. I'd recommend that you update,
recompile and install cogutil, atomspace and opencog. Before you do so
purge the existing installed files

sudo trash /usr/local/include/opencog
sudo trash /usr/local/share/opencog
sudo trash /usr/local/lib/opencog
sudo trash /usr/share/guile/site/2.2/opencog*
sudo trash /usr/local/share/guile/site/2.2/opencog*
trash ~/.cache/guile

(replace trash by rm if you're a responsible admin, unlike me).

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/920b41d8-68f5-49c4-a4a4-d9c0dcba6856%40googlegroups.com
> <https://groups.google.com/d/msgid/opencog/920b41d8-68f5-49c4-a4a4-d9c0dcba6856%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Masayuki Hatta

unread,
Dec 18, 2018, 6:34:24 AM12/18/18
to ope...@googlegroups.com
Hi,

I'm using the latest github repo of opencog & co. as of today. I
uninstalled them, removed ~/.cache/guile, then rebuild & install them
again, but still got the same error. Hmm.

Best regards,
MH

2018年12月18日(火) 17:24 'Nil Geisweiller' via opencog <ope...@googlegroups.com>:
> You received this message because you are subscribed to a topic in the Google Groups "opencog" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/opencog/WthVjOTs4Ow/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to opencog+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/d4f95292-eeea-1f3a-844d-657f5a1519e3%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Masayuki Hatta
Associate Professor, Faculty of Economics and Management, Surugadai
University, Japan

http://about.me/mhatta

mha...@gnu.org / mha...@debian.org / mha...@opensource.jp /
hatta.m...@surugadai.ac.jp

Nil Geisweiller

unread,
Dec 18, 2018, 10:12:59 AM12/18/18
to ope...@googlegroups.com
Interesting. What is your system (OS, gcc, guile, etc)?

Nil
Reply all
Reply to author
Forward
0 new messages