我已经开始试验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
输出,正在返回 a JSON
,其中每个BlockType
节点是WORD
,LINE
或PAGE
(附加了一些其他元素,例如,Relationships
在哪里定义type
和列表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.",
...
},
...
}
我的问题是下一个,是否有一个可以被覆盖的参数(例如行或单元格的跨度值以通过“句子”保持单个节点)或一种按段落分组行的选项(基于计算的坐标)意图有完整的句子?或者这是来自客户端的强制性后处理?想知道,似乎是一个常见的场景,所以尝试使用output查找它是否已经由textract
或其他一些服务提供。aws
textract
JSON