{"id":16643907,"url":"https://github.com/antoineaugusti/laravel-sentiment-analysis","last_synced_at":"2025-06-30T05:05:55.057Z","repository":{"id":18929357,"uuid":"22148709","full_name":"AntoineAugusti/laravel-sentiment-analysis","owner":"AntoineAugusti","description":"A Laravel wrapper to perform sentiment analysis over an English sentence","archived":false,"fork":false,"pushed_at":"2022-02-17T14:45:31.000Z","size":160,"stargazers_count":45,"open_issues_count":1,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-30T05:05:54.056Z","etag":null,"topics":["composer","composer-package","laravel","laravel-wrapper","php","sentimentanalysis"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/antoineaugusti/laravel-sentiment-analysis","language":"Hack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntoineAugusti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-23T13:13:42.000Z","updated_at":"2025-01-22T14:17:23.000Z","dependencies_parsed_at":"2022-08-21T03:10:18.964Z","dependency_job_id":null,"html_url":"https://github.com/AntoineAugusti/laravel-sentiment-analysis","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/AntoineAugusti/laravel-sentiment-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoineAugusti%2Flaravel-sentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoineAugusti%2Flaravel-sentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoineAugusti%2Flaravel-sentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoineAugusti%2Flaravel-sentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntoineAugusti","download_url":"https://codeload.github.com/AntoineAugusti/laravel-sentiment-analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoineAugusti%2Flaravel-sentiment-analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262714509,"owners_count":23352466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","composer-package","laravel","laravel-wrapper","php","sentimentanalysis"],"created_at":"2024-10-12T08:09:52.093Z","updated_at":"2025-06-30T05:05:55.028Z","avatar_url":"https://github.com/AntoineAugusti.png","language":"Hack","funding_links":[],"categories":[],"sub_categories":[],"readme":"Laravel Sentiment Analysis\n===============\n\n\n[![Build Status](https://img.shields.io/travis/AntoineAugusti/laravel-sentiment-analysis/master.svg?style=flat)](https://travis-ci.org/AntoineAugusti/laravel-sentiment-analysis)\n[![Software License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg?style=flat)](LICENSE.md)\n[![Latest Version](https://img.shields.io/github/release/AntoineAugusti/laravel-sentiment-analysis.svg?style=flat)](https://github.com/AntoineAugusti/laravel-sentiment-analysis/releases)\n![Packagist](https://img.shields.io/packagist/dt/AntoineAugusti/laravel-sentiment-analysis?style=flat-square)\n\n## Introduction\nA Laravel wrapper for [phpInsight](https://github.com/JWHennessey/phpInsight).\n\n## Installation\n\n[PHP](https://php.net) 7.2+, and [Composer](https://getcomposer.org) are required.\n\nTo get the latest version of Laravel Sentiment Analysis, run the command `composer require antoineaugusti/laravel-sentiment-analysis`.\n\nYou can register the SentimentAnalysis facade in the `aliases` key of your `config/app.php` file if you like.\n\n```php\n'SentimentAnalysis' =\u003e Antoineaugusti\\LaravelSentimentAnalysis\\SentimentAnalysis::class,\n```\n\n#### Looking for a Laravel 5 compatible version?\nCheckout the [1.2 version](https://github.com/AntoineAugusti/laravel-sentiment-analysis/releases/tag/v2.2), installable by requiring `\"antoineaugusti/laravel-sentiment-analysis\": \"2.2\"`.\n\n#### Looking for a Laravel 4 compatible version?\nCheckout the [1.2 version](https://github.com/AntoineAugusti/laravel-sentiment-analysis/releases/tag/v1.2), installable by requiring `\"antoineaugusti/laravel-sentiment-analysis\": \"1.2\"`.\n\n## Usage\nSentences can be classified as **negative**, **neutral** or **positive**. The only supported language for the moment is **English**.\n\n## Custom Dictionary\nYou can provide a custom dictionary by providing the path the folder when you create a new `SentimentAnalysis` object.\n\n`$analysis = new SentimentAnalysis(storage_path('custom_dictionary/'));`\n\nPlease look at [the PHPInsight data files](https://github.com/JWHennessey/phpInsight/tree/master/lib/PHPInsight/data) to see how you should name and structure your files.\n\n### SentimentAnalysis::isNegative($sentence)\nReturns a boolean telling if the given `$sentence` is classified as negative.\n\n### SentimentAnalysis::isNeutral($sentence)\nReturns a boolean telling if the given `$sentence` is classified as neutral.\n\n### SentimentAnalysis::isPositive($sentence)\nReturns a boolean telling if the given `$sentence` is classified as positive.\n\n### SentimentAnalysis::decision($sentence)\nGet the sentiment of a sentence. Will return `negative`, `neutral` or `positive`\n\n### SentimentAnalysis::score($sentence)\nGet the confidence of a decision for a result. The closer to 1, the better!\n\n### SentimentAnalysis::scores($sentence)\nGet the score value for each decision. Returns an array. The closer to 1, the better! Return example:\n\n\t['negative' =\u003e 0.5, 'neutral' =\u003e 0.25, 'positive' =\u003e 0.25]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoineaugusti%2Flaravel-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoineaugusti%2Flaravel-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoineaugusti%2Flaravel-sentiment-analysis/lists"}