English (English)

Table

Parameter Description
Column search parameters
Void AddHeaderKeyWord( String keyWord, TableBlockColumn column, Real omissionQuality, Logic wholeWordMode, Logic multiLine ) Specifies the keyword for the column name. See Table element dialog box, Column Properties, Detect by keyword in name option.
Void AddHeaderKeyHypothesis( Hypothesis hypothesis, TableBlockColumn column ) Specifies the column name by means of the detected hypothesis. See Table element dialog box, Column Properties, Use found element as column name option.
Void AddHeaderKeyHypothesis( DistInterval left, DistInterval top, DistInterval right, DistInterval bottom, TableBlockColumn column ) Specifies the coordinates of the column name.
Void AddColumnType( TableColumnType type, TableBlockColumn column, String regExp ) Specifies the column type. The third parameter must only be specified if the column type is a regular expression. See Table element dialog box, Column Properties, Type of column content property.
Void ColumnOmissionQuality( Real quality, TableBlockColumn column )

If fixed column orders are used, it sets the penalty for the hypotheses. The coefficient (a number from 0 to 1) by which the quality of the hypothesis will be multiplied if the column specified in the fixed column order is not detected.

If the parameter is not set, its default value is 0.9.

Void MissingContentPenalty( Real quality, TableBlockColumn column )

Sets the penalty for the hypotheses. The coefficient (a number from 0 to 1) by which the quality of the hypothesis will be multiplied if the actual data type in the column does not coincide with the data type specified by the user. (See Table element dialog box, Column Properties, Missing content penalty.) If the parameter is not set, its default value is 0.98.

If column order rules are used, it specifies the penalty for the absence of the column in the table.

Void ColumnBounds( Distance left, Distance right, TableBlockColumn column ) Sets the right and left boundaries of the search area used to search for the column. See Table element dialog box, Column Properties, Absolute area constraints.
Void ExactColumnBorders( XCoordinate left, XCoordinate right, TableBlockColumn )

Sets the exact column boundaries.

Note.This parameter can be used to search for a table where the location of some (or all) of the columns is known in advance.

Parameters setting the column order
Void AddPossibleColumnsOrder( String orderName, TableBlockColumnArray array ) Specifies one of the variants of fixed column order. See Table element dialog box, Order tab, Fixed column order option.
Void ColumnsRelation( TableBlockColumnArray ) Specifies one rule for the column order. See Table element dialog box, Order tab, Rules for column order option.
Header search parameters
Void HasHeader( Logic ) Specifies whether the program should look for a header. See the Table element dialog box, Header tab, Look for header.
Void HeaderOptional( Real q1, Real q2 ) Specifies whether the header is optional, similarly to the Void Optional ( Real q1, Real q2 ) function for elements.
Void HeaderSearchArea( Rect ) Specifies the search rectangle for the header. If this function is used, the search area of the header will be calculated as the intersection of this rectangle and the one enclosing the search area of the whole table. See Table element dialog box, Header tab, Absolute area constraints.
Void MaxHeaderHypothesesCount( Int ) Sets the maximum number of hypotheses to be generated during header search. See Table element dialog box, Header tab, Number of hypotheses for header.
Void MinHeaderKeyElements( Int ) Sets the minimum number of key elements required to detect the header. The default value is 2.
Void ExtendHeaderLocalization( XInterval, YInterval, XInterval, YInterval ) Extends the localization area of the header. For example, it can be used to discard the line of unwanted information located between the header and the body of the table.
Footer search parameters
Void HasFooter( Logic ) Specifies whether the program should look for the footer. See Table element dialog box, Footer tab, Look for footer.
Void FooterOptional( Real q1, Real q2 ) Specifies whether the footer is optional, similarly to the Void Optional ( Real q1, Real q2 ) function for elements.
Void FooterSearchArea( Rect ) Specifies the search rectangle for the footer. If this function is used, the footer search area will be calculated as the intersection of this rectangle and the one enclosing the search area of the whole table. See Table element dialog box, Footer tab, Absolute area constraints.
Void FooterHasTopSeparator() Specifies that there is a separator between the footer and the body of the table. The separator can be a part of a table boundary.
FooterWholeWordMode ( Logic ) This flag is used when looking for a footer based on keywords. If this flag is set to True, hypotheses made up of only word parts are discarded. The default setting is False. See Table element dialog box, Footer tab, Whole words only option.
Void FooterNearestToTop ( Logic )

This flag is used when looking for a footer based on keywords. If this flag is set to True, the program selects the topmost candidate and discards the rest. If this flag is set to False, the program considers all the possible candidates.

The quality of the footer contributes to the quality of the table and then the table hypothesis with the highest quality is selected.

The default setting is True.

