【问题标题】:Getting list of fields detected from Invoice Parser google Document AI Processor获取从 Invoice Parser google Document AI Processor 检测到的字段列表
【发布时间】:2022-06-14 01:27:15
【问题描述】:

Invoice Parser 文档列出了此处理器尝试在文档中查找的字段。 https://cloud.google.com/document-ai/docs/processors-list?hl=en_US#processor_invoice-processor

我只对 Invoice 处理器中的某些字段感兴趣,有没有办法获取字段列表并请求处理器查找一组选定字段的数据点?

例如我只对 invoice_date 和 invoice_id 感兴趣。所以,处理器只为我找到这两个字段,不会浪费时间寻找其他字段。

我找到了一个检索处理器详细信息的端点,但它没有获取字段列表。 https://cloud.google.com/document-ai/docs/reference/rest/v1beta3/projects.locations.processors/get

这个流程端点没有任何东西可以指定我感兴趣的字段。 https://cloud.google.com/document-ai/docs/reference/rest/v1beta3/projects.locations.processors/process

我的研究表明这个功能不存在,希望有人告诉我我错了。

【问题讨论】:

    标签: cloud-document-ai


    【解决方案1】:

    目前,无法限制由专用处理器提取的特定实体。处理器将始终处理整个文档并提取它可以找到的所有内容。

    但是,最近向 REST API 中的 process 方法添加了一个新参数,该参数允许您提供 [fieldMask][1] 来限制将在 Document 对象中返回的字段。这也已添加到How-to Guide for making a processing request。目前,这仅适用于 REST API(不适用于客户端库)和在线处理。

    这不是您要寻找的内容,但如果您不需要 [content][4] 之类的字段,它会显着限制 Document 响应的大小。

    [1]: https://cloud.google.com/document-ai/docs/reference/rest/v1/projects.locations.processors/process#:~:text=Default%20to%20false.-, fieldMask,-string%20(FieldMask

    [4]:https://cloud.google.com/document-ai/docs/reference/rest/v1/Document#:~:text=for%20more%20info.-,content,-string%20 (字节

    【讨论】:

      猜你喜欢
      • 2022-08-03
      • 1970-01-01
      • 1970-01-01
      • 2022-08-05
      • 1970-01-01
      • 2021-11-02
      • 2022-11-10
      • 2022-08-03
      • 2023-01-17
      相关资源
      最近更新 更多