Closed EskenderTamrat closed 5 years ago
Please put all the Ghost rules in one or more files and use ghost-parse-files
to load them, instead of doing ghost-parse
for every single rule
I tested this with ghost-parse-files and it sure does work. @Eskender-B mentioned that it worked running rule by rule in previous commits (didn't specify a certain commit #) when he created the issue first on July 26.
I'm closing this issue since it works if we put rules in file/s and use ghost-parse-files instead of ghost-parse (there's no mechanism for running multiple rules using ghost-parse right now).
Yes there are recent changes that fixed and standardized the rule loading behavior, and to support reusing another rule in a different goal that may not have been created. So I recommend to use ghost-parse-files
for parsing as suggested in the README.
In addition, it turns out it's also possible to run more than one rule with ghost-parse as follows.
scheme@(guile-user) > (ghost-parse "u: (cake) I want it a: (yes) here you go") scheme@(guile-user) > (ghost "I eat cake") [INFO] [say] (I want it) scheme@(guile-user) > (ghost "yes") [INFO] [say] (here you go)
Recreated from https://github.com/opencog/opencog/issues/3270
This used to work in previous commits but now gives the following error
scheme@(guile-user) [8]> (ghost-parse "u: (you have a cake) yes do you want some?") scheme@(guile-user) [8]> (ghost-parse "a: (yes) here you go") ice-9/boot-9.scm:777:6: In procedure throw: In procedure throw: Wrong type argument in position 1: GHOST Please define a responder first before defining a rejoinder.