# Generated by ShowAPI OpenAPI generator # source: market/1750 # generated-at: 2026-09-20T13:54:36.535Z openapi: 3.0.3 info: title: 自然语言处理 description: 一种帮助用户处理文本的人工智能技术,支持舆情识别、情感分析、翻译、信息抽取、分类、语法分析及相似度检测。 termsOfService: https://www.showapi.com/helpcenter/view#/4019/2 version: 1.0.0 servers: - url: https://route.showapi.com paths: /1750-12: x-pointCode: 12 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 25 post: summary: 依存句法分析 description: 该接口能够分析文本中的依存句法结构,通过词间依存关系呈现句法结构信息(如主谓、动宾、定中),并以树状结构表示整句结构(如主谓宾、定状补)。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功,其他表示失败 remark: type: string description: 错误信息 data: type: array items: type: object properties: items: type: array items: type: object properties: deprel: type: string description: 词与父节点的依存关系,详情请参考相关文档 postag: type: string description: 词性,详情请参考相关文档 id: type: number description: 词的id word: type: string description: 词 head: type: number description: 词的父节点ID description: 依存关系数组 text: type: string description: 原文本 description: 分析结果JSON description: 业务返回体 operationId: 1750_12_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: text: type: string description: 待分析的中文文本,请示使用utf-8编码,字节数不要超过256个 required: - text /1750-10: x-pointCode: 10 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 20 post: summary: 短文相似度对比 description: 该接口支持计算两个文本的相似度得分,并允许通过model参数选取不同的对比算法。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功,其他表示失败 remark: type: string description: 错误信息 data: type: array items: type: object properties: score: type: number description: 对比结果取值范围(0,1] texts: type: array items: type: object properties: text1: type: string description: 文本1 text2: type: string description: 文本2 description: 原文本JSON description: 对比结果JSON description: 业务返回体 operationId: 1750_10_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: text_1: type: string description: 短文1,使用utf-8字符编码,字节数不要超过512个 text_2: type: string description: 短文2,使用utf-8字符编码,字节数不要超过512个 model: type: string description: 对比算法,默认为"BOW",可选"BOW"、"CNN"与"GRNN" required: - text_1 - text_2 /1750-7: x-pointCode: 7 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 50 post: summary: 新闻智能分类 description: 新闻内容可依据类型自动分类,涵盖国际、体育、娱乐、科技等26个主流类别。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功 remark: type: string description: 错误信息 data: type: array items: type: object properties: lv1_tag_list: type: array items: type: object properties: score: type: number description: 分类得分,取值[0,1] tag: type: string description: 分类名称 description: 一级分类数组 lv2_tag_list: type: array items: type: object properties: score: type: number description: 分类得分,取值[0,1] tag: type: string description: 分类名称 description: 二级分类数组(可能为空) description: 分类结果JSON,其中二级分类数组可能为空 description: 业务返回体 operationId: 1750_7_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: title: type: string description: 新闻标题 content: type: string description: 新闻正文内容 required: - title - content /1750-5: x-pointCode: 5 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 20 post: summary: 文章标签提取 description: 该接口可分析文章标题与内容,输出反映关键信息的主题标签及其对应置信度。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功,其他均表示失败 data: type: array items: type: object properties: items: type: array items: type: object properties: tag: type: string description: 文章标签 score: type: number description: 权重值,在0-1之间取值 description: 关键词数组 description: 提取的标签结果JSON remark: type: string description: 错误信息 description: 业务返回体 operationId: 1750_5_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: title: type: string description: 文章标题,请使用utf-8编码 content: type: string description: 正文内容,请使用utf-8编码 required: - title - content /1750-4: x-pointCode: 4 x-mode: mapping x-read-timeout: 60 x-connect-timeout: 50 post: summary: 机器翻译(电商) description: 该翻译接口主要面向电商领域,支持中英、英西、英俄、英法、英葡互译。计费规则:按每百字符计费1次,不足百字符按1次计费,如610字符计费7次。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: Data: type: object properties: Translated: type: string description: 翻译结果 WordCount: type: string description: 计费字符数 ret_code: type: number description: 0表示翻译成功,按每百字符计费,例如翻译610个字符,则计费7次 remark: type: string description: 错误信息 RequestId: type: string description: 请求id showapi_fee_code: type: number Code: type: string description: 200表示成功,101表示参数错误,102表示网络错误,109为未知错误 description: 业务返回体 operationId: 1750_4_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: SourceText: type: string description: 待翻译的文本,字符编码请使用utf-8,字节长度不要超过2048 SourceLanguage: type: string description: 翻译原文语言代码,具体取值:en表示英文,zh表示中文,ru表示俄文,pt表示葡萄牙文,es表示西班牙文,fr表示法文 TargetLanguage: type: string description: 翻译目标语言代码,具体取值:en表示英文,zh表示中文,ru表示俄文,pt表示葡萄牙文,es表示西班牙文,fr表示法文 Scene: type: string description: 取值有三个可选,商品标题:title,商品描述:description,商品沟通:communication,不传某认为title required: - SourceText - SourceLanguage - TargetLanguage /1750-3: x-pointCode: 3 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 20 post: summary: 文本情感倾向分析 description: 该功能可分析包含主观观点的文本,判断其情感倾向(积极、消极或中性),并给出相应置信度。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功,其他均表示失败 data: type: array items: type: object properties: items: type: array items: type: object properties: sentiment: type: number description: 表示情感极性分类结果 confidence: type: number description: 置信度,取值范围在0-1之间 positive_prob: type: number description: 可能是积极类别的概率 ,取值范围[0,1] negative_prob: type: number description: 可能是消极类别的概率,取值范围[0.1] description: 结果数组 text: type: string description: 原始文本 description: 识别结果 description: 业务返回体 operationId: 1750_3_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: text: type: string description: 待分析的文本,字符编码请使用UTF-8,字节长度不要超过2048个 required: - text /1750-2: x-pointCode: 2 x-mode: mapping x-read-timeout: 52 x-connect-timeout: 25 post: summary: 命名实体 description: 目前较多针对电商领域,可识别品牌、产品、型号等,同时也能识别通用领域实体,如人名、地名、机构名、时间日期等。 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功,其他值表示失败 data: type: array items: type: object properties: word: type: string description: 单词字符串 tag: type: string description: 标签 synonym: type: string description: 近义词,若请求时type=simple则没有这个字段返回,这个字段可能返回多个同义词,中间要半角分号分开,也可能返回空 weight: type: string description: 权重,若请求时type=simple则没有这个字段返回 description: 分析结果 description: 业务返回体 operationId: 1750_2_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: text: type: string description: 要处理的文本,字符编码请指定为utf-8 type: type: string description: 控制输出样式,其值可为”simple”或者”full”,分别表示简单输出和详细输出,简单输出包括实体和标签,详细输出包括实体、标签、权重和近义词。 required: - text - type /1750-1: x-pointCode: 1 x-mode: mapping x-read-timeout: 50 x-connect-timeout: 20 post: summary: 分词 description: 具备识别文本串中基本词汇并标注词性的功能 responses: "200": description: 成功响应 content: application/json: schema: allOf: - $ref: "#/components/schemas/ShowapiResEnvelope" - type: object properties: showapi_res_body: type: object properties: ret_code: type: number description: 0表示成功,其他表示失败 data: type: array items: type: object properties: items: type: array items: type: object properties: item: type: string description: 分词后的词汇字符串 ne: type: string description: 命名实体类型,可能为空 pos: type: string description: 词性 byte_offset: type: number description: 在text中的字节级offset byte_length: type: number description: 字节级长度 uri: type: string description: 命名实体链接到的知识库,可能为空 basic_words: type: string description: 分词后的基本次,注意这个字段是个数组 loc_details: type: array items: type: object properties: type: type: string description: 成分类型,如省、市、区、县 byte_offset: type: number description: "\t在item中的字节级offset" byte_length: type: number description: 字节级length description: 地址成分,可能为空数组 description: 具体结果 text: type: string description: 原始文本 description: 结果信息 description: 业务返回体 operationId: 1750_1_POST parameters: [] requestBody: content: application/x-www-form-urlencoded: schema: type: object properties: text: type: string description: 待分析的文本,字符编码需为utf-8,字节长度不可超过20000 required: - text components: securitySchemes: AppKeyAuth: type: apiKey in: query name: appKey description: 从 ShowAPI 控制台获取的 appKey,管理地址:https://www.showapi.com/console#/myApp schemas: ShowapiResEnvelope: type: object description: ShowAPI 统一返回包裹(业务数据位于 showapi_res_body) properties: showapi_res_code: type: integer description: API 返回的状态码 showapi_res_error: type: string description: API 返回的错误信息 showapi_res_id: type: string description: API 请求的唯一标识 showapi_fee_num: type: integer description: API 调用计费次数 security: - AppKeyAuth: [] externalDocs: url: https://www.showapi.com/apiGateway/view/1750?tab=book x-apiCode: "1750" x-is-own: false x-is-op: false