Wednesday 15 January 2014

nlp - Responding to multiple matches in Chatscript -



nlp - Responding to multiple matches in Chatscript -

i trying larn chatscript documentation seems poor. current issue how respond multi-statement match input. so, if "hi. tell me yourself" , have match "hi" , "about yourself" respond first match , not last. i'm pretty sure need command script alter prepare not sure commands use. maybe stores matches in lastly input , can pick specific one?

you create u: response uses ^next & refine() move through sentences starting ~greeting. pseudo code:

u: ( ~greeting ) ^refine()

a: (%more) ^next(input) ^refine()

b:(you ?) i'm good!

b:(%lenght==0) hi!

(advanced user manual p17-18)

^next(what label) – given of gambit or responder or rejoinder or rule , rule label or tag, find next rule of what. fails if none found. rejoinder fail if reaches next top level rule. if label “~”, utilize lastly call's reply starting point, enabling walk rules in succession. there ^next(fact @xxx) – see fact manual. for ^next(input) scheme read next sentence , prep scheme it. means patterns , code executing thereafter in context of next input sentence. sentence used up, , not seen next when current revised sentence finishes.

nlp chat

No comments:

Post a Comment