About Stimulating atoms and NLP

118 views
Skip to first unread message

Vishnu Priya

unread,
Oct 13, 2016, 6:08:58 AM10/13/16
to opencog
Hello,

My idea is to give, streams of text ( i don't know what it is about) -- > NLP pipeline --> stimulate atoms --> retrieve the atoms with high STI and its related atoms and check whether any useful/important  info is obtained. Regarding this, i would like to clarify and conform few things. 

@Misgana:

  1. Can i stimulate atoms every time they have been parsed by the NLP pipeline ?  Something like this exists before?.  I just tried (nlp-parse "The sky is beautiful") then (cog-stimulate). But i did not know the exact syntax for stimulating. Is this the way it works? What if, when i load a scheme file with atoms in AS and want to stimulate? How to ensure that the atoms  with high STI are remembered/forgotten?.
  2. Feeding the atoms in AS should be in the form of relex or relex2logic  for boosting? 
  3.  It is not possible to store atoms with high attention values in DB. There is no code for doing this at this time?.  I can also never delete atoms once that are put into DB.?
  4.  I need to write a code, so that i can retrieve top ranking atoms with high STI?
@Linas: 

 I can give only the sentences which are grammatically correct into NLP Pipeline?.  So when i give  incomplete sentences say human chats  like this "MadMonkey's Jim Cramer next Weeeeeeeek investment htt brtt", it will be parsed with low confidence value. Apart from this, will it have impact on providing boost to atoms? 

Thanks and regards,
Vishnu

Misgana Bayetta

unread,
Oct 13, 2016, 7:46:00 AM10/13/16
to opencog
On Thu, Oct 13, 2016 at 6:08 PM, Vishnu Priya <vishnup...@gmail.com> wrote:
Hello,

My idea is to give, streams of text ( i don't know what it is about) -- > NLP pipeline --> stimulate atoms --> retrieve the atoms with high STI and its related atoms and check whether any useful/important  info is obtained. Regarding this, i would like to clarify and conform few things. 

@Misgana:

  1. Can i stimulate atoms every time they have been parsed by the NLP pipeline ?  Something like this exists before?.  I just tried (nlp-parse "The sky is beautiful") then (cog-stimulate). But i did not know the exact syntax for stimulating. Is this the way it works? What if, when i load a scheme file with atoms in AS and want to stimulate? How to ensure that the atoms  with high STI are remembered/forgotten?.
Currently, Here are the steps to run the ECAN system with the nlp pipeline
    - Go to opencog shell and type loadmodule libattention.so  (use full path here)
    - Type start-ecan
    -  Goto guile shell by typing scm
    -  type (nlp-start-stimulation STIMULUS_AMOUNT)    for a moderately sized atomspace I am using STIMULUS_AMOUNT to have a value of 100. What the forgetting agent currently does is removing atoms but we never really worked with it since our main focus was on the spreading, hebbian and rent collection agent which are responsible in determing the content of the attentional focus. 
  1. Feeding the atoms in AS should be in the form of relex or relex2logic  for boosting? 
There is no constraint on this. You can feed any way you want as long as you are stimulating the particular atoms of interest with the (cog-stimulate atom stimulus) function from scheme or some with an agent that runs with in the cogserver. 
  1.  It is not possible to store atoms with high attention values in DB. There is no code for doing this at this time?.  I can also never delete atoms once that are put into DB.?
Linas will answer this better.
  1.  I need to write a code, so that i can retrieve top ranking atoms with high STI?
Atoms in the attentional focus could be feteched with the (cog-af) function in scheme. It returns all atoms with STI values above the attentional focus boundary STI value. But if you are looking for ranking atoms based on their STI including atoms outside of the attentional focus, you will need to write a C++ code which calls this function https://github.com/opencog/atomspace/blob/master/opencog/atomspace/AtomSpace.h#L574 with lower and upper boundary  STI values provided.

    
After these steps, everytime you parse a sentence (eg. (nlp-parse "Hello World!") ) WordNodes and WordInstanceNodes will get stmulated with the specified amount.

You may view whats in the attentional focus and and and the attentional focus boundary with (cog-af) and (cog-af-boundary) methods respectively. There are few AV related scheme functions listed here
@Linas: 

 I can give only the sentences which are grammatically correct into NLP Pipeline?.  So when i give  incomplete sentences say human chats  like this "MadMonkey's Jim Cramer next Weeeeeeeek investment htt brtt", it will be parsed with low confidence value. Apart from this, will it have impact on providing boost to atoms? 

Thanks and regards,
Vishnu

--
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.
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/6b504857-e728-4d01-a710-e0e94a521731%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Belachew Misgana Bayetta
'For everyone who asks receives, and the one who seeks finds, and to the one who knocks it will be opened ' --Jesus
'The future belongs to those who believe in the beauty of their dreams' --Eleanor Rusvelt

Vishnu Priya

unread,
Oct 13, 2016, 9:21:59 AM10/13/16
to opencog


Thanks Misgana for the info.  I followed the steps as below.  But cof-af is () empty. What am i missing here?

opencog> loadmodule /opt/opencog/build/opencog/attention/libattention.so
done
opencog> start-ecan
Started the following agents:
opencog::AFImportanceDiffusionAgent
opencog::WAImportanceDiffusionAgent
opencog::AFRentCollectionAgent
opencog::WARentCollectionAgent
opencog> scm
Entering scheme shell; use ^D or a single . on a line by itself to exit.
guile> (nlp-start-stimulation 30)
guile> (use-modules (opencog) (opencog nlp) (opencog nlp chatbot) (opencog nlp relex2logic))
guile> (nlp-parse "the sky is beautiful")
((SentenceNode "sentence@b8400d67-12b2-46e5-826b-dc54bdad9ed1")
)
guile> (nlp-parse "the sky is blue")
((SentenceNode "sentence@cbbd5372-5a43-4b81-a823-c490722ef81d")
)
guile> (nlp-parse "The clouds are in sky")
((SentenceNode "sentence@00bc0122-85b5-4d01-becc-6abf0d92b6f9")
)
guile> (cog-af)
()


-Vishnu

Misgana Bayetta

unread,
Oct 13, 2016, 11:04:30 AM10/13/16
to opencog
On Thu, Oct 13, 2016 at 9:21 PM, Vishnu Priya <vishnup...@gmail.com> wrote:


Thanks Misgana for the info.  I followed the steps as below.  But cof-af is () empty. What am i missing here?
You didn't miss anything. the initial AF boundary is set to 100 here. U might lower that or increase the stimulation and see if atoms are entering in to the AF. BTW, one of the challenges of the ECAN system is parameter tunning depending on the use case. As you see in the config file, there are several ECAN related parameters defined. 

opencog> loadmodule /opt/opencog/build/opencog/attention/libattention.so
done
opencog> start-ecan
Started the following agents:
opencog::AFImportanceDiffusionAgent
opencog::WAImportanceDiffusionAgent
opencog::AFRentCollectionAgent
opencog::WARentCollectionAgent
opencog> scm
Entering scheme shell; use ^D or a single . on a line by itself to exit.
guile> (nlp-start-stimulation 30)
guile> (use-modules (opencog) (opencog nlp) (opencog nlp chatbot) (opencog nlp relex2logic))
guile> (nlp-parse "the sky is beautiful")
((SentenceNode "sentence@b8400d67-12b2-46e5-826b-dc54bdad9ed1")
)
guile> (nlp-parse "the sky is blue")
((SentenceNode "sentence@cbbd5372-5a43-4b81-a823-c490722ef81d")
)
guile> (nlp-parse "The clouds are in sky")
((SentenceNode "sentence@00bc0122-85b5-4d01-becc-6abf0d92b6f9")
)
guile> (cog-af)
()


-Vishnu

--
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.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.

Linas Vepstas

unread,
Oct 15, 2016, 2:05:57 PM10/15/16
to opencog
Hi,


My idea is to give, streams of text ( i don't know what it is about) -- > NLP pipeline --> stimulate atoms --> retrieve the atoms with high STI and its related atoms and check whether any useful/important  info is obtained. Regarding this, i would like to clarify and conform few things. 


  1.  It is not possible to store atoms with high attention values in DB. There is no code for doing this at this time?.
No. 
  1.   I can also never delete atoms once that are put into DB.?
Only because the code has not yet been written.  This is an unfinished to-do item.
 

 I can give only the sentences which are grammatically correct into NLP Pipeline?. 

If they are not grammatically correct, then the parser will be very confused.
 
So when i give  incomplete sentences say human chats  like this "MadMonkey's Jim Cramer next Weeeeeeeek investment htt brtt", it will be parsed with low confidence value.

Yes.  You may as well have said "FruBlort's Jim Sxvghz next Fooooooood investment sgdf etyhff"  -- its nonsense word-salad.   I have no clue what it says. Who si Jim Cramer, wan why does MadMoneky posses him? What's that got to do with investment? What's with the modem line-noise at the end? Are those acronyms? or are they accidental junk?

The apostrophe-s allows the parser to recognize a possessive. The capitalization allows it to guess proper names. The spelling-guesser might be able to guess the correct spelling for "Weeeeeek", maybe.   

 
Apart from this, will it have impact on providing boost to atoms? 
No.
 
--linas 

Vishnu Priya

unread,
Oct 19, 2016, 10:25:19 AM10/19/16
to opencog, linasv...@gmail.com



Misgana told that, if i want to get STI for atoms, i need to start-ecan and give stimulus. I did it and also saw atoms with STI in attentional focus. 

Now, I have a doubt. Please rectify me, if i am wrong.

when i start ecan and give stimulus, automatically PLN starts the inference process by carrying out forward and backward chaining process. 
In this process, the atoms which were used by PLN are given STI. These atoms with hight STI in turn used again by PLN for inference. 

I think, this process of inference is like learning done by PLN for reasoning purpose. Since it applies some rule over atoms and find new atoms. It would be very interesting to see the results of such inference. 
How can i see it?


Thanks,
Vishnu

Linas Vepstas

unread,
Nov 10, 2016, 8:44:59 PM11/10/16
to Vishnu Priya, opencog
There are some graphical tools for visualizing the atomspace.  I have not tried them --linas

Misgana Bayetta

unread,
Nov 10, 2016, 9:16:17 PM11/10/16
to opencog
Hi,  you may use this visualizer https://github.com/opencog/external-tools/tree/master/glimpse. You need to start the opencog REST server first.  Then click on the slide show to see whats in the AF. We are still working on parameter tunning btw.


Thanks,
Vishnu

--
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.
Visit this group at https://groups.google.com/group/opencog.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages