{
    "openapi": "3.0.0",
    "info": {
        "title": "文本智能纠错 - API文档",
        "version": "1.0.0",
        "description": "自动识别一段短文本中的错别字，具体片段、错别字在文本中的位置，对应的正确词组以及可信度和最终纠错后的结果。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/ecnet\/index": {
            "get": {
                "summary": "文本智能纠错",
                "tags": [
                    "文本智能纠错"
                ],
                "description": "传递文本信息自动找出错别字",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "content",
                        "in": "query",
                        "description": "文本内容，最大250字符数",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "天行数据是一个友秀的只能平台",
                            "description": "文本内容，最大250字符数"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "score": {
                                            "type": "float",
                                            "example": "0.582378",
                                            "description": "可信度，最大1"
                                        },
                                        "+end_pos": {
                                            "type": "int",
                                            "example": 27,
                                            "description": "终点位置（字节长度）"
                                        },
                                        "fragment": {
                                            "type": "object",
                                            "description": "具体的纠错片段"
                                        },
                                        "+ori_frag": {
                                            "type": "string",
                                            "example": "个友秀",
                                            "description": "错别字片段"
                                        },
                                        "+begin_pos": {
                                            "type": "int",
                                            "example": 18,
                                            "description": "起点位置（字节长度）"
                                        },
                                        "+correct_frag": {
                                            "type": "string",
                                            "example": "个优秀",
                                            "description": "替换后的结果"
                                        },
                                        "correct_result": {
                                            "type": "string",
                                            "example": "天行数据是一个优秀的智能平台\"",
                                            "description": "替换后的完整结果"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "score": 0.582378,
                                        "fragment": [
                                            {
                                                "end_pos": 27,
                                                "ori_frag": "个友秀",
                                                "begin_pos": 18,
                                                "correct_frag": "个优秀"
                                            },
                                            {
                                                "end_pos": 36,
                                                "ori_frag": "只能",
                                                "begin_pos": 30,
                                                "correct_frag": "智能"
                                            }
                                        ],
                                        "correct_result": "天行数据是一个优秀的智能平台"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "文本智能纠错",
                "tags": [
                    "文本智能纠错"
                ],
                "description": "传递文本信息自动找出错别字",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "content": {
                                        "type": "string",
                                        "example": "天行数据是一个友秀的只能平台",
                                        "description": "文本内容，最大250字符数"
                                    }
                                },
                                "required": [
                                    "key",
                                    "content"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "score": {
                                            "type": "float",
                                            "example": "0.582378",
                                            "description": "可信度，最大1"
                                        },
                                        "+end_pos": {
                                            "type": "int",
                                            "example": 27,
                                            "description": "终点位置（字节长度）"
                                        },
                                        "fragment": {
                                            "type": "object",
                                            "description": "具体的纠错片段"
                                        },
                                        "+ori_frag": {
                                            "type": "string",
                                            "example": "个友秀",
                                            "description": "错别字片段"
                                        },
                                        "+begin_pos": {
                                            "type": "int",
                                            "example": 18,
                                            "description": "起点位置（字节长度）"
                                        },
                                        "+correct_frag": {
                                            "type": "string",
                                            "example": "个优秀",
                                            "description": "替换后的结果"
                                        },
                                        "correct_result": {
                                            "type": "string",
                                            "example": "天行数据是一个优秀的智能平台\"",
                                            "description": "替换后的完整结果"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "score": 0.582378,
                                        "fragment": [
                                            {
                                                "end_pos": 27,
                                                "ori_frag": "个友秀",
                                                "begin_pos": 18,
                                                "correct_frag": "个优秀"
                                            },
                                            {
                                                "end_pos": 36,
                                                "ori_frag": "只能",
                                                "begin_pos": 30,
                                                "correct_frag": "智能"
                                            }
                                        ],
                                        "correct_result": "天行数据是一个优秀的智能平台"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}