【发布时间】:2021-06-19 16:36:12
【问题描述】:
我已经开始尝试使用aws-textract,特别是detect-document-text(文档:https://docs.aws.amazon.com/textract/latest/dg/detecting-document-text.html)。
例如,图片内容是:
This is the first line
should continue here.
This is the second line.
detect-document-text 输出,返回一个JSON,其中每个BlockType 节点是WORD、LINE 或PAGE(附加了一些其他元素,例如Relationships,其中定义了@ 987654332@ 和Id 的列表、Geometry 信息(坐标)、Confidence 等)。在这种情况下,输出将包含每一行的BlockType (LINE)(如预期的那样),如下所示:
{
...
{
...
"BlockType": "LINE",
"Confidence": 97.8960189819336,
"Text": "This is the first line",
...
},
{
...
"BlockType": "LINE",
"Confidence": 97.8960189819336,
"Text": "should continue here.",
...
},
{
...
"BlockType": "LINE",
"Confidence": 97.8960189819336,
"Text": "This is the second line.",
...
},
...
}
我的问题是下一个,是否有一个可以被覆盖的参数(例如行或单元格的跨度值以通过“句子”保持单个节点)或一种按段落分组行的选项(基于计算坐标)以得到完整的句子?或者这是来自客户端的强制性后处理?想知道,这似乎是一种常见的情况,因此尝试使用textract 输出JSON 来查找textract 或其他aws 服务是否已经提供了它。
【问题讨论】:
标签: amazon-web-services ocr aws-cli amazon-textract