文档中心

- 大模型加速器
- 通用文档解析
- 通用文本向量
- 智能文档抽取
- 通用识别
- 通用文字识别
- 通用表格识别
- 手写签名识别
- 印章检测识别
- 二维码识别
- 图像智能处理
- 票据识别
- 文档格式转换
- AI篡改检测
- 卡证识别
- 合同比对
- 合同抽取
- 财务相关API
查看文档
示例代码
API调试
接入技术服务
版本
v2.0
功能描述
通用表格识别 适用于带有表格的文档图像。上传图片后,返回表格区域分析后的文字识别结果以及表格外区域的其他文字识别结果。
重要特性
特性 | 详情描述 |
---|---|
适用场景 | 默认支持带有表格的文档图像 |
文字方向 | 默认支持横向和纵向文字混合识别 |
印刷手写 | 默认支持手写和印刷判断以及印刷文字和手写文字混合识别 |
字符信息 | 可选返回完整的字符信息包括字符坐标和候选字等 |
表格分析 | 支持表格分析返回表格主体区域以及对应的每一个单元格信息 |
语言种类 | 默认支持简体中文/繁体中文/英语/日语/韩语/法语/德语/葡萄牙语/西班牙语/意大利语/荷兰语/瑞典语/芬兰语/丹麦语/挪威语/匈牙利语/越南语/南非荷兰语/阿尔巴尼亚语/巴斯克语/加泰罗尼亚语/克罗地亚语/捷克语/爱沙尼亚语/冰岛语/爱尔兰语/拉丁语/拉脱维亚语/立陶宛语/马来语/波兰语/罗马尼亚语/斯洛伐克语/斯洛文尼亚语/斯瓦希里语/土耳其语/威尔士言/马其他语/克里奥尔语 /加利西亚语/世界语/菲律宾语/印度尼西亚语/阿塞拜疆语/俄语/保加利亚语/马其顿语/乌克兰语/塞尔维亚语/白俄罗斯语/希腊语/亚美尼亚语等共52种常见语言以及更多映射语言 |
更新日志
2024.08.28 - v1.0.17
- 优化引擎模型,修复已知bug。
请求URL
https://api.textin.com/ai/service/v2/recognize/table
HTTP请求方法
HTTP POST
请求头说明(Request Header)
请在HTTP请求中添加以下自定义Header。
header 名 | 值 |
---|---|
x-ti-app-id | 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-app-id |
x-ti-secret-code | 请登录后前往 “工作台-账号设置-开发者信息” 查看 x-ti-secret-code |
URL参数(Parameters)
参数名 | 数据类型 | 是否必填 | 允许的值 | 描述 |
---|---|---|---|---|
character | integer | 否 | 0, 1 | 返回完整的字符信息包括字符坐标和候选字等,默认关闭 |
straighten | integer | 否 | 0, 1 | 坐标系选项,默认关闭并且所有结果返回均以原图为参照系;若打开则返回结果的所有坐标点均以正置图像作为参照系 |
output_order | string | 否 | perpendicular, table_and_remain, table_only | 输出格式: - perpendicular: 按照坐标顺序从上到下排序输出且非表格区域自动分块 - table_and_remain: 按照坐标顺序从上到下排序输出且附带一个非表格区域 - table_only: 只保留表格区域按照坐标顺序从上到下排序输出 |
table_type_hint | string | 否 | automatic, table_with_line, table_with_few_line, table_without_line | 提示当前样本的表格类型 |
excel | integer | 否 | 0, 1 | 指定是否输出excel文件;若指定则excel文件以base64格式输出 |
请求体说明(Request Body)
支持以下两种请求格式
1. Content-Type: application/octet-stream
要上传的图片,目前支持jpg, png, bmp, pdf, tiff, 单帧gif等大部分格式,pdf格式支持单页文件。
请注意,请求体的数据格式为本地文件的二进制流,非 FormData 或其他格式。文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。
2. Content-Type: text/plain
请求体的数据格式为文本,内容为在线文件的URL链接(支持http以及https协议)。在线文件大小不超过 10M,图像宽高须介于 20 和 10000(像素)之间。
响应体说明 (Response Data)
Content-Type: application/json
JSON结构说明如下:
说明:所有接口响应中均包含字段 x_request_id
(string类型),作为请求的唯一标识。
字段名 | 类型 | 描述 |
---|---|---|
code | integer | 错误码,详见“错误码说明” |
result | object | |
+ angle | integer | |
+ width | integer | |
+ height | integer | |
+ tables | array | |
++ position | array | |
++ area_index | integer | |
++ area_type | string | |
++ type | string | |
++ table_rows | integer | |
++ table_cols | integer | |
++ height_of_rows | array | |
++ width_of_cols | array | |
++ table_lines | array | |
+++ position | array | |
+++ direction | string | |
++ table_cells | array | |
+++ start_row | integer | |
+++ start_col | integer | |
+++ end_row | integer | |
+++ end_col | integer | |
+++ borders | object | |
++++ top | integer | |
++++ bottom | integer | |
++++ left | integer | |
++++ right | integer | |
+++ text | string | |
+++ position | array | |
+++ lines | array | |
++++ text | string | |
++++ score | number | |
++++ type | string | |
++++ position | array | |
++++ angle | integer | |
++++ direction | integer | |
++++ handwritten | integer | |
++++ char_scores | array | |
++++ char_centers | array | |
++++ char_positions | array | |
++++ char_candidates | array | |
++++ char_candidates_score | array | |
++ lines | array | |
+++ text | string | |
+++ score | number | |
+++ type | string | |
+++ position | array | |
+++ angle | integer | |
+++ direction | integer | |
+++ handwritten | integer | |
+++ char_scores | array | |
+++ char_centers | array | |
+++ char_positions | array | |
+++ char_candidates | array | |
+++ char_candidates_score | array | |
+ excel | string | excel文件以base64格式输出。仅当 url 参数 excel=1 的时候会输出该字段 |
message | string | 错误信息 |
version | string | 接口版本号。 |
duration | number | 服务时间消耗,单位是毫秒(ms)。 |
JSON结构示例
错误码说明
错误码 | 描述 |
---|---|
40101 | x-ti-app-id 或 x-ti-secret-code 为空 |
40102 | x-ti-app-id 或 x-ti-secret-code 无效,验证失败 |
40103 | 客户端IP不在白名单 |
40003 | 余额不足,请充值后再使用 |
40004 | 参数错误,请查看技术文档,检查传参 |
40007 | 机器人不存在或未发布 |
40008 | 机器人未开通,请至市场开通后重试 |
40301 | 文件类型不支持,接口会返回实际检测到的文件类型,如“当前文件类型为.gif” |
40302 | 上传文件大小不符,文件大小不超过 10M |
40303 | 文件类型不支持 |
40304 | 图片尺寸不符,图像宽高须介于 20 和 10000(像素)之间 |
40305 | 识别文件未上传 |
40400 | 无效的请求链接,请检查链接是否正确 |
30203 | 基础服务故障,请稍后重试 |
500 | 服务器内部错误 |