Unstructured-IO / Unstructured-IO/unstructured-python-client

bug: pdf splitting modifies returned csv elements

未关闭 适合新手
#201 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
Python
星标
119
派生
22
平均合并
1 天 21 小时
30 天内合并 PR
1

描述

Describe the bug
When specifying output_format as csv, the response from the api is different when split_pdf_page is True or False. When False, the elements contain an extra metadata field: text_as_html. This also means the element id does not match.

To Reproduce
_test_unstructured_client/integration/test_decorators.py::test_integration_split_csv_response illustrates this, but is passing because it asserts on a shortened string.

Expected behavior
The response to be identical whether or not split_pdf_page is True or False.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

test_unstructured_client/integration/test_decorators.py::test_integration_split_csv_response 开始,将其中缩短的断言替换为一个比较,以暴露额外的 text_as_html 字段和不同的元素 id。跟踪 split_pdf_page=True 和 False 时的 CSV 响应处理;当两个响应完全一致且集成测试检查完整结果时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
62/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。