2017 © Pedro Peláez
 

library laravel-sentiment-analysis

A Laravel wrapper that performs sentiment analysis over an English sentence

image

antoineaugusti/laravel-sentiment-analysis

A Laravel wrapper that performs sentiment analysis over an English sentence

  • Sunday, October 22, 2017
  • by AntoineAugusti
  • Repository
  • 3 Watchers
  • 32 Stars
  • 47,863 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 9 Forks
  • 3 Open issues
  • 10 Versions
  • 9 % Grown

The README.md

Laravel Sentiment Analysis

Build Status Software License Latest Version Packagist, (*1)

Introduction

A Laravel wrapper for phpInsight., (*2)

Installation

PHP 7.2+, and Composer are required., (*3)

To get the latest version of Laravel Sentiment Analysis, run the command composer require antoineaugusti/laravel-sentiment-analysis., (*4)

You can register the SentimentAnalysis facade in the aliases key of your config/app.php file if you like., (*5)

'SentimentAnalysis' => Antoineaugusti\LaravelSentimentAnalysis\SentimentAnalysis::class,

Looking for a Laravel 5 compatible version?

Checkout the 1.2 version, installable by requiring "antoineaugusti/laravel-sentiment-analysis": "2.2"., (*6)

Looking for a Laravel 4 compatible version?

Checkout the 1.2 version, installable by requiring "antoineaugusti/laravel-sentiment-analysis": "1.2"., (*7)

Usage

Sentences can be classified as negative, neutral or positive. The only supported language for the moment is English., (*8)

Custom Dictionary

You can provide a custom dictionary by providing the path the folder when you create a new SentimentAnalysis object., (*9)

$analysis = new SentimentAnalysis(storage_path('custom_dictionary/'));, (*10)

Please look at the PHPInsight data files to see how you should name and structure your files., (*11)

SentimentAnalysis::isNegative($sentence)

Returns a boolean telling if the given $sentence is classified as negative., (*12)

SentimentAnalysis::isNeutral($sentence)

Returns a boolean telling if the given $sentence is classified as neutral., (*13)

SentimentAnalysis::isPositive($sentence)

Returns a boolean telling if the given $sentence is classified as positive., (*14)

SentimentAnalysis::decision($sentence)

Get the sentiment of a sentence. Will return negative, neutral or positive, (*15)

SentimentAnalysis::score($sentence)

Get the confidence of a decision for a result. The closer to 1, the better!, (*16)

SentimentAnalysis::scores($sentence)

Get the score value for each decision. Returns an array. The closer to 1, the better! Return example:, (*17)

['negative' => 0.5, 'neutral' => 0.25, 'positive' => 0.25]

The Versions

22/10 2017

dev-master

9999999-dev

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

22/10 2017

dev-readme-auto-discovery

dev-readme-auto-discovery

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

06/06 2017

v2.2

2.2.0.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

11/11 2016

v2.1

2.1.0.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

11/11 2016

dev-laravel-4

dev-laravel-4

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

11/11 2016

v1.2

1.2.0.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

08/02 2015

v2.0

2.0.0.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

20/08 2014

v1.1.1

1.1.1.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

25/07 2014

v1.1.0

1.1.0.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti

23/07 2014

v1.0.0

1.0.0.0

A Laravel wrapper that performs sentiment analysis over an English sentence

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

laravel framework analysis sentiment sentiment analysis augusti antoine augusti antoineaugusti