tiki-deprecated / platform-cap-receipt

Upload receipts for free OCR processing
https://mytiki.com/solutions/receipt-ocr
GNU Affero General Public License v3.0
0 stars 0 forks source link

Transform Textract output in a consumable format #5

Closed ricardobrg closed 8 months ago

ricardobrg commented 9 months ago

Reason

The extracted text needs to be transformed to be published

Description

Create a function that will be triggered after amazon textract data extraction. It should get the text file and transform it into structured data that can be published to TIKI ingestion service.

Success Criteria

Additional Information

No response

MiroBenicio commented 8 months ago

this value (the cleaned json):

{
  ...
  "Type": {
    "Confidence": 92.48912,
    "Text": "PRODUCT_CODE"
  },
  "ValueDetection": {
    "Confidence": 92.48831,
    "Text": "020108870398"
  }
  ...
}

should become this:

{
... 
    "PRODUCT_CODE": { 
        "confidenceKey": 92.48912,
        "confidenceValye": 92.48831 ,
        "value": "020108870398"
    }
...
}
ricardobrg commented 8 months ago

replaced by #6