ImageGear .NET
Multiple Languages, Global and Local Filters, FilterPlus Characters

To read a page from a Luxembourgian newspaper, in which articles on a single page appear in French, German, and Luxembourgian. The page contains six zones. The text contains no miscellaneous characters (mathematical symbols, etc.). Zone 5 contains uppercase letters only, with no digits, and only three punctuation characters: the comma, the period (full-stop), and a question mark. Zone 6 presents a currency conversion table containing the digits, the comma, and the currency codes of Luxembourg and its neighbors: LUF, FRF, DEM, BEF, and EUR.

The language selection is set to French, German, and Luxembourgian. The DefaultFilter property is used to specify the global filter, to filter out only the 30 miscellaneous characters:

ALPHA | PUNCTUATION | DIGIT.

A local filter is defined for zone 5:

UPPERCASE | PLUS.

A different local filter is defined for zone 6:

DIGIT | PLUS, or simply NUMBERS.

These have the same effect.

The FilterPlus property is set to validate the FilterPlus characters needed in zone 5 and zone 6:

The comma, the period, the question mark, and the currency letters, B D E F L M R U.

C#
Copy Code
igRecognition.Recognition.LanguageEnabled.DisableAll();
igRecognition.Recognition.LanguageEnabled[ImGearRecLanguage.FRE] = true;
igRecognition.Recognition.LanguageEnabled[ImGearRecLanguage.GER] = true;
igRecognition.Recognition.LanguageEnabled[ImGearRecLanguage.LUX] = true;
igRecognition.OutputManager.CodePage = "Windows ANSI";  // Code Page 1252
igRecognition.Recognition.DefaultFilter = ImGearRecFilter.ALPHA |
     ImGearRecFilter.PUNCTUATION | ImGearRecFilter.DIGIT;
// . . .
// 1-4 zones
// . . .
// 5th zone
ImGearRecZone igRecZone = new ImGearRecZone();
igRecZone.Rect.Left = 10;
igRecZone.Rect.Right = 330;
igRecZone.Rect.Top = 420;
igRecZone.Rect.Bottom = 450;
igRecZone.FillingMethod = ImGearRecFillingMethod.OMNIFONT;
igRecZone.RecognitionModule = ImGearRecRecognitionModule.OMNIFONT_MOR;
igRecZone.Filter = ImGearRecFilter.UPPERCASE | ImGearRecFilter.PLUS;
igRecZone.Type = ImGearRecZoneType.FLOW;
igRecPage.Zones.Add(igRecZone);
// 6th zone
igRecZone.Rect.Left = 10;
igRecZone.Rect.Right = 330;
igRecZone.Rect.Top = 80;
igRecZone.Rect.Bottom = 120;
igRecZone.FillingMethod = ImGearRecFillingMethod.OMNIFONT;
igRecZone.RecognitionModule = ImGearRecRecognitionModule.OMNIFONT_MOR;
igRecZone.Filter = ImGearRecFilter.DIGIT | ImGearRecFilter.PLUS;
igRecZone.Type = ImGearRecZoneType.FLOW;
igRecPage.Zones.Add(igRecZone);
// . . .
igRecognition.Recognition.FilterPlus = "BDEFLMRU.,?";
VB .NET
Copy Code
igRecognition.Recognition.LanguageEnabled.DisableAll()
igRecognition.Recognition.LanguageEnabled(ImGearRecLanguage.FRE) = True
igRecognition.Recognition.LanguageEnabled(ImGearRecLanguage.GER) = True
igRecognition.Recognition.LanguageEnabled(ImGearRecLanguage.LUX) = True
igRecognition.OutputManager.CodePage = "Windows ANSI"
' Code Page 1252
igRecognition.Recognition.DefaultFilter = ImGearRecFilter.ALPHA Or ImGearRecFilter.PUNCTUATION Or ImGearRecFilter.DIGIT
' . . .
' 1-4 zones
' . . .
' 5th zone
Dim igRecZone As New ImGearRecZone()
igRecZone.Rect.Left = 10
igRecZone.Rect.Right = 330
igRecZone.Rect.Top = 420
igRecZone.Rect.Bottom = 450
igRecZone.FillingMethod = ImGearRecFillingMethod.OMNIFONT
igRecZone.RecognitionModule = ImGearRecRecognitionModule.OMNIFONT_MOR
igRecZone.Filter = ImGearRecFilter.UPPERCASE Or ImGearRecFilter.PLUS
igRecZone.Type = ImGearRecZoneType.FLOW
igRecPage.Zones.Add(igRecZone)
' 6th zone
igRecZone.Rect.Left = 10
igRecZone.Rect.Right = 330
igRecZone.Rect.Top = 80
igRecZone.Rect.Bottom = 120
igRecZone.FillingMethod = ImGearRecFillingMethod.OMNIFONT
igRecZone.RecognitionModule = ImGearRecRecognitionModule.OMNIFONT_MOR
igRecZone.Filter = ImGearRecFilter.DIGIT Or ImGearRecFilter.PLUS
igRecZone.Type = ImGearRecZoneType.FLOW
igRecPage.Zones.Add(igRecZone)
' . . .
igRecognition.Recognition.FilterPlus = "BDEFLMRU.,?"

 

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback