Skip to content

Commit

Permalink
Merge pull request #226 from edenai/SD2-78-ocr-table-microsoft-add-co…
Browse files Browse the repository at this point in the history
…nfidence-field-in-standardized-response

Sd2 78 ocr table microsoft add confidence field in standardized response
  • Loading branch information
juandavidcruzgomez authored Jul 16, 2024
2 parents e5d46b6 + 63761d5 commit 4d309fc
Show file tree
Hide file tree
Showing 4 changed files with 597 additions and 578 deletions.
3 changes: 2 additions & 1 deletion edenai_apis/apis/amazon/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,14 @@ def _ocr_tables_standarize_row(row) -> Tuple[Row, int]:

def _ocr_tables_standarize_cell(cell) -> Cell:
is_header = "COLUMN_HEADER" in cell.entityTypes
confidence = float(cell.confidence / 100)
return Cell(
text=cell.mergedText,
row_index=cell.columnIndex,
col_index=cell.rowIndex,
row_span=cell.rowSpan,
col_span=cell.columnSpan,
confidence=cell.confidence,
confidence=confidence,
is_header=is_header,
bounding_box=BoundixBoxOCRTable(
left=cell.geometry.boundingBox.left,
Expand Down
Loading

0 comments on commit 4d309fc

Please sign in to comment.