title: aws textract - Group output lines by parragraph
body: <p>I've started experimenting with <code>aws-textract</code>, specifically with <code>detect-document-text</code> (Docs: <a href="https://docs.aws.amazon.com/textract/latest/dg/detecting-document-text.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/textract/latest/dg/detecting-document-text.html</a>). 
  For one example, where the image content is:</p>
  
  <pre><code>This is the first line
  should continue here.
  
  This is the second line.
  </code></pre>
  
  <p><code>detect-document-text</code> output, is returning a <code>JSON</code>, where each <code>BlockType</code> node is either <code>WORD</code>, <code>LINE</code> or <code>PAGE</code> (Some other elements are attached like, <code>Relationships</code> where is defined the <code>type</code> and a list of <code>Id</code>'s, <code>Geometry</code> information (coordinates), <code>Confidence</code>, etc). In this case, output will contain a <code>BlockType</code> (<code>LINE</code>) for each row (as expected), something like this:</p>
  
  <pre><code>{
  ...
    {
      ...
      "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.",
     ...
    },
    ...
  }
  </code></pre>
  
  <p>My question is the next, <strong>is there a parameter that can be overwritten (like span value for rows or cells to keep a single node by "sentence") or a kind option to group lines by paragraph (based on calculated coordinates) with the intention to have full sentences?</strong> Or is this a mandatory post-processing from client side? Wondering, seems to be a common scenario, so trying to find if it's already offered by <code>textract</code> or some other <code>aws</code> service using <code>textract</code> output <code>JSON</code>.</p>