OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-agents commits / 79a2725

Continue working on the example
79a272518b127117dd0c0acea7f1efb7171627ee
by Linas Vepštas <linasvepstas@gmail.com> · 2024-04-16T19:14:09.000Z

Changed files (1) +14 -6

scm/pair-agent/count-agent.scm +14 -6
……@@ -7,12 +7,11 @@
77; 1) Some source of text strings; actually a source of PhraseNode's
88; This source blocks if there's nothing to be read; else it
99; returns the next PhraseNode. The SRFI's call this a generator.
10; See sensory.scm
11; 2) A PromiseLink that wraps (PureExecLink (LgParseBonds ...))
12; so that, when its executed, it calls the source and parses.
13; Or perhaps just a (Filter (Rule ...)) combo, instead of a
14; promise? The promise can be made later.
10; For now, see `sensory.scm` module and example.
11; 2) (Optional) Some way to split one source into multiple sources.
12; Maybe this:
1513; https://wiki.opencog.org/w/PromiseLink#Multiplex_Example
14; but what happens if the readers don't both read ???
1615; 3) A Filter that takes above and increments pair counts.
1716; 4) Execution control. There are two choices:
1817; Pull: infinite loop polls on promise. Source blocks if
……@@ -21,7 +20,7 @@
2120; of effects downstream.
2221; Right now, the general infrastructure supports Pull naturally.
2322; There aren't any push demos.
24; Attention controls is easier with Pull.
23; Attention control is easier with Pull.
2524
2625
2726(define text-blob "this is just a bunch of words you know")
……@@ -114,6 +113,15 @@
114113 (Plus (Number 0 0 1)
115114 (FloatValueOf ed (Predicate "count") (Number 0 0 0))))))
116115
116; Lets work on file-access now.
117(cog-execute!
118 (SetValue (Concept "foo") (Predicate "some place")
119 (FileRead "file:///tmp/demo.txt")))
120
121(cog-execute!
122 (LgParseBonds
123 (ValueOf (Concept "foo") (Predicate "some place"))
124 DICT NUML))
117125
118126; (load "count-agent.scm")
119127; (obs-txt text-blob)