Void AddFooterKeyWord( String ) Specifies a keyword for the footer of the table. See Table element dialog box, Footer tab, Search by keyword option.
Void AddFooterKeyHypothesis( Hypothesis ) Specifies the footer of the table by means of the detected hypothesis. See Table element dialog box, Footer tab, Use found element option.
Void AddFooterKeyHypothesis( XInterval, YInterval, XInterval, YInterval )

Specifies the coordinates of the footer of the table.

Body search parameters
Void DontFindBody() Allows skipping the body search. Used for debugging.
Void BodyOptional(Real q1, Real q2 ) Specifies whether the body is optional, similarly to the Void Optional ( Real q1, Real q2 ) function for elements.
Void IgnoreVerticalSeparators() Ignores vertical separators in the body of the table when dividing the table into columns (by default, separators are taken into account).
Void IgnoreSeparatorsFromHeader() Ignores vertical separators in the header of the table at the column detection when dividing the table into columns (by default, vertical separators are taken into account).
Void AutoDetectTopAndBottom( Logic ) Search for the top and bottom boundaries of the table automatically. The default setting is true. If the flag is set to false, the entire text inside the search area of the table element is used.
Rows detection parameters
Void SingleLineTable( Logic ) Tells the program that each line of text must correspond to one row in the table. See Table element dialog box, Rows tab, One line of text corresponds to one row check box (if the option Detect rows automatically is selected).
Void SingleLineMasterColumn( Logic ) Tells the program that each line of text must correspond to one row in the master column of the table. See Table element dialog box, Rows tab, One line of text corresponds to one row check box (if the option Use master columns to detect rows is selected).
Void MaxRowVerticalGap( Distance ) Specifies the maximum vertical distance between two rows in the table. If the specified distance is exceeded, this means the end of the body of the table. By default, this distance is not limited.
Void MinRowVerticalGap( Distance ) Specifies the minimum vertical distance between two rows in the table. If the distance is smaller than the specified distance, the rows are merged into one. The default value is 0.
Void MaxMasterColumnRowGap( Distance ) Specifies the maximum vertical distance between two rows in the master column of the table. If the specified distance is exceeded, this means the end of the body of the table. By default, this distance is not limited.
Void MinMasterColumnRowGap( Distance ) Specifies the minimum vertical distance between two table rows in a particular column. If the distance is smaller than specified, the rows are merged into one. The default distance is 0.
Void IgnoreHorizontalSeparators() Ignores horizontal separators when dividing the table into rows.
Void DivideRowsBySeparators() Detects rows relying on separators only and ignoring text.
Void DivideRowsByMasterColumn( TableBlockColumn ) Tells the program to use the text of the column when dividing the table into rows. This function can be called multiple times. If a table on an image does not have the required column, the column from the next call of the function is used, etc. If all the columns are unavailable, the rows are detected in the whole table. See Table element dialog box, Rows tab, Use master columns to detect rows option.
Void MasterColumnTextAlignment( TextAlignmentInTableCell )

Specifies text alignment in a table cell in the Master Column. Can be TextAlignment_CellTop or TextAlignment_CellBottom.

Example:

MasterColumnTextAlignment: TextAlignment_CellBottom; - the text is aligned to the bottom border of the cell.

Void AddStopWord( String ) Specifies the words for which separate rows must not be drawn. See Table element dialog box, Rows tab, Stop words.
Void RowSplitters( YCoordinateArray, Logic isBodyTopIncluded = true, Logic isBodyBottomIncluded = true )

Specifies separators to divide the table into rows:

  • isBodyTopIncluded == true - specifies the top of the table body
  • isBodyBottomIncluded == true - specifies the bottom of the table body
  • isBodyTopIncluded == false - the top of the table body is detected automatically
  • isBodyBottomIncluded == false - the bottom of the table body is detected automatically

Any specified separators outside the table search area are ignored.

E.g.

Multi-page table parameters
Void HeaderOnEachPage( Logic has = true ) Specifies that the table header occurs on every page (at the beginning of each one-page sub-table). See Table element dialog box Header tab, Header occurs on every page property.
Void AddHeaderKeyHypotheses( HypothesisInstances, TableBlockColumn ) Specifies a column name on multiple pages by means of a set of hypotheses for a subelement of a repeating group. See Column element dialog box, Use found element as column name property.
Void FooterOnEachPage( Logic has = true ) Specifies that the table footer occurs on every page. See Table element dialog box, Footer tab, Footer is on every page property.
Void AddFooterKeyHypotheses( HypothesisInstances ) Specifies a table footer on multiple pages by means of a set of hypotheses for a subelement of a repeating group. See Table element dialog box, Footer tab, Use found element as footer property.
Void PreviousInstances( TableHypothesisInstances ) Specifies the previous table instances if the table is inside a repeating group. It is assumed that the direction of instances is top to bottom, column boundaries have no shifts within the same page and may be slightly shifted horizontally between pages. The previous instances are used to search for or improve the search for columns if the table has no Header or if the Header is not detected.

25.05.2023 7:55:03

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.