MovieSentimentApp

object MovieSentimentApp extends App

This app loads training data for a SentimentAnalyzer from a text file that contains movie reviews. It then interacts with the user in the text console, interactively prompting them to enter movie reviews and using the analyzer to report whether those reviews are positive or negative. The session ends when the user enters an empty input.

(The training data is originally from the Rotten Tomatoes review aggregator, was collected by the Sentiment Analysis project at Stanford University. It has been further pre-processed for educational purposes first by Eric D. Manley and Timothy M. Urness, then by Juha Sorva.)

trait App
class Object
trait Matchable
class Any

Value members

Concrete methods

def analyze(review: String): String

Given a movie review, returns a string report of whether it seems positive or negative.

Given a movie review, returns a string report of whether it seems positive or negative.

Asks the user to enter a movie review and returns the input as a (slightly reformatted) string.

Asks the user to enter a movie review and returns the input as a (slightly reformatted) string.

Inherited methods

final protected def args: Array[String]
Inherited from:
App
final def main(args: Array[String]): Unit
Inherited from:
App

Deprecated and Inherited methods

override def delayedInit(body: => Unit): Unit
Deprecated
[Since version 2.11.0] the delayedInit mechanism will disappear
Definition Classes
Inherited from:
App

Concrete fields

A SentimentAnalyzer trained with a set of movie reviews and their human-assigned sentiment ratings.

A SentimentAnalyzer trained with a set of movie reviews and their human-assigned sentiment ratings.