定制 lok0613/alchemyapi 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lok0613/alchemyapi

Composer 安装命令:

composer require lok0613/alchemyapi

包简介

AlchempyApi PHP Wrapper

README 文档

README

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.

POST /text/TextGetEmotion

Implementation as below,

use Lok0613\AlchemyApi\AlchemyApi;

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

the return will be,

{
    "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"
    }
}

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固