检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
需提前安装requests,执行pip install requests import requests import json def nlp_demo(): url = 'https://{endpoint}/v1/{project_id}/nlp-fundamental
请求示例 请求示例(计算文本语义相似度) POST https://{endpoint}/v1/{project_id}/nlp-fundamental/text-similarity Request Header: Content-Type: application/json
请求示例 请求示例(判断“XXX去屑洗发水,全国包邮”是否是广告) POST https://{endpoint}/v1/{project_id}/nlu/classification Request Header: Content-Type: application/
请求示例 请求示例(计算句向量) POST https://{endpoint}/v1/{project_id}/nlp-fundamental/sentence-embedding Request Header: Content-Type: application/json
URL url = new URL("https://{{endpoint}}/v1/{{project_id}/machine-translation/language-detection"); String token = "对应region的token
需提前安装requests,执行pip install requests import requests import json def nlp_demo(): url = 'https://{endpoint}/v1/{project_id}/nlp-fundamental
需提前安装requests,执行pip install requests import requests import json def nlp_demo(): url = 'https://{endpoint}/v1/{project_id}/nlu/sentiment
请求示例 请求示例(检测金融领域中云端金融在杭州云端金融信息服务有限公司涉嫌非法吸取公众存款案例的正负面分析) POST https://nlp-ext.cn-north-4.myhuaweicloud.com/v1/{{project_id}}/nlu/entity-sentiment
需提前安装requests,执行pip install requests import requests import json def nlp_demo(): url = 'https://{endpoint}/v1/{project_id}/nlp-fundamental
请求示例 请求示例(意图理解) POST https://{endpoint}/v1/{project_id}/nlu/semantic-parser Request Header: Content-Type: application/json X-Auth-Token
的属性级情感) POST https://nlp-ext.cn-north-4.myhuaweicloud.com/v1/{{project_id}}/nlu/aspect-sentiment Request Header: Content-Type: application/json
POST https://iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens Request Header: Content-Type: application/json Request Body: { "auth": {
请求示例 请求示例(文本翻译) POST https://{endpoint}/v1/{project_id}/machine-translation/text-translation Request Header: Content-Type:application/
请求示例 请求示例(抽取关键词,且返回关键词的最大数量为8) POST https://{endpoint}/v1/{project_id}/nlp-fundamental/keyword-extraction Request Header: Content-Type:
需提前安装requests,执行pip install requests import requests import json def nlp_demo(): url = 'https://{endpoint}/v1/{project_id}/nlp-fundamental
请求示例 请求示例(分析汽车领域用户评论的属性级情感) POST https://nlp-ext.cn-north-4.myhuaweicloud.com/v1/{{project_id}}/nlu/aspect-sentiment/advance Request Header:
请求示例 请求示例(文档分类) POST https://nlp-ext.cn-north-4.myhuaweicloud.com/v1/{project_id}/nlu/doc-classification Request Header: Content-Type: application
(HttpMethodEnum.GET, expireSeconds); request.setBucketName("bucketname"); request.setObjectKey("objectname"); // 获取临时url,临时授权URL格式如下: // https
图3 Token认证 单击右上角“Send”,发送“POST https://iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens”获取返回结果Headers中的token值(Token有效期为24小时)。
需提前安装requests,执行pip install requests import requests import json def nlp_demo(): url = 'https://{endpoint}/v1/{project_id}/nlp-fundamental