在composer.json中添加
"thefunpower/baidu_nlp": "dev-main"
baidu_nlp_app_id
baidu_nlp_app_key
baidu_nlp_app_secret
$client = get_baidu_nlp();
$text = "上海市浦东新区纳贤路701号百度上海研发中心 F4A000 张三";
// 调用地址识别接口
$res = $client->address($text);
get_baidu_nlp_address($address)
字段 | 说明 |
---|---|
province | 省 |
city | 市 |
region | 区 |
street | 详细地址 |
mobile | 手机号 |
name | 姓名 |