Skip to content

Commit 19052c9

Browse files
Bump version and add documentation for the scores function
1 parent 1711c5d commit 19052c9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A Laravel wrapper for [phpInsight](https://github.com/JWHennessey/phpInsight).
1313

1414
[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.2+, and [Composer](https://getcomposer.org) are required.
1515

16-
To get the latest version of Laravel Sentiment Analysis, simply require `"antoineaugusti/laravel-sentiment-analysis": "1.0.*"` in your `composer.json` file. You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
16+
To get the latest version of Laravel Sentiment Analysis, simply require `"antoineaugusti/laravel-sentiment-analysis": "1.1.*"` in your `composer.json` file. You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
1717

1818
Once Laravel Sentiment Analysis is installed, you need to register the service provider. Open up `app/config/app.php` and add the following to the `providers` key.
1919

@@ -39,4 +39,9 @@ Returns a boolean telling if the given `$sentence` is classified as positive.
3939
Get the sentiment of a sentence. Will return `negative`, `neutral` or `positive`
4040

4141
### SentimentAnalysis::score($sentence)
42-
Get the confidence of a decision for a result. The closer to 1, the better!
42+
Get the confidence of a decision for a result. The closer to 1, the better!
43+
44+
### SentimentAnalysis::scores($sentence)
45+
Get the score value for each decision. Returns an array. The closer to 1, the better! Return example:
46+
47+
['negative' => 0.5, 'neutral' => 0.25, 'positive' => 0.25]

0 commit comments

Comments
 (0)