Download the PHP package joggapp/laravel-natural-language without Composer
On this page you can find all versions of the php package joggapp/laravel-natural-language. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-natural-language
THIS PACKAGE IS NO LONGER ACTIVELY MAINTAINED. USERS ARE ADVISED TO REPLACE IT WITH ALTERNATIVES.
Laravel package for the Google Natural language API
This package makes using the Google Natural API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API. All methods accept a string and return an array: Docs below.
Installation
-
You can install this package via composer using this command:
-
The package will automatically register itself.
-
We have documented how to setup the project and get the necessary configurations from the Google Cloud Platform console in a step by step detailed manner over here.
- You can publish the config file using the following command:
This will create the package's config file called naturallanguage.php
in the config
directory. These are the contents of the published config file:
How to use
-
After setting up the config file values you are all set to use the following methods :smile:
-
Detect the Sentiment: Accepts a string and returns an array.
-
Detect the Entities: Accepts a string and returns an array.
-
Detect the Sentiment per entity basis: Accepts a string and returns an array.
-
Detect the syntax: Accepts a string and returns an array.
-
Detect the categories: Accepts a string and returns an array.
- Annotate text: Accepts a string and an optional
features
array & returns an array.
Testing
You can run the tests with:
Changelog
Please see the CHANGELOG for more information about what has changed recently.
Security
If you discover any security related issues, please email them to [email protected] instead of using the issue tracker.
Credits
- Harish Toshniwal
- All Contributors
License
The MIT License (MIT). Please see the License File for more information.