|Number of votes:||2|
In this blog post, I will describe how we have utilised Microsoft cognitive services (Text Analytics API) to analyse content before a content author publishes it so it can be rewritten in a more positive tone. The Text Analytics API uses a machine learning classification algorithm to generate a sentiment score between 0 and 1. Scores closer to 1 indicate positive sentiment, while scores closer to 0 indicate negative sentiment.
Content author will be encourged to rewrite content if a score closer to zero is returned - the idea is to make sure our content conveys the message in a postive manner.
A working example can be seen below and all the code is in github.
Once it is configured, the backend code is all setup.
For front end code, I have utilised yomen TinyMCE Plugin Generator to generate a tinymce plugin. More documentation can found here. Simple code to add a button to tinymce editor which when clicked will made an ajax call to backend web api and show the result to end use.
(Please note the code share is a basic example of making it all work together and it is not production ready code)