UNPKG

react-pdf-ner-annotator

Version:

A React component to annotate named entities directly onto a PDF.

21 lines (20 loc) 481 B
import { Rectangle } from 'tesseract.js'; export declare enum TextLayerType { TEXT_LAYER = "TEXT_LAYER", ORC = "OCR" } export interface TextLayerItem { dataI?: number; coords: Rectangle; text: string; fontSize?: number; fontFamily?: string; transform?: number; } export interface TextLayer { page: number; textMapItems: Array<TextLayerItem>; type: TextLayerType; confidence: number; shouldRender?: boolean; }