简体   繁体   中英

how to match concept values in chatscript

If i use a ~concept, how would I know what the user typed? this is like an entity in typical NLP frameworks. eg

u: (I am from ~country )
  ^keep() ^repeat()
  you come from _0?

If the user types I am from FRANCE there seems no way to extract the value FRANCE for ~country to echo back to the user or to use it later with perhaps $country=_0

I thought the _0 might help with that, but no workie

This will work but doesn't use concepts just wildcards

u: (I was born [in near close by] _* )
  ^keep() ^repeat()
  you were born in _0?

ref docs https://github.com/ChatScript/ChatScript/blob/master/WIKI/OVERVIEWS-AND-TUTORIALS/ChatScript-Tutorial.md#short-term-memory--_

seems _ before the ~concept will allow capturing:

u: (I am from _~country )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM