| … | … | @@ -3,6 +3,26 @@ |
| 3 | 3 | (use-modules (opencog exec) (opencog persist)) |
| 4 | 4 | (use-modules (srfi srfi-1)) |
| 5 | 5 | |
| 6 | ; Here's the design we want: |
| 7 | ; 1) Some source of text strings; actually a source of PhraseNode's |
| 8 | ; This source blocks if there's nothing to be read; else it |
| 9 | ; returns the next PhraseNode. The SRFI's call this a generator. |
| 10 | ; 2) A PromiseLink that wraps (PureExecLink (LgParseBonds ...)) |
| 11 | ; so that, when its executed, it calls the source and parses. |
| 12 | ; Or perhaps just a (Filter (Rule ...)) combo, instead of a |
| 13 | ; promise? The promise can be made later. |
| 14 | ; https://wiki.opencog.org/w/PromiseLink#Multiplex_Example |
| 15 | ; 3) A Filter that takes above and increments pair counts. |
| 16 | ; 4) Execution control. There are two choices: |
| 17 | ; Pull: infinite loop polls on promise. Source blocks if |
| 18 | ; no input. |
| 19 | ; Push: Nothing happens until source triggers; then a cascade |
| 20 | ; of effects downstream. |
| 21 | ; Right now, the general infrastructure supports Pull naturally. |
| 22 | ; There aren't any push demos. |
| 23 | ; Attention controls is easier with Pull. |
| 24 | |
| 25 | |
| 6 | 26 | (define text-blob "this is just a bunch of words you know") |
| 7 | 27 | (define NUML (Number 4)) |
| 8 | 28 | (define DICT (LgDict "any")) |