2

I have created a chat bot using Conversation Service of IBM Watson but I am not able to write mathematical equations and symbols in the intents, entities and dialog. Can anyone help me with this?

Daisy_s
  • 109
  • 9

1 Answers1

6

Mathematical symbols such as +,-,* or / are just characters and can be used in intent/entities examples. So you could create an intent #add with +, plus, add as an examples. Then you can use predefined @sys-number entity to detect numbers (just turn it on in entities, system entities tab). You would then create a dialog node with a condition #add && @sys-number.length == 2 - to be sure there are two numbers in the user input - and in the Watson says, you could write expression such as:

<? @sys-number[0].numeric_value + @sys-number[1].numeric_value ?>

to get the result.

Michal Bida
  • 1,316
  • 9
  • 24