ANALYZE_POLARITY

Syntax

ANALYZE_POLARITY(<string>)

Description

Analyze the polarity of a text. A maximum entropy classifier is used to determine tone of the text as positive or negative using the OpenNLP library.

Model training data used was first published in Bo Pang and Lillian Lee, "A Sentimental Education: Sentiment Analysis Using Subjectivity Summarization Based on Minimum Cuts", Proceedings of the ACL, 2004.

The training data of the provided model is best suited to assess the polarity for reviews as opposed to freestanding text.

Example: The function better assesses positives and negatives from movie or product reviews rather than Twitter and Facebook posts. 

Example

This function works very well for reviews to determine if the review was positive or negative. Below are examples of this function used on product reviews.

ANALYZE_POLARITY(#Product_A)

Product AANALYZE_POLARITY returns
My 6 year old daughter wanted to learn to use bake and this is the perfect tool! She able was this product immediately! The pans are textured, so nothing seemed to slip. The handles are a good size for little hands.positive
This product was too weak to for its intended use. Even on the highest setting it did not perform the job I needed it to. This might be useful if you are using it for light work but it definitely is not a heavy duty item.negative
  • This function is not guaranteed to be 100% accurate.
  • The accuracy of results depends on both the training data being used by the function and the comparable quality of input data.
  • In order to assess result accuracy, you need conduct your own performance evaluation.