demo

demo / scikit_sentiment_classifier / 0.1.2

README.md

Overview

Simple Passive Aggressive algorithm trained on IMBD movie review data to classify the sentiment of movie reviews.

Applicable Scenarios and Problems

Works best on movie review data. Note that this algorithm will remove any html tags (but the mardown renders it as actual html so it is removed for the below example input).

Relies On: https://algorithmia.com/algorithms/demo/text_processing_demo

Usage

Input

String: Movie review unstructured text data

Output

**Sentiment: ** Positive (1) or Negative (0)

**Input_text: ** Original text

Examples

input:

"This movie is a disaster within a disaster film. It is full of great action scenes, which are only meaningful if you throw away all sense of reality. Let's see, word to the wise, lava burns you; steam burns you. You can't stand next to lava. Diverting a minor lava flow is difficult, let alone a significant one. Scares me to think that some might actually believe what they saw in this movie. Even worse is the significant amount of talent that went into making this film."

output:

{
  "Sentiment": "Negative",
  "review": "This movie is a disaster within a disaster film. It is full of great action scenes, which are only meaningful if you throw away all sense of reality. Let's see, word to the wise, lava burns you; steam burns you. You can't stand next to lava. Diverting a minor lava flow is difficult, let alone a significant one. Scares me to think that some might actually believe what they saw in this movie. Even worse is the significant amount of talent that went into making this film."
}

Note: Try out this algorithm piped together with a language translation algorithm.