Download the PHP package tootootltd/azure-text-analytics without Composer
On this page you can find all versions of the php package tootootltd/azure-text-analytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tootootltd/azure-text-analytics
More information about tootootltd/azure-text-analytics
Files in tootootltd/azure-text-analytics
Package azure-text-analytics
Short Description A Laravel wrapper around Azure's Text Analytics API. Including; Sentiment Analysis, Key Phrase Extraction, Named Entity Recognition, and Language Detection
License MIT
Homepage https://github.com/tootootltd/azure-text-analytics
Informations about the package azure-text-analytics
PHP Azure Text Analytics
A very simple wrapper around version 3.0 of Azure Cognitive Services' Text Analytics API: https://docs.microsoft.com/en-gb/azure/cognitive-services/text-analytics/
Installation
You can install the package via composer:
Publish the config file and put your Azure Cognitive Services endpoint and key in your env file.
Requirements
- An Azure Cognitive Services endpoint and key.
- PHP 7.4
Usage
This package supports all 5 Text Analytics endpoints and each return the full raw response body.
You can pass your text into the constructor in a few different formats:
String
String and ID
Multiple strings and ID's
Just pass any of these into the constructor.
This package will do a bit of validation on your text before hitting Azure's API, such as;
- Checking the length of each
document
(string of text) and the number ofdocuments
per request to ensure they aren't above the Azure API's limits (5,120
characters and1,000
documents at time of writing respectively). In both these instances anExceededApiLimit
exception will be thrown. More info on these limits can be found on Azure's documentation. - Ensuring that the required fields are present when passing an array (
id
andtext
at time of writing). More info on these can be found on Azure's documentation.
Methods:
Sentiment Analysis - View example response
Key Phrases - View example response
Language Detection - View example response
Named Entity Recognition - View example response
Entity Linking - View example response
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of azure-text-analytics with dependencies
guzzlehttp/guzzle Version ^6.0|^7.0.1
illuminate/support Version ^7.7|^8.0|^9.0