Skip to content

Two changes needed for this to run on Ubuntu. #1

@SEOArcade

Description

@SEOArcade

In example code you have used twice "new":

`require_once "vadersentiment.php";

$textToTest = "VADER is smart, handsome, and funny.";

$sentimenter = new new SentimentIntensityAnalyzer();
$result = $sentimenter->getSentiment($textToTest);

print_r($result);`

In vadersentiment:

$this->lexicon_file = realpath(dirname(__FILE__)) . '\\' . $lexicon_file;

to (changing from \ to /, otherwise lexicon wont work):

$this->lexicon_file = realpath(dirname(FILE)) . '/' . $lexicon_file;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions