Commit 41737adf authored by myhloli's avatar myhloli

docs(output-file): correct poly coordinate format and update table descriptions

- Fix the description of the 'poly' coordinate format in the output file documentation to correctly reflect the order of coordinates: left-top, right-top, right-bottom,
  left-bottom.
- Update various table-related descriptions for clarity and consistency, including
  field names and their corresponding explanations.
- Add version name field description in 'middle.json' structure to document the
  version of the magic-pdf used in the parsing process.
- Refactor the block and line description tables to improve readability and alignment
  with the rest of the documentation.
parent e155d322
...@@ -62,7 +62,7 @@ inference_result: list[PageInferenceResults] = [] ...@@ -62,7 +62,7 @@ inference_result: list[PageInferenceResults] = []
``` ```
poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右上、右下、左四点的坐标 poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右上、右下、左四点的坐标
![poly 坐标示意图](images/poly.png) ![poly 坐标示意图](images/poly.png)
...@@ -122,10 +122,11 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右 ...@@ -122,10 +122,11 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右
### middle.json ### middle.json
| 字段名 | 解释 | | 字段名 | 解释 |
| :-----| :---- | | :-----|:------------------------------------------|
|pdf_info |list,每个元素都是一个dict,这个dict是每一页pdf的解析结果,详见下表 | |pdf_info | list,每个元素都是一个dict,这个dict是每一页pdf的解析结果,详见下表 |
|_parse_type | ocr \| txt,用来标识本次解析的中间态使用的模式 | |_parse_type | ocr \| txt,用来标识本次解析的中间态使用的模式 |
|_version_name | string, 表示本次解析使用的 magic-pdf 的版本号 |
<br> <br>
...@@ -153,8 +154,9 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右 ...@@ -153,8 +154,9 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右
外层block被称为一级block,一级block中的字段包括 外层block被称为一级block,一级block中的字段包括
| type | block类型(table\|image)| | 字段名 | 解释 |
| :-----| :---- | | :-----| :---- |
| type | block类型(table\|image)|
|bbox | block矩形框坐标 | |bbox | block矩形框坐标 |
|blocks |list,里面的每个元素都是一个dict格式的二级block | |blocks |list,里面的每个元素都是一个dict格式的二级block |
...@@ -163,21 +165,23 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右 ...@@ -163,21 +165,23 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右
二级block中的字段包括 二级block中的字段包括
| type | desc | | 字段名 | 解释 |
| :-----| :---- | | :-----| :---- |
| type | block类型 |
| bbox | block矩形框坐标 | | bbox | block矩形框坐标 |
| lines | list,每个元素都是一个dict表示的line,用来描述一行信息的构成| | lines | list,每个元素都是一个dict表示的line,用来描述一行信息的构成|
二级block的类型详解 二级block的类型详解
| type | desc |
| :-----| :---- | | type | desc |
| image_body | 图像的本体 | |:-------------------| :---- |
| image_caption | 图像的描述文本 | | image_body | 图像的本体 |
| table_body | 表格本体 | | image_caption | 图像的描述文本 |
| table_caption | 表格的描述文本 | | table_body | 表格本体 |
| table_footnote | 表格的脚注 | | table_caption | 表格的描述文本 |
| text | 文本块 | | table_footnote | 表格的脚注 |
| title | 标题块 | | text | 文本块 |
| title | 标题块 |
| interline_equation | 行间公式块| | interline_equation | 行间公式块|
<br> <br>
...@@ -185,6 +189,7 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右 ...@@ -185,6 +189,7 @@ poly 坐标的格式 [x0, y0, x1, y1, x2, y2, x3, y3], 分别表示左上、右
**line** **line**
line 的 字段格式如下 line 的 字段格式如下
| 字段名 | 解释 | | 字段名 | 解释 |
| :-----| :---- | | :-----| :---- |
| bbox | line的矩形框坐标 | | bbox | line的矩形框坐标 |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment