PHPackages                             sharpapi/laravel-tth-review-sentiment - 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. sharpapi/laravel-tth-review-sentiment

ActiveLibrary[API Development](/categories/api)

sharpapi/laravel-tth-review-sentiment
=====================================

AI Travel &amp; Hospitality Review Sentiment Analysis for Laravel powered by SharpAPI.com

v1.0.3(1mo ago)00MITPHPPHP ^8.1

Since Jan 9Pushed 1mo agoCompare

[ Source](https://github.com/sharpapi/laravel-tth-review-sentiment)[ Packagist](https://packagist.org/packages/sharpapi/laravel-tth-review-sentiment)[ Docs](https://github.com/sharpapi/laravel-tth-review-sentiment)[ RSS](/packages/sharpapi-laravel-tth-review-sentiment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (5)Used By (0)

AI Travel &amp; Hospitality Review Sentiment Analyzer for Laravel
=================================================================

[](#ai-travel--hospitality-review-sentiment-analyzer-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/51414473ca051a87e2570414750d9448dcac37453dd714bbcfe5635261afd6ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686172706170692f6c61726176656c2d7474682d7265766965772d73656e74696d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/laravel-tth-review-sentiment)[![Total Downloads](https://camo.githubusercontent.com/b5d3708f18cd924e95ee46bc1327c078d17a6c034aa8151fe1567614316f595e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686172706170692f6c61726176656c2d7474682d7265766965772d73656e74696d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/laravel-tth-review-sentiment)

This package provides a Laravel integration for the SharpAPI Travel &amp; Hospitality Review Sentiment Analysis service. It allows you to analyze customer reviews for travel, tourism, and hospitality products to determine sentiment (positive, negative, or neutral) with a confidence score.

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

[](#installation)

You can install the package via composer:

```
composer require sharpapi/laravel-tth-review-sentiment
```

Configuration
-------------

[](#configuration)

Publish the config file with:

```
php artisan vendor:publish --tag="sharpapi-tth-review-sentiment"
```

This is the contents of the published config file:

```
return [
    'api_key' => env('SHARP_API_KEY'),
    'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
    'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
    'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
    'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
];
```

Make sure to set your SharpAPI key in your .env file:

```
SHARP_API_KEY=your-api-key

```

Usage
-----

[](#usage)

```
use SharpAPI\TthReviewSentiment\TthReviewSentimentService;

$service = new TthReviewSentimentService();

// Analyze a travel or hospitality review
$sentiment = $service->travelReviewSentiment(
    'The hotel room was spacious and clean, but the staff was not very helpful and the breakfast was disappointing.'
);

// $sentiment will contain a JSON string with the sentiment analysis result
```

Parameters
----------

[](#parameters)

- `text` (string): The review text to analyze for sentiment

Response Format
---------------

[](#response-format)

The response is a JSON string containing the sentiment analysis:

```
{
  "data": {
    "type": "api_job_result",
    "id": "f85b7ac5-33cd-4796-8935-dc8c22219946",
    "attributes": {
      "status": "success",
      "type": "tth_review_sentiment",
      "result": {
        "score": 95,
        "opinion": "POSITIVE"
      }
    }
  }
}
```

Possible opinion values:

- `POSITIVE`: The review is predominantly positive
- `NEGATIVE`: The review is predominantly negative
- `NEUTRAL`: The review is neutral or balanced

The score is a value between 0 and 100, representing the confidence level of the sentiment analysis.

Features
--------

[](#features)

- Analyzes travel and hospitality reviews for sentiment
- Provides a confidence score for the sentiment analysis
- Identifies specific positive and negative aspects mentioned in the review
- Works with reviews for hotels, restaurants, tours, activities, and other travel-related services
- Helps businesses understand customer feedback at scale

Credits
-------

[](#credits)

- [Dawid Makowski](https://github.com/dawidmakowski)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~25 days

Total

4

Last Release

43d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b500dd3d9b470b50b1ed911cd24a6fdcce51dd97dceb4f97879f727a14495a8?d=identicon)[dawid-makowski](/maintainers/dawid-makowski)

---

Top Contributors

[![makowskid](https://avatars.githubusercontent.com/u/6271194?v=4)](https://github.com/makowskid "makowskid (4 commits)")

---

Tags

phpapilaravelRESTful APIreviewstourismSharpAPIartificial intelligencenatural language processingsoftware developmentContent Analysisai apiAI-poweredapi integrationai capabilitiestravelsentiment analysishospitality

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sharpapi-laravel-tth-review-sentiment/health.svg)

```
[![Health](https://phpackages.com/badges/sharpapi-laravel-tth-review-sentiment/health.svg)](https://phpackages.com/packages/sharpapi-laravel-tth-review-sentiment)
```

PHPackages © 2026

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