CleanRecognizerSession Method of the Engine Object

This method cleans the current recognition session. When processing documents, FineReader Engine tunes itself for recognition of the current type of document (concerning its brightness, text types, fonts, etc.). This information is used during one recognition session and helps to improve recognition quality. When you call the CleanRecognizerSession method, all information which was received during this self-tuning is removed.

By default, FineReader Engine cleans recognition session after recognition of each page (the IEngine::AutoCleanRecognizerSession property is TRUE) and in most cases, you do not need to call the CleanRecognizerSession method manually.

Below are the situations when you may need to call this method:

  • If you need to keep recognition session between pages, e.g., if you use the cache dictionary. In this case, you should set the AutoCleanRecognizerSession property to FALSE and clean recognition session manually by calling CleanRecognizerSession method when necessary (when you do no longer need the cache dictionary or if you are going to process a page with parameters (brightness, text types, fonts, etc.) that are extremely different from previous pages).
  • If you need to clean recognition session during recognition of one page, e.g., if the page contains blocks of text with some parameters (text types, fonts, etc.) that differ significantly from other text blocks' parameters.

Note that if the AutoCleanRecognizerSession property is FALSE, FineReader Engine, however, cleans its recognition session automatically in the following cases:

  • If pages are recognized sequentially in one process and there are no more pages to process (for example, IFRDocument::Close method has been called or the document has been released and there is no other documents).
  • If pages are recognized in parallel processes — after the end of each parallel process.
  • If pages are recognized in parallel processes using BatchProcessor and there are no more pages to process (IBatchProcessor::GetNextProcessedPage returns 0).
  • If the LoadPredefinedProfile or LoadProfile method of the Engine object is called.

Syntax

C++

HRESULT CleanRecognizerSession();
    

C#

void CleanRecognizerSession();
    

Visual Basic .NET

Sub CleanRecognizerSession()
    

Return values

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

Remarks

This method call automatically cleans the cache dictionary.

See also

Engine

17.09.2024 15:14:40

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.