| … | … | @@ -7,12 +7,11 @@ |
| 7 | 7 | ; 1) Some source of text strings; actually a source of PhraseNode's |
| 8 | 8 | ; This source blocks if there's nothing to be read; else it |
| 9 | 9 | ; 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: |
| 15 | 13 | ; https://wiki.opencog.org/w/PromiseLink#Multiplex_Example |
| 14 | ; but what happens if the readers don't both read ??? |
| 16 | 15 | ; 3) A Filter that takes above and increments pair counts. |
| 17 | 16 | ; 4) Execution control. There are two choices: |
| 18 | 17 | ; Pull: infinite loop polls on promise. Source blocks if |
| … | … | @@ -21,7 +20,7 @@ |
| 21 | 20 | ; of effects downstream. |
| 22 | 21 | ; Right now, the general infrastructure supports Pull naturally. |
| 23 | 22 | ; There aren't any push demos. |
| 24 | | ; Attention controls is easier with Pull. |
| 23 | ; Attention control is easier with Pull. |
| 25 | 24 | |
| 26 | 25 | |
| 27 | 26 | (define text-blob "this is just a bunch of words you know") |
| … | … | @@ -114,6 +113,15 @@ |
| 114 | 113 | (Plus (Number 0 0 1) |
| 115 | 114 | (FloatValueOf ed (Predicate "count") (Number 0 0 0)))))) |
| 116 | 115 | |
| 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)) |
| 117 | 125 | |
| 118 | 126 | ; (load "count-agent.scm") |
| 119 | 127 | ; (obs-txt text-blob) |