All Projects → AntoineAugusti → laravel-sentiment-analysis

AntoineAugusti / laravel-sentiment-analysis

Licence: Apache-2.0 license
A Laravel wrapper to perform sentiment analysis over an English sentence

Programming Languages

hack
652 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-sentiment-analysis

seas-logger
An effective,fast,stable log package for PHP.
Stars: ✭ 46 (+12.2%)
Mutual labels:  composer-package
billbee-php-sdk
🔌 The official Billbee API SDK for PHP 💻
Stars: ✭ 14 (-65.85%)
Mutual labels:  composer-package
underpin
A WordPress Framework that makes building scale-able plugins and themes easier.
Stars: ✭ 84 (+104.88%)
Mutual labels:  composer-package
picoFeed
PHP library to parse and write RSS/Atom feeds
Stars: ✭ 30 (-26.83%)
Mutual labels:  composer-package
scheduler
Task Scheduler for Laravel applications. UI from scratch
Stars: ✭ 18 (-56.1%)
Mutual labels:  composer-package
namecase
This package allows you to convert names into the correct case where possible.
Stars: ✭ 70 (+70.73%)
Mutual labels:  composer-package
php-base-project
A Composer ready package to start a new PHP 7 project
Stars: ✭ 17 (-58.54%)
Mutual labels:  composer-package
encryptable
Laravel package for persisting encrypted Model properties, providing decryption when accessed.
Stars: ✭ 26 (-36.59%)
Mutual labels:  composer-package
parasut-v4
Parasut Php Api V4
Stars: ✭ 50 (+21.95%)
Mutual labels:  composer-package
leiphp
轻量级的 PHP MVC 框架 Lightweight MVC framework for simplistic PHP apps
Stars: ✭ 30 (-26.83%)
Mutual labels:  composer-package
wp-phpunit
WordPress core PHPUnit library. [READ ONLY] Versions for new WordPress releases are built daily.
Stars: ✭ 65 (+58.54%)
Mutual labels:  composer-package
phpcsfixer-preset
Use the same php-cs-fixer configuration across all of your projects, with presets for common project layouts (Laravel, Composer packages, etc.).
Stars: ✭ 22 (-46.34%)
Mutual labels:  composer-package
Laravel-Unsplash-Wrapper
A Laravel wrapper for Unsplash API's.
Stars: ✭ 21 (-48.78%)
Mutual labels:  laravel-wrapper
laravel-binlog
Add mysql binlog event listening for Laravel ( 为Laravel框架添加Mysql Binlog事件监听 )
Stars: ✭ 19 (-53.66%)
Mutual labels:  composer-package
ArtisanUI
CLI UI for Laravel Artisan. https://medium.com/@vlreshet/cli-interface-for-laravel-artisan-4efbcc7d3e5d [en] https://habr.com/ru/post/485952/ [ru]
Stars: ✭ 31 (-24.39%)
Mutual labels:  composer-package
aws-upload
🌈 A delicious CLI tool for uploading files to ec2
Stars: ✭ 39 (-4.88%)
Mutual labels:  composer-package
php-legal-licenses
A utility to help generate a file containing information about dependencies including the full license text.
Stars: ✭ 62 (+51.22%)
Mutual labels:  composer-package
easydock
Dockerize your PHP apps ;)
Stars: ✭ 52 (+26.83%)
Mutual labels:  composer-package
php-domainrobot-sdk
A composer package for easy integration of the Domainrobot API powered by InterNetX GmbH.
Stars: ✭ 17 (-58.54%)
Mutual labels:  composer-package
openimmo
OpenImmo library
Stars: ✭ 36 (-12.2%)
Mutual labels:  composer-package

Laravel Sentiment Analysis

Build Status Software License Latest Version Packagist

Introduction

A Laravel wrapper for phpInsight.

Installation

PHP 7.2+, and Composer are required.

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

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

'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".

Looking for a Laravel 4 compatible version?

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

Usage

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

Custom Dictionary

You can provide a custom dictionary by providing the path the folder when you create a new SentimentAnalysis object.

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

Please look at the PHPInsight data files to see how you should name and structure your files.

SentimentAnalysis::isNegative($sentence)

Returns a boolean telling if the given $sentence is classified as negative.

SentimentAnalysis::isNeutral($sentence)

Returns a boolean telling if the given $sentence is classified as neutral.

SentimentAnalysis::isPositive($sentence)

Returns a boolean telling if the given $sentence is classified as positive.

SentimentAnalysis::decision($sentence)

Get the sentiment of a sentence. Will return negative, neutral or positive

SentimentAnalysis::score($sentence)

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

SentimentAnalysis::scores($sentence)

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

['negative' => 0.5, 'neutral' => 0.25, 'positive' => 0.25]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].