ragflow-naive模式pdf解析 调试日志

news/2025/3/19 2:04:37/文章来源:https://www.cnblogs.com/Gimm/p/18780179

测试用例1:test_emf 无图映射

image


解析结果

boxes1:

{'x0': 70.0, 'x1': 308.6666666666667, 'top': 76.0, 'text': 'Test with three images in unusual formats', 'bottom': 90.0, 'page_number': 1, 'layout_type': ''}
{'x0': 70.66666666666667, 'x1': 152.33333333333334, 'top': 109.66666666666667, 'text': 'Raster in emf:', 'bottom': 123.66666666666667, 'page_number': 1, 'layout_type': 'text', 'layoutno': 'text-0'}
{'x0': 70.66666666666667, 'x1': 152.33333333333334, 'top': 296.3333333333333, 'text': 'Vector in emf:', 'bottom': 310.3333333333333, 'page_number': 1, 'layout_type': 'figure caption', 'layoutno': 'figure caption-0'}
{'x0': 70.66666666666667, 'x1': 159.66666666666666, 'top': 481.0, 'text': 'Raster in webp:', 'bottom': 495.0, 'page_number': 1, 'layout_type': 'figure caption', 'layoutno': 'figure caption-1'}
{'score': 0.8413426876068115, 'x0': 66.65048726399739, 'x1': 219.40877278645834, 'top': 1717.9829915364583, 'bottom': 1870.0290120442708, 'page_number': 0, 'text': '', 'layout_type': 'figure', 'layoutno': 'figure-0'}
{'score': 0.4555538594722748, 'x0': 65.49385070800781, 'x1': 207.45137532552084, 'top': 1908.0685221354167, 'bottom': 2049.4119466145835, 'page_number': 0, 'text': '', 'layout_type': 'figure', 'layoutno': 'figure-1'}
{'score': 0.7353739142417908, 'x0': 62.302530924479164, 'x1': 498.6632486979167, 'top': 2095.770548502604, 'bottom': 2248.6739501953125, 'page_number': 0, 'text': '', 'layout_type': 'figure', 'layoutno': 'figure-2'}
{'x0': 87.33333333333333, 'x1': 519.0, 'top': 869.6666666666666, 'text': '是从(一个字典)中通过获取的。cks r_dictr_dict.get("cks")', 'bottom': 887.0, 'page_number': 2, 'layout_type': 'text', 'layoutno': 'text-0'}
{'x0': 71.66666666666667, 'x1': 538.0, 'top': 901.6666666666666, 'text': '假设是从Redis 中读取的数据,那么可能是一个列表或字r_dict cks ', 'bottom': 918.3333333333334, 'page_number': 2, 'layout_type': 'text', 'layoutno': 'text-0'}
{'x0': 71.66666666666667, 'x1': 288.6666666666667, 'top': 933.0, 'text': '典,存储了需要处理的文档内容。', 'bottom': 949.6666666666666, 'page_number': 2, 'layout_type': 'text', 'layoutno': 'text-0'}
{'x0': 74.0, 'x1': 94.0, 'top': 968.6666666666666, 'text': '绿巨能', 'bottom': 977.6666666666666, 'page_number': 2, 'layout_type': ''}
{'x0': 84.66666666666667, 'x1': 94.0, 'top': 993.3333333333334, 'text': 'T410', 'bottom': 999.0, 'page_number': 2, 'layout_type': ''}
{'x0': 74.0, 'x1': 103.0, 'top': 1000.6666666666666, 'text': '5100mA', 'bottom': 1013.0, 'page_number': 2, 'layout_type': ''}
{'x0': 73.66666666666667, 'x1': 104.0, 'top': 1011.0, 'text': '双芯控温不伤机', 'bottom': 1020.0, 'page_number': 2, 'layout_type': ''}
{'x0': 79.0, 'x1': 98.0, 'top': 1021.3333333333334, 'text': '足量不虚板', 'bottom': 1028.0, 'page_number': 2, 'layout_type': ''}
{'x0': 312.6666666666667, 'x1': 339.3333333333333, 'top': 1069.3333333333333, 'text': '绿巨能', 'bottom': 1080.6666666666667, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 0, 'R_top': 1068.7568957010906, 'R_bott': 1092.6059672037761}
{'x0': 317.6666666666667, 'x1': 346.6666666666667, 'top': 1094.6666666666667, 'text': '联想笔记本电池', 'bottom': 1100.6666666666667, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 1, 'R_top': 1085.8118260701497, 'R_bott': 1129.8890889485676}
{'x0': 324.3333333333333, 'x1': 340.0, 'top': 1100.6666666666667, 'text': 'T410', 'bottom': 1107.0, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 1, 'R_top': 1085.8118260701497, 'R_bott': 1129.8890889485676}
{'x0': 314.3333333333333, 'x1': 349.3333333333333, 'top': 1109.6666666666667, 'text': '5100mAk', 'bottom': 1121.3333333333333, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 1, 'R_top': 1085.8118260701497, 'R_bott': 1129.8890889485676}
{'x0': 312.3333333333333, 'x1': 352.3333333333333, 'top': 1120.6666666666667, 'text': '双芯控温不伤机', 'bottom': 1132.0, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 2, 'R_top': 1120.3406473795574, 'R_bott': 1185.4308369954426}
{'x0': 320.0, 'x1': 346.6666666666667, 'top': 1133.6666666666667, 'text': '足量不虚标', 'bottom': 1139.3333333333333, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 2, 'R_top': 1120.3406473795574, 'R_bott': 1185.4308369954426}
{'x0': 317.6666666666667, 'x1': 348.3333333333333, 'top': 1140.0, 'text': '安全不易鼓包', 'bottom': 1146.0, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 2, 'R_top': 1120.3406473795574, 'R_bott': 1185.4308369954426}
{'x0': 316.6666666666667, 'x1': 347.6666666666667, 'top': 1146.0, 'text': '续航更强劲', 'bottom': 1154.3333333333333, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 2, 'R_top': 1120.3406473795574, 'R_bott': 1185.4308369954426}
{'x0': 319.3333333333333, 'x1': 343.3333333333333, 'top': 1155.0, 'text': '两年质保', 'bottom': 1163.3333333333333, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 2, 'R_top': 1120.3406473795574, 'R_bott': 1185.4308369954426}
{'x0': 72.33333333333333, 'x1': 79.0, 'top': 1196.3333333333333, 'text': '3 ', 'bottom': 1204.6666666666667, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 3, 'R_top': 1191.4506530761719, 'R_bott': 1262.236551920573, 'H_top': 1168.9876302083333, 'H_bott': 1330.83544921875, 'H_left': 70.26321411132812, 'H_right': 167.18827311197916, 'SP': 0}
{'x0': 198.66666666666666, 'x1': 247.66666666666666, 'top': 1192.0, 'text': '浅香ASAKA丨系伍威护专门', 'bottom': 1200.3333333333333, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 3, 'R_top': 1191.4506530761719, 'R_bott': 1262.236551920573}
{'x0': 269.6666666666667, 'x1': 293.6666666666667, 'top': 1200.0, 'text': '润茶发质好措档', 'bottom': 1266.6666666666667, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 3, 'R_top': 1191.4506530761719, 'R_bott': 1262.236551920573}
{'x0': 432.3333333333333, 'x1': 436.6666666666667, 'top': 1197.0, 'text': '5', 'bottom': 1203.0, 'page_number': 2, 'layout_type': 'table', 'layoutno': 'table-0', 'R': 3, 'R_top': 1191.4506530761719, 'R_bott': 1262.236551920573}

