用了php
garywork 发布于2019-10 浏览:1428 回复:1
0
收藏
快速回复
最后编辑于2020-07

 

public function getInfo(){
$post =$this->request->post();
$infos = $post['infos'];

// 你的 APPID AK SK
define('APP_ID','1111111111');
define('API_KEY','1111111');
define('SECRET_KEY','1111111');
$client = new \AipNlp(APP_ID, API_KEY, SECRET_KEY);
$text = "百度是一家高科技公司";
// 调用词法分析
$client->lexerCustom($text);
$a = json_encode($client);
//var_dump($client);
$arr=['code'=>0,'msg'=> $client];
return $arr;
}

收藏
点赞
0
个赞
共1条回复 最后由饭小团回复于2020-07
#2饭小团回复于2020-07

厉害

0
TOP
切换版块