Hi Ed,
Here is what I do in my control file to look for specific words in input to see if my students are asking about family problems or past medical problems.
u: ($code=main [~role_family family]) $family = true
u: ($code=main [ever past history prior before previous]) $pasthistory = true
u: () refine ()
a: ([~role_family family]) $family = true $pasthistory = null
a: ([ever past history prior before previous]) $pasthistory = true $family = null
The first part looks for family words and if they are present sets the variable $family to true. Same with past tense words.
The refine section ensures that only one variable is true at a time. This is needed in case someone asks “Has anyone in your family ever had cancer”. Without the refine section both $family and $pasthistory would = true. I decided that family should be tested first so if $family is true then the second rule in refine does not fire.
In our topics, we make decisions on these flags. At the beginning of my currentpain topic for example, we have this.
u: ($pasthistory) respond(~pastpain)
u: ($family) respond(~familypain)
So if either of those flags have been set during sentence processing in control, then we direct the response to the correct topic.
Not sure if this is what you were looking for, but that’s how we look at sentence input and set some variables in control, then act on them in topics.
Regards,
Doug