All Projects → JoggApp → Laravel Natural Language

JoggApp / Laravel Natural Language

Licence: mit
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.

Projects that are alternatives of or similar to Laravel Natural Language

Blogetc
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.
Stars: ✭ 198 (+66.39%)
Mutual labels:  laravel, laravel-package, package
Laravel Google Translate
This package makes using the Google Translate API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API.
Stars: ✭ 97 (-18.49%)
Mutual labels:  laravel, laravel-package, package
Laravel Short Url
A Laravel package to shorten urls
Stars: ✭ 127 (+6.72%)
Mutual labels:  laravel, laravel-package, package
Laravel Multilingual Routes
A package to handle multilingual routes in your Laravel application.
Stars: ✭ 241 (+102.52%)
Mutual labels:  laravel, laravel-package, package
Laravel Gitscrum
GitScrum is a Project Management Tool, developed to help entrepreneurs, freelancers, managers, and teams Skyrocket their Productivity with the Agile methodology and Gamification.
Stars: ✭ 2,686 (+2157.14%)
Mutual labels:  laravel, laravel-package, package
Laravel Aws Sns
Laravel package for the AWS SNS Events
Stars: ✭ 24 (-79.83%)
Mutual labels:  laravel, laravel-package, package
Package Skeleton
📦 My base for PHP packages.
Stars: ✭ 6 (-94.96%)
Mutual labels:  laravel, laravel-package, package
Laravel Pdf
A Simple package for easily generating PDF documents from HTML. This package is specially for laravel but you can use this without laravel.
Stars: ✭ 79 (-33.61%)
Mutual labels:  laravel, laravel-package, package
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (-19.33%)
Mutual labels:  laravel, laravel-package
Laravel Tracer
Shows the path of each blade file loaded in a template
Stars: ✭ 96 (-19.33%)
Mutual labels:  laravel, laravel-package
Elasticsearch Eloquent
⚡️ Eloquent models for Elasticsearch.
Stars: ✭ 100 (-15.97%)
Mutual labels:  laravel, laravel-package
Flex Env
🌳 Manage your .env file in Laravel projects through artisan
Stars: ✭ 95 (-20.17%)
Mutual labels:  laravel, package
Laravel Likeable
Rate Eloquent models with Likes and Dislikes in Laravel. Development moved to Laravel Love package!
Stars: ✭ 95 (-20.17%)
Mutual labels:  laravel, package
Laravel Amp
Package that helps you set up AMP (Accelerated Mobile Pages) using Laravel
Stars: ✭ 106 (-10.92%)
Mutual labels:  google, laravel
Laravel Sitemap
Create and generate sitemaps with ease
Stars: ✭ 1,325 (+1013.45%)
Mutual labels:  google, laravel
Laravel Factory Prefill
Prefills factories with faker method suggestions to increase productivity
Stars: ✭ 104 (-12.61%)
Mutual labels:  laravel, package
Admin One Laravel Dashboard
Admin One — Free Laravel Dashboard (Bulma Buefy Vue.js SPA)
Stars: ✭ 94 (-21.01%)
Mutual labels:  laravel, laravel-package
Laravel Stats
📈 Get insights about your Laravel or Lumen Project
Stars: ✭ 1,386 (+1064.71%)
Mutual labels:  laravel, laravel-package
Laravel Enum
Elegant Enum implementation for Laravel
Stars: ✭ 107 (-10.08%)
Mutual labels:  laravel, laravel-package
Nova Indicator Field
A colour-coded indicator field for Laravel Nova
Stars: ✭ 108 (-9.24%)
Mutual labels:  laravel, laravel-package

Laravel package for the Google Natural language API

Latest Version Total Downloads

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.

natural

Installation

  • You can install this package via composer using this command:
composer require joggapp/laravel-natural-language
  • 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:

php artisan vendor:publish --provider="JoggApp\NaturalLanguage\NaturalLanguageServiceProvider"

This will create the package's config file called naturallanguage.php in the config directory. These are the contents of the published config file:

return [
    /*
    |--------------------------------------------------------------------------
    | The id of project created in the Google Cloud Platform console.
    |--------------------------------------------------------------------------
    */
    'project_id' => env('NATURAL_LANGUAGE_PROJECT_ID', 'sample-12345'),

    /*
    |--------------------------------------------------------------------------
    | Path to the json file containing the authentication credentials.
    |--------------------------------------------------------------------------
    */
    'key_file_path' => base_path('composer.json'),
];

How to use

  • After setting up the config file values you are all set to use the following methods 😄

  • Detect the Sentiment: Accepts a string and returns an array.

NaturalLanguage::sentiment(string $text): array
  • Detect the Entities: Accepts a string and returns an array.
NaturalLanguage::entities(string $text): array
  • Detect the Sentiment per entity basis: Accepts a string and returns an array.
NaturalLanguage::entitySentiment(string $text): array
  • Detect the syntax: Accepts a string and returns an array.
NaturalLanguage::syntax(string $text): array
  • Detect the categories: Accepts a string and returns an array.
NaturalLanguage::categories(string $text): array
  • Annotate text: Accepts a string and an optional features array & returns an array.
NaturalLanguage::annotateText(string $text, array $features = ['sentiment', 'syntax']): array

Testing

You can run the tests with:

vendor/bin/phpunit

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

License

The MIT License (MIT). Please see the License File for more information.

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].