Concept not matching a conversation
See original GitHub issueI created a concept following the documentation, I can see that the concept is loaded in mongo but the corresponding conversation is not being triggered.
I am using version 1.0 with the current bot-init. My concept file flowertype.top
looks like this:
concept: ~flowertype (roses lilies tulips)
In main_ss I have this rules:
+ I want ~flowertype
- Ok, which date would you like to pick up the ~flowertype? {topic=pickupdate}
+ I want *1
- Ok2, which date would you like to pick up the <cap>? {topic=pickupdate}
When I parse and run the server in debug mode I get this:
DEBUG=*,-Utils node_modules/superscript/lib/bin/parse.js -f
ParseContents Creating a trigger with a concept not expanded: ~flowertype +0ms
ParseContents Creating a trigger with a concept not expanded: ~flowertype +1ms
Time to process file ./chat/main.ss: 0.259 seconds
Total time to process: 0.27 seconds
Saved output to data.json
DEBUG=*,-Utils node lib/server-telnet.js
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addTags +0ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addNlp +1ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addEntities +2ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addDates +0ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addPos +0ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addWords +0ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins hasExpression +0ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins fixup +0ms
SS:Message Loading plugin: /home/juanmi/dev/superscript-orderflowers/node_modules/ss-message/lib/plugins addQuestionTypes +0ms
Concept Creating new fact flowertype example roses +448ms
Concept Creating new fact roses isa flowertype +140ms
Concept Creating new fact flowertype example lilies +5ms
Concept Creating new fact lilies isa flowertype +7ms
Concept Creating new fact flowertype example tulips +1ms
Concept Creating new fact tulips isa flowertype +3ms
Concept Added # Facts 0 +1ms
Concept Creating new fact flowertype isa concept +1ms
[...]
If I check mongo the concepts are loaded:
{ "_id" : "spo::flowertype::example::roses", "value" : "{\"subject\":\"flowertype\",\"predicate\":\"example\",\"object\":\"roses\"}" }
{ "_id" : "sop::flowertype::roses::example", "value" : "{\"subject\":\"flowertype\",\"predicate\":\"example\",\"object\":\"roses\"}" }
{ "_id" : "pos::example::roses::flowertype", "value" : "{\"subject\":\"flowertype\",\"predicate\":\"example\",\"object\":\"roses\"}" }
{ "_id" : "pso::example::flowertype::roses", "value" : "{\"subject\":\"flowertype\",\"predicate\":\"example\",\"object\":\"roses\"}" }
{ "_id" : "ops::roses::example::flowertype", "value" : "{\"subject\":\"flowertype\",\"predicate\":\"example\",\"object\":\"roses\"}" }
{ "_id" : "osp::roses::flowertype::example", "value" : "{\"subject\":\"flowertype\",\"predicate\":\"example\",\"object\":\"roses\"}" }
{ "_id" : "spo::roses::isa::flowertype", "value" : "{\"subject\":\"roses\",\"predicate\":\"isa\",\"object\":\"flowertype\"}" }
{ "_id" : "pso::isa::roses::flowertype", "value" : "{\"subject\":\"roses\",\"predicate\":\"isa\",\"object\":\"flowertype\"}" }
{ "_id" : "sop::roses::flowertype::isa", "value" : "{\"subject\":\"roses\",\"predicate\":\"isa\",\"object\":\"flowertype\"}" }
{ "_id" : "pos::isa::flowertype::roses", "value" : "{\"subject\":\"roses\",\"predicate\":\"isa\",\"object\":\"flowertype\"}" }
{ "_id" : "ops::flowertype::isa::roses", "value" : "{\"subject\":\"roses\",\"predicate\":\"isa\",\"object\":\"flowertype\"}" }
{ "_id" : "osp::flowertype::roses::isa", "value" : "{\"subject\":\"roses\",\"predicate\":\"isa\",\"object\":\"flowertype\"}" }
[...]
Despite all the above looks ok, when I write ‘I want roses’ I always get the second answer.
You> I want roses
Bot> Ok2, which date would you like to pick up the roses?
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
Can a self-contained C++ concept match a particular template ...
I'd like to have a C++ concept that matches a particular template type regardless of one of the template arguments. I can, of...
Read more >Improve Conversations by Matching the Energy of Others
Soft skills matter, and we're not talking about them enough. This series explores real-life situations and practical examples of techniques ...
Read more >Incongruence in Psychology | Overview & Examples - Study.com
Incongruence in communication often occurs when the interaction between the two people is not real. For example, if a salesman at an office ......
Read more >What Is Cognitive Dissonance? | Everyday Health
The theory and definition of cognitive dissonance describes the tension that occurs when your beliefs and behaviors don't match up.
Read more >Cognitive dissonance - Wikipedia
According to this theory, when two actions or ideas are not psychologically consistent with each other, people do all in their power to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also it might be good to parse this at runtime like we do for
<name>
etc, then you can do dynamic concept lookups which would be coolNo worries, glad you’re finding it good so far!
Yep, perhaps we should re-word that bit of the docs: it’s true that you can use concepts in both the trigger and reply, but like you say, they won’t necessarily choose the same one. So using captures
<cap>
is the way to go!