匿名化
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v2/text/anonymization
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v2/text/anonymization' \
--header 'Authorization;' \
--header 'content-type: application/json' \
--data-raw '{
"response_as_dict": true,
"attributes_as_list": false,
"show_original_response": false
}'
响应示例响应示例
200 - 成功示例
{
"amazon": {
"result": "The phone number of *** is the **************.",
"entities": [
{
"offset": 20,
"length": 3,
"category": "PersonalInformation",
"subcategory": "Name",
"original_label": "NAME",
"content": "Luc",
"confidence_score": 1
},
{
"offset": 31,
"length": 14,
"category": "DateAndTime",
"subcategory": "DateTime",
"original_label": "DATE_TIME",
"content": "06 21 32 43 54",
"confidence_score": 0.877
}
]
},
"emvista": {
"result": "The phone number of *** is the 06 21 ** 43 54.",
"entities": [
{
"offset": 37,
"length": 12,
"category": "DateAndTime",
"subcategory": "Duration",
"original_label": "Thing/Abstract/Time",
"content": "the 06 21 32",
"confidence_score": null
},
{
"offset": 20,
"length": 3,
"category": "PersonalInformation",
"subcategory": "Name",
"original_label": "Thing/Concrete/Animate/Livingbeing/Human",
"content": "Luc",
"confidence_score": null
}
]
},
"openai": {
"result": "The phone number of *** is the **************.",
"entities": [
{
"offset": 20,
"length": 3,
"category": "PersonalInformation",
"subcategory": "Name",
"original_label": "name",
"content": "Luc",
"confidence_score": 0.9
},
{
"offset": 31,
"length": 14,
"category": "PersonalInformation",
"subcategory": "Phone",
"original_label": "phonenumber",
"content": "06 21 32 43 54",
"confidence_score": 0.95
}
]
},
"microsoft": {
"result": "The phone number of *** is the **************.",
"entities": [
{
"offset": 20,
"length": 3,
"category": "PersonalInformation",
"subcategory": "Name",
"original_label": "Person",
"content": "Luc",
"confidence_score": 0.99
},
{
"offset": 31,
"length": 14,
"category": "PersonalInformation",
"subcategory": "Phone",
"original_label": "PhoneNumber",
"content": "06 21 32 43 54",
"confidence_score": 0.8
}
]
}
}
请求参数
Header 参数
content-type
string
必需
示例值:
application/json
Authorization
string
必需
默认值:
Bearer <your_key>
Body 参数application/json
返回响应
修改于 2024-04-11 06:04:46