拼写检查
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v2/text/spell_check
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v2/text/spell_check' \
--header 'Authorization;' \
--header 'content-type: application/json' \
--data-raw '{
"response_as_dict": true,
"attributes_as_list": false,
"show_original_response": false
}'
响应示例响应示例
200 - 成功示例
{
"ai21labs": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "wrld!",
"type": "Spelling",
"offset": 7,
"length": 5,
"suggestions": [
{
"suggestion": "world!",
"score": null
}
]
},
{
"text": "r yu?",
"type": "Spelling",
"offset": 17,
"length": 5,
"suggestions": [
{
"suggestion": "are you?",
"score": null
}
]
}
]
},
"nlpcloud": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "Hollo, wrld! How r yu?",
"type": null,
"offset": 0,
"length": 26,
"suggestions": [
{
"suggestion": "Hello, world! How are you?",
"score": null
}
]
}
]
},
"openai": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "Hollo",
"type": null,
"offset": 0,
"length": 5,
"suggestions": [
{
"suggestion": "Text",
"score": 1
}
]
},
{
"text": "wrld",
"type": null,
"offset": 7,
"length": 4,
"suggestions": [
{
"suggestion": "Hello",
"score": 1
}
]
},
{
"text": "How",
"type": null,
"offset": 13,
"length": 3,
"suggestions": [
{
"suggestion": "world",
"score": 1
}
]
},
{
"text": "r",
"type": null,
"offset": 17,
"length": 1,
"suggestions": [
{
"suggestion": "How",
"score": 1
}
]
},
{
"text": "yu",
"type": null,
"offset": 19,
"length": 2,
"suggestions": [
{
"suggestion": "are",
"score": 1
}
]
}
]
},
"microsoft": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "Hollo",
"type": "UnknownToken",
"offset": 0,
"length": 5,
"suggestions": [
{
"suggestion": "hello",
"score": 1
}
]
},
{
"text": "wrld",
"type": "UnknownToken",
"offset": 7,
"length": 4,
"suggestions": [
{
"suggestion": "world",
"score": 1
}
]
},
{
"text": "yu",
"type": "UnknownToken",
"offset": 19,
"length": 2,
"suggestions": [
{
"suggestion": "you",
"score": 1
}
]
}
]
},
"cohere": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "Hollo",
"type": null,
"offset": 0,
"length": 5,
"suggestions": [
{
"suggestion": "Hello",
"score": 1
}
]
},
{
"text": "wrld",
"type": null,
"offset": 7,
"length": 4,
"suggestions": [
{
"suggestion": "world",
"score": 1
}
]
},
{
"text": "yu",
"type": null,
"offset": 19,
"length": 2,
"suggestions": [
{
"suggestion": "you",
"score": 1
}
]
}
]
},
"sapling": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "Hollo",
"type": null,
"offset": 0,
"length": 5,
"suggestions": [
{
"suggestion": "Hello",
"score": null
}
]
},
{
"text": "wrld",
"type": null,
"offset": 7,
"length": 4,
"suggestions": [
{
"suggestion": "world",
"score": null
}
]
}
]
},
"prowritingaid": {
"text": "Hollo, wrld! How r yu?",
"items": [
{
"text": "wrld",
"type": "Unknown word: wrld",
"offset": 7,
"length": 4,
"suggestions": [
{
"suggestion": "WRLD",
"score": null
},
{
"suggestion": "wild",
"score": null
},
{
"suggestion": "weld",
"score": null
}
]
},
{
"text": "yu",
"type": "Unknown word: yu",
"offset": 19,
"length": 2,
"suggestions": [
{
"suggestion": "you",
"score": null
},
{
"suggestion": "ye",
"score": null
},
{
"suggestion": "ya",
"score": null
},
{
"suggestion": "mu",
"score": null
},
{
"suggestion": "nu",
"score": null
}
]
}
]
}
}
请求参数
Header 参数
content-type
string
必需
示例值:
application/json
Authorization
string
必需
默认值:
Bearer <your_key>
Body 参数application/json
返回响应
修改于 2024-04-11 06:56:04