choccybiccy / sentiment
Sentiment analysis using the DatumBox API
1.0.0
2015-04-08 11:48 UTC
Requires
- guzzlehttp/guzzle: ~5.2
Requires (Dev)
- phpunit/phpunit: ~4.6
This package is auto-updated.
Last update: 2024-10-23 12:30:59 UTC
README
Various analysis tools using the Datumbox API.
Prerequisites
As this API uses web services from Datumbox you'll need to register an account with them to obtain an API key.
http://www.datumbox.com/users/register/
Installation
Installation is a cinch with composer..
composer require choccybiccy/sentiment
Usage
use Choccybiccy\Sentiment\Factory; $factory = new Factory(); $sentiment = $factory->create( Factory::ENDPOINT_ANALYSIS_SENTIMENT, "MyApiKey" ); $result = $sentiment->analyse("I don't like her, I love her!"); echo "The sentiment is " . $result->getResult(); # Will return: The sentiment is positive
Available endpoints
Testing
vendor/bin/phpunit
Authors
Written and maintained by Martin Hughes.
Thanks
Thanks to Datumbox for providing the web services.
Copyright & licensing
See LICENSE