{"id":36281668,"url":"https://github.com/sharpapi/laravel-tth-review-sentiment","last_synced_at":"2026-02-21T12:02:37.242Z","repository":{"id":331823403,"uuid":"1131198190","full_name":"sharpapi/laravel-tth-review-sentiment","owner":"sharpapi","description":"Laravel package for SharpAPI.com - laravel-tth-review-sentiment","archived":false,"fork":false,"pushed_at":"2026-01-09T16:13:19.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T13:50:39.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharpapi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T16:13:17.000Z","updated_at":"2026-01-09T16:13:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sharpapi/laravel-tth-review-sentiment","commit_stats":null,"previous_names":["sharpapi/laravel-tth-review-sentiment"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sharpapi/laravel-tth-review-sentiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-tth-review-sentiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-tth-review-sentiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-tth-review-sentiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-tth-review-sentiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpapi","download_url":"https://codeload.github.com/sharpapi/laravel-tth-review-sentiment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-tth-review-sentiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T09:06:03.962Z","updated_at":"2026-01-13T23:29:28.279Z","avatar_url":"https://github.com/sharpapi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Travel \u0026 Hospitality Review Sentiment Analyzer for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/sharpapi/laravel-tth-review-sentiment.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-tth-review-sentiment)\n[![Total Downloads](https://img.shields.io/packagist/dt/sharpapi/laravel-tth-review-sentiment.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-tth-review-sentiment)\n\nThis package provides a Laravel integration for the SharpAPI Travel \u0026 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.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require sharpapi/laravel-tth-review-sentiment\n```\n\n## Configuration\n\nPublish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"sharpapi-tth-review-sentiment\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'api_key' =\u003e env('SHARP_API_KEY'),\n    'base_url' =\u003e env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),\n    'api_job_status_polling_wait' =\u003e env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),\n    'api_job_status_polling_interval' =\u003e env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),\n    'api_job_status_use_polling_interval' =\u003e env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),\n];\n```\n\nMake sure to set your SharpAPI key in your .env file:\n\n```\nSHARP_API_KEY=your-api-key\n```\n\n## Usage\n\n```php\nuse SharpAPI\\TthReviewSentiment\\TthReviewSentimentService;\n\n$service = new TthReviewSentimentService();\n\n// Analyze a travel or hospitality review\n$sentiment = $service-\u003etravelReviewSentiment(\n    'The hotel room was spacious and clean, but the staff was not very helpful and the breakfast was disappointing.'\n);\n\n// $sentiment will contain a JSON string with the sentiment analysis result\n```\n\n## Parameters\n\n- `text` (string): The review text to analyze for sentiment\n\n## Response Format\n\nThe response is a JSON string containing the sentiment analysis:\n\n```json\n{\n  \"data\": {\n    \"type\": \"api_job_result\",\n    \"id\": \"f85b7ac5-33cd-4796-8935-dc8c22219946\",\n    \"attributes\": {\n      \"status\": \"success\",\n      \"type\": \"tth_review_sentiment\",\n      \"result\": {\n        \"score\": 95,\n        \"opinion\": \"POSITIVE\"\n      }\n    }\n  }\n}\n```\n\nPossible opinion values:\n- `POSITIVE`: The review is predominantly positive\n- `NEGATIVE`: The review is predominantly negative\n- `NEUTRAL`: The review is neutral or balanced\n\nThe score is a value between 0 and 100, representing the confidence level of the sentiment analysis.\n\n## Features\n\n- Analyzes travel and hospitality reviews for sentiment\n- Provides a confidence score for the sentiment analysis\n- Identifies specific positive and negative aspects mentioned in the review\n- Works with reviews for hotels, restaurants, tours, activities, and other travel-related services\n- Helps businesses understand customer feedback at scale\n\n## Credits\n\n- [Dawid Makowski](https://github.com/dawidmakowski)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-tth-review-sentiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpapi%2Flaravel-tth-review-sentiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-tth-review-sentiment/lists"}