PHPackages                             joggapp/laravel-natural-language - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. joggapp/laravel-natural-language

Abandoned → [google/cloud-language](/?search=google%2Fcloud-language)Library[API Development](/categories/api)

joggapp/laravel-natural-language
================================

Laravel package for the Google Natural language API

v8.0.0(3y ago)26016.4k17MITPHPPHP ^8.1

Since Oct 11Pushed 2y ago8 watchersCompare

[ Source](https://github.com/JoggApp/laravel-natural-language)[ Packagist](https://packagist.org/packages/joggapp/laravel-natural-language)[ RSS](/packages/joggapp-laravel-natural-language/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (16)Used By (0)

THIS PACKAGE IS NO LONGER ACTIVELY MAINTAINED. USERS ARE ADVISED TO REPLACE IT WITH ALTERNATIVES.
=================================================================================================

[](#this-package-is-no-longer-actively-maintained-users-are-advised-to-replace-it-with-alternatives)

Laravel package for the Google Natural language API
===================================================

[](#laravel-package-for-the-google-natural-language-api)

[![Latest Version](https://camo.githubusercontent.com/013c3910fbc01257d224730ce743590e06dc7109141677d1dc7c84e327034f46/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4a6f67674170702f6c61726176656c2d6e61747572616c2d6c616e67756167652e7376673f7374796c653d666c61742d726f756e646564)](https://github.com/JoggApp/laravel-natural-language/releases)[![](https://github.com/JoggApp/laravel-natural-language/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/JoggApp/laravel-natural-language/workflows/Run%20Tests/badge.svg?branch=master)[![Total Downloads](https://camo.githubusercontent.com/d670e068ae5ad5793daccb2206163047ecf94d90d8c77933e462980be7a28baf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4a6f67674170702f6c61726176656c2d6e61747572616c2d6c616e67756167652e7376673f7374796c653d666c61742d726f756e64656426636f6c6f72423d627269676874677265656e)](https://packagist.org/packages/JoggApp/laravel-natural-language)

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.](https://github.com/JoggApp/laravel-natural-language/#how-to-use)

[![natural](https://user-images.githubusercontent.com/11228182/46806140-765d4000-cd84-11e8-9d88-e71338d53376.png)](https://user-images.githubusercontent.com/11228182/46806140-765d4000-cd84-11e8-9d88-e71338d53376.png)

Installation
------------

[](#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.](https://github.com/JoggApp/laravel-natural-language/blob/master/google.md)
- 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
----------

[](#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 &amp; returns an array.

```
NaturalLanguage::annotateText(string $text, array $features = ['sentiment', 'syntax']): array
```

Testing
-------

[](#testing)

You can run the tests with:

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

Please see the [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email them to  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harish Toshniwal](https://github.com/introwit)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see the [License File](LICENSE.txt) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 91.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~217 days

Total

15

Last Release

1184d ago

Major Versions

v3.0.1 → v4.0.02020-03-03

v4.0.0 → v5.0.02020-09-10

v5.0.0 → v6.0.02020-09-28

v6.0.1 → v7.0.02022-02-11

v7.0.1 → v8.0.02023-02-14

PHP version history (5 changes)v1.0.0PHP ^7.2

v4.0.0PHP ^7.3

v6.0.1PHP ^7.4|^8.0

v7.0.0PHP ^8.0

v8.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a1501b9c7151803b2ecc58be89cec4f7e8adaf1753831dc3fb6b8631c9e4e6d?d=identicon)[introwit](/maintainers/introwit)

---

Top Contributors

[![introwit](https://avatars.githubusercontent.com/u/11228182?v=4)](https://github.com/introwit "introwit (21 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")[![wwwroth](https://avatars.githubusercontent.com/u/3310210?v=4)](https://github.com/wwwroth "wwwroth (1 commits)")

---

Tags

googlegoogle-natural-language-apilaravellaravel-packagepackagephpapilaravelgooglepackagenatural-language

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joggapp-laravel-natural-language/health.svg)

```
[![Health](https://phpackages.com/badges/joggapp-laravel-natural-language/health.svg)](https://phpackages.com/packages/joggapp-laravel-natural-language)
```

###  Alternatives

[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[bmatovu/laravel-mtn-momo

Laravel MTN MOMO integration.

14310.9k](/packages/bmatovu-laravel-mtn-momo)[hosseinhezami/laravel-gemini

A production-ready Laravel package to integrate with the Google Gemini API. Supports text, image, video, audio, long-context, structured output, files, caching, function-calling and understanding capabilities.

14010.8k1](/packages/hosseinhezami-laravel-gemini)[mbarwick83/shorty

Google Url Shortener API Package for Laravel 5.1

31204.9k](/packages/mbarwick83-shorty)[gemini-api-php/laravel

Gemini API client for Laravel

8915.7k](/packages/gemini-api-php-laravel)[gregoriohc/laravel-trello

A Laravel wrapper and facade package for the Trello API

3366.8k2](/packages/gregoriohc-laravel-trello)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
