如何使用Document Ai提取PDF的不同部分

huangapple go评论58阅读模式
英文:

How to extract different sections of a pdf with Document Ai

问题

我想要能够显示PDF文件的不同部分的列表,就像如何使用Document Ai提取PDF的不同部分上显示的那样。我是通过Flutter Web通过REST API调用处理器的。

我尝试使用fieldMask从API响应中获取实体,但对于图片中的文档,我什么都没有得到,不确定应该使用哪些字段来获得所需的响应。

英文:

I want to be able to show a list of different sections of the pdf file like what is shown on the如何使用Document Ai提取PDF的不同部分. I'm calling the processor through REST api via Flutter Web.

I tried getiing the entities from the api response using fieldMask but got nothing for the document in the picture, not sure what fields should be used to get the desired response.

答案1

得分: 2

1 文档 OCR 处理器以 Document JSON 格式返回文本和布局信息。UI 中突出显示的每个部分都是 BlockParagraph,您需要解析 JSON 响应以获取每个部分的数据,包括边界框。

您可以参考文档中的 处理响应 > 文本、布局和质量分数 部分,了解输出的结构以及解析它的代码示例。

您还可以参考这些开源示例 Web 应用程序,展示了与您所要求的类似用例:

英文:

The Document OCR Processor returns text and layout information in the Document JSON format. Each of those sections highlighted in the UI is a Block or a Paragraph, you will need to parse the JSON response to get the data for each section including the bounding boxes.

You can refer to Handle the processing response > Text, layout, and quality scores in the documentation for explanations of how the output is structured and code samples for parsing it.

You can also refer to these open source sample web applications that show use cases similar to what you are asking:

huangapple
  • 本文由 发表于 2023年7月27日 19:09:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76779147.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定