superscriptjs / superscript

A dialogue engine for creating chat bots
http://superscriptjs.com
MIT License
1.65k stars 209 forks source link

Part of detail from question #364

Closed meghasoni closed 7 years ago

meghasoni commented 7 years ago

How to get details from the conversation.. like.

User: hi Bot:hi User: how can u help Bot:help u on different mobile details User:can you provide me details for Samsung and apple

How do bot can get the two words Samsung and apple from user conversation..

Help is appreciated

bensalilijames commented 7 years ago

You can do something like this:

+ can you provide me details for ((samsung|apple)) and ((samsung|apple))
- Let me find you some details for <cap1> and <cap2>.

You could even extract it to a concept:

+ can you provide me details for (~phone_brand) and (~phone_brand)
- Let me find you some details for <cap1> and <cap2>.

More info on concepts here: https://github.com/superscriptjs/superscript/wiki/Knowledge