Sentiment Analysis of IMDB Reviews Pipeline (analyze_sentimentdl_use_imdb)

Description

A pre-trained pipeline to classify IMDB reviews in neg and pos classes using tfhub_use embeddings.

Live Demo Open in Colab Download Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline 
pipeline = PretrainedPipeline("analyze_sentimentdl_use_imdb", lang = "en") 
result = pipeline.fullAnnotate("Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = new PretrainedPipeline("analyze_sentimentdl_use_imdb", lang = "en")
val result = pipeline.fullAnnotate("Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!")
import nlu

text = ["""Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music was rad! Horror and sword fight freaks,buy this movie now!"""]
sentiment_df = nlu.load('en.sentiment.imdb.use').predict(text, output_level='sentence')
sentiment_df

Results

|    | document                                                                                                 | sentiment     |
|---:|---------------------------------------------------------------------------------------------------------:|--------------:|
|    | Demonicus is a movie turned into a video game! I just love the story and the things that goes on in the  |               |
|  0 | film.It is a B-film ofcourse but that doesn`t bother one bit because its made just right and the music   | positive      |
|    | was rad! Horror and sword fight freaks,buy this movie now!                                               |               |

Model Information

Model Name: analyze_sentimentdl_use_imdb
Type: pipeline
Compatibility: Spark NLP 2.7.1+
Edition: Official
Language: en

Included Models

tfhub_use, sentimentdl_use_imdb