O'Reilly logo

F# for Machine Learning Essentials by Sudipta Mukherjee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling negations

Sometimes, positive and negative polarities balance each other and a sentence for which you would expect to get a negative polarity ends up being an objective statement (meaning that the sentence doesn't have a polarity at all).

Consider the following sentence:

  • The camera of the phone was not good

The positive polarity of this sentence is calculated to be 0.625 (because of the word good) and the negative polarity of the sentence is calculated to be 0.625 (because of the word not). Thus, the overall polarity of this document is calculated to be zero; or in other words, the document is said to have no polarity at all. But as humans, we know that this phrase echoes a negative sentiment because the user is saying that the camera of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required