Skip to main content
ParameterDescription
Void MinQuality( Real )Sets the minimum quality of the hypothesis.
Void MaxErrors( Int )Sets the maximum number of errors in the hypothesis.
Void MaxErrorsPart( Real )Sets the maximum percentage of errors in the hypothesis.
Void MaxErrors( Int number, Real part )Sets the maximum number of errors in the hypothesis: number – absolute number, part – percentage. Example: The code below specifies that the absolute number of errors may not exceed 3, and the percentage of errors may not exceed 20%. MaxErrors(3, 0.2); Note: Out of the two conditions the activity will use the strictest.
Void MaxGapInLine( Distance )Sets the maximum distance between neighboring characters. When generating a hypothesis, the activity will add characters to the hypothesis until the distance between two neighboring characters does not exceed MaxGapInLine. Example: The code below tells the activity that the maximum distance between neighboring characters may not exceed 5 mm, otherwise a null hypothesis is generated. MaxGapInLine(5mm);
Void MaxRelativeGapInLine( Real )Sets the maximum relative distance between neighboring characters. Relative distance = (gap width)/(character width).
Void MinLength( Int )Sets the minimum length of the text string. Default setting is 1. Example: The code below tells the program that the minimum length of a hypothesis is 4 characters. MinLength(4);
Void MaxLength( Int )Sets the maximum length of the text string. Default setting is 50.
Void SearchTextFromCatalog( String catalogName, Int columnIndex, SearchTextFromCatalogCriteria )Searches for text from the specified catalog. Example: The code below searches for text from the second column of the “CompanyCatalog” catalog using the specified search criteria: SearchCriteria searchCriteria; searchCriteria.MinCatalogColumnValueLength = 3; searchCriteria.MaxRecordsCount = 1000; SearchTextFromCatalog( "CompanyCatalog", 2, searchCriteria ); The code below uses an auxiliary method GetCatalogColumnIndex to get the column index by its name: SearchTextFromCatalog( "CompanyCatalog", GetCatalogColumnIndex( "CompanyCatalog", "ColumnName" )); To speed up the query, only the first maxRecordsCount records are accessed (the default setting is 1000).
Void AllowIntersectPercent( Real )Specifies the maximum allowed percentage of vertical overlap for two lines of text (the default setting is 15). You may want to use this parameter for texts with tight line spacing.
Void SearchText( String )Specifies the text that will be searched on an image. The string may contain several search variants separated with ”|” (the OR operator). For more information, see Type-specific Properties of the Static Text Element.
The following methods are available if the text to find consists of several words
ParameterDescription
Void NextLinePenalty( Real )Sets a penalty for line breaks. The penalty is a number from 0 to 1. The quality of the hypothesis will be multiplied by this number as many times as there are line breaks in the phrase. If line breaks are allowed in the phrase, set this parameter to 1 (multiplying the quality of the hypothesis by 1 will not downgrade its quality).
Void OmissionPenalty( Real )Sets a penalty for missing words. The penalty is a number from 0 to 1. The quality of the hypothesis will be multiplied by this number as many times as there are missing words in the phrase. If some words may be absent in the phrase, set this parameter to 1 (multiplying the quality of the hypothesis by 1 will not downgrade its quality).
Void WholeWordMode( Logic )Specifies whether only whole text objects must be considered as valid hypotheses. When set to True, hypotheses consisting of parts of words are ignored. The default setting is False. Note: This method is different from AllowChoppedWords in that AllowChoppedWords affects only hypotheses generated from words on the boundary of the search area, whereas WholeWordMode affects the generation of all hypotheses.
Void AllowEmbeddedHypotheses( Logic )Sets the hypothesis formulation mode. To formulate all possible hypotheses (including overlapping and nested), set the value to True. To formulate hypotheses of maximum length, set to False. Example: The code below tells the activity that it must formulate the longest hypothesis. AllowEmbeddedHypotheses(False);
Void MaxLineBreakDistance( Distance )Sets the horizontal distance between the words on different lines if line breaks are allowed in the phrase.
Void SuggestOnlySimilarChars( Logic value )Specifies which characters the activity can use as replacement characters when performing a fuzzy search. When set to True, limits the activity to only using characters with a similar outline as replacement characters.
Void AllowedTextRotations( TextRotations )Specifies a set of allowed orientations for the recognized text. A hypothesis will only be formulated if the recognized text has an orientation that is allowed by this parameter.