wqy
2020-05-26 10:23:36
3938

服务地址:http://ai.baidu.com/tech/nlp_apply/address

 

 

创建应用

 

下载demo

https://ai.baidu.com/sdk

 

说明文档

https://ai.baidu.com/ai-doc/NLP/Mk6z52c9h

 

require '../extend/aip-php-sdk-2.2.19/AipNlp.php';
// 你的 APPID AK SK
const APP_ID = '你的 App ID';
const API_KEY = '你的 Api Key';
const SECRET_KEY = '你的 Secret Key';

$client = new \AipNlp(APP_ID, API_KEY, SECRET_KEY);

$client->address($text);


 

返回结果

 

{
"province": "上海市",
"city": "上海市",
"province_code": "310000",
"log_id": 5903383096584662266,
"text": "上海市浦东新区纳贤路701号百度上海研发中心 F4A000 张三",
"town": "张江镇",
"phonenum": "",
"detail": "纳贤路701号百度上海研发中心F4A000",
"county": "浦东新区",
"person": "张三",
"town_code": "310115125",
"county_code": "310115",
"city_code": "310100"
}