Packages

  • package root
    Definition Classes
    root
  • package o1
    Definition Classes
    root
  • package sentiment

    This package contains tools for (pretty naïve) sentiment analysis.

    This package contains tools for (pretty naïve) sentiment analysis.

    Definition Classes
    o1
  • package ui
  • SentimentAnalyzer
  • package util
    Definition Classes
    o1
p

o1

sentiment

package sentiment

This package contains tools for (pretty naïve) sentiment analysis.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. sentiment
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package ui

Type Members

  1. class SentimentAnalyzer extends AnyRef

    An instance of this class is a "sentiment analyzer" taught on a corpus of texts whose sentiments have been appraised and annotated by a human.

    An instance of this class is a "sentiment analyzer" taught on a corpus of texts whose sentiments have been appraised and annotated by a human. Given a roughly similar piece of text as those that appear in its training data, the analyzer can assign the text a numerical rating that reflects how positive or negative it is; see the rate method.

    One does not simply create SentimentAnalyzer objects with new. The SentimentAnalyzer companion object provides methods for initializing analyzer objects from training data.

Value Members

  1. def cleanText(text: String): String

    Cleans the given line of text for use by a SentimentAnalyzer: normalizes apostrophes and whitespace and discards unwanted punctuation.

  2. object SentimentAnalyzer

    This companion object of class SentimentAnalyzer provides methods for initializing a analyzer instances from training data.

    This companion object of class SentimentAnalyzer provides methods for initializing a analyzer instances from training data.

    The methods expect the data to be in the following line-based format:

    -1 Aggressive self-glorification and a manipulative whitewash.
    2 A comedy-drama of nearly epic proportions rooted in a sincere performance by the title character undergoing midlife crisis.
    -1 Narratively, Trouble Every Day is a plodding mess.
    1 The Importance of Being Earnest, so thick with wit it plays like a reading from Bartlett's Familiar Quotations
    0 It's everything you'd expect -- but nothing more.

    That is, each line of input should start with a sentiment rating of -2, -1, 0, 1, 2. A negative numbers means that the rest of the line expresses a negative sentiment, as determined by a human rater; positive numbers correspondingly reflect positive sentiments.

Inherited from AnyRef

Inherited from Any

Ungrouped