3

I have been using Watson Conversation for quite some time. But recently I needed to put up formulas in my Watson Response.

How do I achieve it?

Is there a way to represent formula/equations in my Dialog flow?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sabiha Taskin
  • 113
  • 11
  • 3
    I think you should try to include math formula in html,and add the html to the response.[check this](https://www.mathjax.org/) like for example to get to a new like I had to use
    in the response.It didn't show the result in the conversation service try it out,but in the actual application it worked.
    – Athif Shaffy Jan 05 '17 at 11:58

1 Answers1

5

@athif-shaffy's answer is basically correct-

I think you should try to include math formula in HTML,and add the HTML to the response.check this like for example to get to a new line I had to use <br> in the response.It didn't show the result in the conversation service try it out,but in the actual application it worked – Athif Shaffy Jan 5 at 11:58

You can put any text you want into the response, including HTML.

Additionally, I will mention that you can optionally put a "translation" layer in between the Watson Response and what your end user sees. The translation layer could, for example, convert MathML into HTML or whatever you would like.

It really just depends on what exactly you want to display to your users, and which option is more convenient for you - putting it directly into the response or "translating" it with some intermediate code.

Community
  • 1
  • 1
Nathan Friedly
  • 7,837
  • 3
  • 42
  • 59
  • That comment may not stay around for long. I recommend adding information to this answer to make it independent of that comment. – Peter Mortensen Jan 09 '17 at 17:49