tables1(_extract_table_figure):

((<PIL.Image.Image image mode=RGB size=1484x1440 at 0x131536810>, '<table><caption>Vector in emf:Raster in webp:</caption>\n<tr><td></td><td></td><td  >绿巨能</td><td></td></tr>\n<tr><td></td><td></td><td  >联想笔记本电池 T410 5100mAk</td><td></td></tr>\n<tr><td></td><td></td><td  >双芯控温不伤机 足量不虚标 安全不易鼓包 续航更强劲 两年质保</td><td></td></tr>\n<tr><td  >3 </td><td  >浅香ASAKA丨系伍威护专门</td><td  >润茶发质好措档</td><td  >5</td></tr>\n</table>'), [(0, 70.66666666666667, 159.66666666666666, 296.3333333333333, 495.0), (1, 58.418619791666664, 553.1382242838541, 273.0113118489583, 554.2704264322916)])

boxes2([(b["text"], self._line_tag(b, zoomin)) for b in self.boxes):

('Test with three images in unusual formats', '@@1\t70.0\t308.7\t76.0\t90.0##')
('Raster in emf:', '@@1\t70.7\t152.3\t109.7\t123.7##')
('是从(一个字典)中通过获取的。cks r_dictr_dict.get("cks")假设是从Redis 中读取的数据,那么可能是一个列表或字r_dict cks典,存储了需要处理的文档内容。', '@@2\t71.7\t538.0\t77.7\t157.7##')
('绿巨能', '@@2\t74.0\t94.0\t176.7\t185.7##')
('T410', '@@2\t84.7\t94.0\t201.3\t207.0##')
('5100mA', '@@2\t74.0\t103.0\t208.7\t221.0##')
('双芯控温不伤机', '@@2\t73.7\t104.0\t219.0\t228.0##')
('足量不虚板', '@@2\t79.0\t98.0\t229.3\t236.0##')

res(tokenize_table):

{'docnm_kwd': 'test_emf_docx(28).pdf', 'title_tks': 'test_emf_docx ( 28 )', 'title_sm_tks': 'test_emf_docx ( 28 )', 'content_with_weight': '<table><caption>Vector in emf:Raster in webp:</caption>\n<tr><td></td><td></td><td  >绿巨能</td><td></td></tr>\n<tr><td></td><td></td><td  >联想笔记本电池 T410 5100mAk</td><td></td></tr>\n<tr><td></td><td></td><td  >双芯控温不伤机 足量不虚标 安全不易鼓包 续航更强劲 两年质保</td><td></td></tr>\n<tr><td  >3 </td><td  >浅香ASAKA丨系伍威护专门</td><td  >润茶发质好措档</td><td  >5</td></tr>\n</table>', 'content_ltks': 'vector in emf : raster in webp : \n 绿 巨能 \n 联想 笔记本 电池 t 410 5100 mak \n 双 芯 控温 不 伤 机 足量 不虚 标 安全 不易 鼓包 续航 更 强劲 两年 质保 \n 3 浅 香 asaka 丨 系 伍 威 护 专门 润 茶 发 质 好 措 档 5 \n ', 'content_sm_ltks': 'vector in emf : raster in webp : \n 绿 巨能 \n 联想 笔记 本 电池 t 410 5100 mak \n 双 芯 控温 不 伤 机 足量 不虚 标 安全 不易 鼓包 续航 更 强劲 两年 质保 \n 3 浅 香 asaka 丨 系 伍 威 护 专门 润 茶 发 质 好 措 档 5 \n ', 'image': <PIL.Image.Image image mode=RGB size=1484x1440 at 0x131536A50>, 'page_num_int': [1, 2], 'position_int': [(1, 70, 159, 296, 495), (2, 58, 553, 273, 554)], 'top_int': [296, 273]}

chunk1(naive_merge):

Test with three images in unusual formatsRaster in emf:是从(一个字典)中通过获取的。cks r_dictr_dict.get("cks")假设是从Redis 中读取的数据,那么可能是一个列表或字r_dict cks典,存储了需要处理的文档内容。@@2	71.7	538.0	77.7	157.7##绿巨能T4105100mA双芯控温不伤机@@2	73.7	104.0	219.0	228.0##足量不虚板

chunk2(tokenize_chunks(chunks, doc, eng, pdf_parser)):

{'docnm_kwd': 'test_emf_docx(28).pdf', 'title_tks': 'test_emf_docx ( 28 )', 'title_sm_tks': 'test_emf_docx ( 28 )', 'image': <PIL.Image.Image image mode=RGB size=1399x848 at 0x127388C10>, 'page_num_int': [2, 2], 'position_int': [(2, 71, 538, 77, 157), (2, 73, 540, 219, 228)], 'top_int': [77, 219], 'content_with_weight': 'Test with three images in unusual formatsRaster in emf:是从(一个字典)中通过获取的。cks r_dictr_dict.get("cks")假设是从Redis 中读取的数据,那么可能是一个列表或字r_dict cks典,存储了需要处理的文档内容。绿巨能T4105100mA双芯控温不伤机足量不虚板', 'content_ltks': 'test with three imagin unusu formatsrast in emf : 是从 ( 一个 字典 ) 中 通过 获取 的 。 ckr _ dictr _ dict.get ( " ck " ) 假设 是从 redi 中 读取 的 数据 , 那么 可能 是 一个 列表 或 字 r _ dict ck 典 , 存储 了 需要 处理 的 文档 内容 。 绿 巨能 t 4105100 ma 双 芯 控温 不 伤 机 足量 不虚 板', 'content_sm_ltks': 'test with three imagin unusu formatsrast in emf : 是从 ( 一个 字典 ) 中 通过 获取 的 。 ckr _ dictr _ dict.get ( " ck " ) 假设 是从 redi 中 读取 的 数据 , 那么 可能 是 一个 列表 或 字 r _ dict ck 典 , 存储 了 需要 处理 的 文档 内容 。 绿 巨能 t 4105100 ma 双 芯 控温 不 伤 机 足量 不虚 板'}

res2(res.extend(tokenize_chunks(chunks, doc, eng, pdf_parser)))

{'docnm_kwd': 'test_emf_docx(28).pdf', 'title_tks': 'test_emf_docx ( 28 )', 'title_sm_tks': 'test_emf_docx ( 28 )', 'content_with_weight': '<table><caption>Vector in emf:Raster in webp:</caption>\n<tr><td></td><td></td><td  >绿巨能</td><td></td></tr>\n<tr><td></td><td></td><td  >联想笔记本电池 T410 5100mAk</td><td></td></tr>\n<tr><td></td><td></td><td  >双芯控温不伤机 足量不虚标 安全不易鼓包 续航更强劲 两年质保</td><td></td></tr>\n<tr><td  >3 </td><td  >浅香ASAKA丨系伍威护专门</td><td  >润茶发质好措档</td><td  >5</td></tr>\n</table>', 'content_ltks': 'vector in emf : raster in webp : \n 绿 巨能 \n 联想 笔记本 电池 t 410 5100 mak \n 双 芯 控温 不 伤 机 足量 不虚 标 安全 不易 鼓包 续航 更 强劲 两年 质保 \n 3 浅 香 asaka 丨 系 伍 威 护 专门 润 茶 发 质 好 措 档 5 \n ', 'content_sm_ltks': 'vector in emf : raster in webp : \n 绿 巨能 \n 联想 笔记 本 电池 t 410 5100 mak \n 双 芯 控温 不 伤 机 足量 不虚 标 安全 不易 鼓包 续航 更 强劲 两年 质保 \n 3 浅 香 asaka 丨 系 伍 威 护 专门 润 茶 发 质 好 措 档 5 \n ', 'image': <PIL.Image.Image image mode=RGB size=1484x1440 at 0x117070210>, 'page_num_int': [1, 2], 'position_int': [(1, 70, 159, 296, 495), (2, 58, 553, 273, 554)], 'top_int': [296, 273]}
{'docnm_kwd': 'test_emf_docx(28).pdf', 'title_tks': 'test_emf_docx ( 28 )', 'title_sm_tks': 'test_emf_docx ( 28 )', 'image': <PIL.Image.Image image mode=RGB size=1399x848 at 0x127388D90>, 'page_num_int': [2, 2], 'position_int': [(2, 71, 538, 77, 157), (2, 73, 540, 219, 228)], 'top_int': [77, 219], 'content_with_weight': 'Test with three images in unusual formatsRaster in emf:是从(一个字典)中通过获取的。cks r_dictr_dict.get("cks")假设是从Redis 中读取的数据,那么可能是一个列表或字r_dict cks典,存储了需要处理的文档内容。绿巨能T4105100mA双芯控温不伤机足量不虚板', 'content_ltks': 'test with three imagin unusu formatsrast in emf : 是从 ( 一个 字典 ) 中 通过 获取 的 。 ckr _ dictr _ dict.get ( " ck " ) 假设 是从 redi 中 读取 的 数据 , 那么 可能 是 一个 列表 或 字 r _ dict ck 典 , 存储 了 需要 处理 的 文档 内容 。 绿 巨能 t 4105100 ma 双 芯 控温 不 伤 机 足量 不虚 板', 'content_sm_ltks': 'test with three imagin unusu formatsrast in emf : 是从 ( 一个 字典 ) 中 通过 获取 的 。 ckr _ dictr _ dict.get ( " ck " ) 假设 是从 redi 中 读取 的 数据 , 那么 可能 是 一个 列表 或 字 r _ dict ck 典 , 存储 了 需要 处理 的 文档 内容 。 绿 巨能 t 4105100 ma 双 芯 控温 不 伤 机 足量 不虚 板'}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/901194.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

树形DP 树的重心

树形DP 树的重心 给定一颗树,树中包含 \(n\) 个结点(编号 \(1 \sim n\))和 \(n-1\) 条无向边。 请你找到树的重心,并输出将重心删除后,剩余各个连通块中点数的最大值。 重心定义:重心是指树中的一个结点,如果将这个点删除后,剩余各个连通块中点数的最大值最小,那么这个…

Bootstrap5入门

Bootstrap 5 入门教程 目录Bootstrap 简介 环境配置 布局与网格系统 常用组件 工具类与工具函数 定制化与主题 项目实战示例1. Bootstrap 简介什么是 Bootstrap?开源前端框架,用于快速构建响应式网页。 基于 HTML、CSS、JavaScript。Bootstrap 5 新特性移除 jQuery,依赖原生…

如何写自己的springboot starter?自动装配原理是什么?

如何写自己的springboot starter?自动装配原理是什么? 官方文档地址:https://docs.spring.io/spring-boot/docs/2.6.13/reference/html/features.html#features.developing-auto-configuration 1. 不用starter有什么弊端?我们开发需要引入maven依赖,如果我们需要的依赖又有…

清理 node.js 包管理工具 npm 的缓存

清理 node.js 包管理工具 npm 的缓存清理 node.js 包管理工具 npm 的缓存 要清理 Node.js 包管理工具 npm 的缓存,可以按照以下步骤操作。npm 的缓存主要用于存储下载的包,通常位于用户主目录下的 .npm 文件夹中。以下是清理方法: 1. 检查 npm 缓存位置 npm 默认将缓存存储在…

清理 Python 包管理工具 pip 的缓存

清理 Python 包管理工具 pip 的缓存清理 Python 包管理工具 pip 的缓存 要清理 pip 的缓存,可以按照以下步骤操作(适用于 Python 的包管理工具 pip):检查 pip 缓存位置 pip 默认会将下载的包缓存在本地。你可以通过以下命令查看缓存目录: pip cache dir常见的缓存路径:Wi…

清理 Python 的包管理工具 pip 的缓存

清理 Python 的包管理工具 pip 的缓存清理 Python 的包管理工具 pip 的缓存 要清理 pip 的缓存,可以按照以下步骤操作(适用于 Python 的包管理工具 pip):检查 pip 缓存位置 pip 默认会将下载的包缓存在本地。你可以通过以下命令查看缓存目录: pip cache dir常见的缓存路径…

微服务的网关配置

微服务的网关配置 1. 网关路由 1.1 网关 1.1.1 存在问题 单体架构时我们只需要完成一次用户登录、身份校验,就可以在所有业务中获取到用户信息。而微服务拆分后,每个微服务都独立部署,这就存在一些问题:每个微服务都需要编写身份校验、用户信息获取的接口,非常麻烦。 用户…

博客图床 VsCode + PigGo + 阿里云OSS方案

关键字 写博客,图床,VsCode,PigGo,阿里云OSS 背景环境 我想把我在本地写的markdown文档直接搬到CSDN上和博客园上,但是图片上传遇到了问题。我需要手动到不同平台上传文件,非常耗费时间和经历。 为了解决这个问题,我想到了图床方案,我只需要把图片链接放到我本地写好的…

20244203张晨曦 实验一《Python程序设计》实验报告

20244203张晨曦《Python程序设计》实验一报告 课程:《Python程序设计》 班级: 2442 姓名: 张晨曦 学号:20244203 实验教师:王志强 实验日期:2025年3月18日 必修/选修: 专选课 1.实验内容 1.熟悉Python开发环境; 2.练习Python运行、调试技能; 3.编写程序,练习变量和…

Cobalt Strike基础

Cobalt Strike基础 Staged(有阶段) 在有阶段的执行方式中,分为Stager和Stage两个阶段Stager(初始执行载荷):​ 定义:Stager是Stage 1,是一个较小的、轻量级的初始执行载荷 ​ 作用:与服务端建立初始连接,并从服务器下载更大的Payload,也就是Stage2Stage(更大、…

OP222柔性振动白色料盘污染会引发的问题

下图为污损的料盘料盘污损会导致以下问题: 1.料盘里面缺料但是后面料仓就是不送料 柔性振动系统里面设置了加料个数,下图里面设置为15,表示如果相机识别区域里面的总阴影面积<15个零件面积,料仓加一次料。下图红框是识别区域,里面一道道横杠就是污损导致的阴影,这些阴…

鸿蒙特效教程05-鸿蒙很开门特效

鸿蒙特效教程05-鸿蒙很开门特效本教程适合HarmonyOS初学者,通过简单到复杂的步骤,通过层叠布局 + 动画,一步步实现这个"鸿蒙很开门"特效。本教程能收获Stack 层叠布局 animate、animateTo 动画 @State 状态管理最终效果预览 屏幕上有一个双开门,点击中间的按钮后…