UNPKG

@briancullen/aws-textract-parser

Version:

Library for converting AWS Textract responses into a more usable structure.

13 lines (12 loc) 623 B
import { Textract } from 'aws-sdk'; import LineBlockNode from '../model/LineBlockNode'; import WordBlock from '../model/WordBlockNode'; import { BlockParser, GeometryParser, BlockIdParser } from './Factory'; export default class LineParser implements BlockParser<LineBlockNode> { private readonly wordParser; private readonly geometryParser; private readonly blockIdParser; private readonly blockMap; constructor(wordParser: BlockParser<WordBlock>, geometryParser: GeometryParser, blockIdParser: BlockIdParser, blockMap: Map<string, Textract.Block>); process(line: Textract.Block): LineBlockNode; }