Skip to main content
This method allows you to perform pattern training. The method adds new pairs “a character image — the character itself” to the specified pattern.

Syntax

C++

HRESULT TrainUserPattern(
  BSTR                       FileName,
  ITrainingImagesCollection* TrainingImages,
  BSTR                       CharacterOrLigature,
  int                        Flags,
  TextTypeEnum               TextType
);

C#

void TrainUserPattern(
  string                   FileName,
  ITrainingImagesCollection TrainingImages,
  string                   CharacterOrLigature,
  int                      Flags,
  TextTypeEnum             TextType
);

Visual Basic .NET

Sub TrainUserPattern( _
  FileName As String, _
  TrainingImages As ITrainingImagesCollection, _
  CharacterOrLigature As String, _
  Flags As Integer, _
  TextType As TextTypeEnum _
)

Parameters

FileName [in] This variable specifies the path to the user pattern file. TrainingImages [in] This variable refers to the TrainingImagesCollection object that stores a collection of character images. CharacterOrLigature [in] This variable specifies the character which is represented by the collection of images. Flags [in] This parameter contains a bitwise OR combination of the UPTF_ prefixed flags which specifies the character attributes. TextType [in] This parameter specifies the text type of the character using the TextTypeEnum enumeration constant.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.

See also

Engine Recognizing with Training