Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditionally Highlight a Variable

Tags:

mathcad

Is it possible to highlight a variable depending on its value?

e.g. automatically highlight this variable green:

variable = "acceptable"

but if it changes to:

variable = "unacceptable"

the highlight would change to red.

like image 397
Gareth Fuller Avatar asked Nov 08 '22 09:11

Gareth Fuller


1 Answers

I think you need some sort of service to determine the sentiment from the data a variable contains.

For instance, I can easily call :

https://azure.microsoft.com/en-in/services/cognitive-services/text-analytics/

to determine the difference between "acceptable" and "unacceptable". In the link you can actually call the service with both the words and see that in first case, the result returns 98% sentiment while for the other one it returns 2%. You can use this value even generate a smooth range of rgb colors.

like image 142
abhishek Avatar answered Jan 04 '23 01:01

abhishek