UNPKG

@mescius/dspdfviewer

Version:
87 lines (86 loc) 4.29 kB
import { TableDataExportFormat, TableDefClientModel } from "../SupportApi/types"; export type TableDataExtractionDialogProps = { viewer: any; }; export type TableDataExtractionDialogModel = { enabled: boolean; showModal: boolean; workInProgress?: boolean; exportFormat: TableDataExportFormat; version: number; }; export type TableDataExtractionDialogMode = "Normal" | "SelectRegion" | "Processing"; /** * Represents the options for text recognition used in table extraction, as passed from the client. * These options control various parameters related to the recognition process. */ export type ClientTableExtractOptions = { /** * The coefficient that determines whether two values are considered similar. * This value is used to fine-tune the sensitivity of value comparison during table extraction. * The default value is 0.25. A lower value means that values need to be more similar to be considered a match. */ CoefPrecision?: number; /** * The coefficient used to determine whether the distance between two text primitives indicates that they belong to the same text token. * The default value is 0.08. A higher value suggests that text primitives must be closer together to be considered part of the same token. */ CoefTokenization?: number; /** * The coefficient used to determine whether two text tokens overlap. * The default value is 0.85. A higher value indicates that a larger overlap is required for tokens to be considered as duplicates. */ CoefDuplicateTokens?: number; /** * The coefficient used to determine whether two text primitives overlay horizontally. * The default value is 0.10. A larger value means that a greater horizontal overlap between text primitives is required. */ CoefHorzOverlay?: number; /** * The coefficient used to determine whether two text primitives overlay vertically. * The default value is 0.12. A larger value means that a greater vertical overlap between text primitives is required. */ CoefVertOverlay?: number; /** * Gets or sets the coefficient used to determine the minimum possible distance between rows. * The default value is 1. */ CoefMinimumDistanceBetweenRows?: number; /** * Gets or sets the coefficient used to determine the minimum possible distance between columns. * The default value is 1. */ CoefMinimumDistanceBetweenCols?: number; /** * A value that indicates whether to process text rendered in invisible text mode (text that is neither filled nor stroked). * The default value is true. If set to true, invisible text will be included in the table extraction process. */ IncludeInvisibleText?: boolean; /** * The minimum column width to be considered during table extraction. * The default value is 1. A larger value will increase the minimum width required for columns to be included in the extraction process. */ MinimumColWidth?: number; /** * The minimum row height to be considered during table extraction. * The default value is 1. A larger value will increase the minimum height required for rows to be included in the extraction process. */ MinimumRowHeight?: number; /** * The bounds within which to search for a table. The coordinates are represented by four float values (x1, y1, x2, y2). * The origin is at the bottom-left corner. * This property is optional. If specified, it restricts the table search to the defined area. */ Bounds?: [number, number, number, number]; /** * The indices of the pages to be considered for table extraction. * This array can contain specific page numbers on which to focus the extraction process. * If not provided, all pages will be used for table extraction. The indices should be zero-based, meaning that the first page has an index of 0. */ PageIndices?: number[]; /** * Gets or sets the precise table boundaries, including row and column extents, * that will be used for table data extraction. */ DefinedTables?: TableDefClientModel[]; };