2017 © Pedro Peláez
 

library alchemyapi

AlchempyApi PHP Wrapper

image

lok0613/alchemyapi

AlchempyApi PHP Wrapper

  • Wednesday, November 30, 2016
  • by lok0613
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Usage

For example, in order to get the result for "Emotion Analysis", http://www.ibm.com/watson/developercloud/alchemy-language/api/v1/?curl#emotion_analysis. Select the input type, then you can find these at right hand side., (*1)

POST /text/TextGetEmotion

Implementation as below,, (*2)

use Lok0613\AlchemyApi\AlchemyApi;

$alchemyApi = new AlchemyApi('api-key');
$res = $alchemyApi->getEmotion('text', [
    'text' => 'I go to school by bus',
]);

the return will be,, (*3)

{
    "status": "OK",
    "usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",
    "totalTransactions": "1",
    "language": "english",
    "docEmotions": {
        "anger": "0.196838",
        "disgust": "0.088342",
        "fear": "0.491799",
        "joy": "0.069452",
        "sadness": "0.222289"
    }
}

The Versions

30/11 2016

dev-master

9999999-dev

AlchempyApi PHP Wrapper

  Sources   Download

MIT

The Requires

 

by Lok Chun Wai

alchemy alchemyapi ibm bluemix alchemy api

30/11 2016

v1.0

1.0.0.0

AlchempyApi PHP Wrapper

  Sources   Download

MIT

The Requires

 

by Lok Chun Wai

alchemy alchemyapi ibm bluemix alchemy api