语法错误更正
POST
https://api.ai21.com/studio/v1/gec请求参数
Body 参数application/json
text
string
必需
要更正的输入文本。 文本长度不应超过 500 个字符。
示例
{
"text": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
必需
corrections
array [object {5}]
必需
suggestion
string
必需
startIndex
integer
必需
endIndex
integer
必需
originalText
string
必需
correctionType
string
必需
示例
{
"id": "e6360a99-701b-813b-7296-f08057918320",
"corrections": [
{
"suggestion": "It is",
"startIndex": 0,
"endIndex": 8,
"originalText": "It is is",
"correctionType": "Word Repetition"
},
{
"suggestion": "doesn't",
"startIndex": 43,
"endIndex": 49,
"originalText": "doesnt",
"correctionType": "Grammar"
},
{
"suggestion": "difficult",
"startIndex": 60,
"endIndex": 68,
"originalText": "difikolt",
"correctionType": "Spelling"
},
{
"suggestion": "lunch?",
"startIndex": 122,
"endIndex": 127,
"originalText": "lunch",
"correctionType": "Punctuation"
}
]
}
最后修改时间: 1 年前