Posts: 1
Joined: Thu Mar 07, 2019 8:14 am

Only match expression if a word exists

Fri Mar 08, 2019 8:03 am

I am using Oscova syn.bot 3.4.0
I am very new to this, so please excuse this if it is a silly question...
Is there any way to only have an expression match if a certain word exists in the user input?
For example, I am trying to match user input for "what time is it in {location} (or a default time if no location is specified), however the below Intent matches if a user types "what is the problem". I would like to force 'time' to be present before that expression matches. (on the expression "what is the time..."

CSharp Code

[Expression("what time is it")]
[Expression("what is the time in {sydney}")]
[Expression("what time is it in {sydney}")]
 public void TimeDialog(Context context, Result result)
Currently the only way I can do it is to create a negative match intent for just "what is the @sys.text" and have no response returned for this, but it seems intuitively wrong to me!

User avatar
Help & Support
Posts: 20
Joined: Sat Apr 06, 2013 6:16 pm

Re: Only match expression if a word exists

Mon Mar 11, 2019 12:34 pm

Create entity for that word. Example here
If your experiment needs statistics, you ought to have done a better experiment - Ernest Rutherford

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest