Class DictionaryInspector
Inheritance
System.Object
DictionaryInspector
Assembly: IronOcr.dll
Syntax
public class DictionaryInspector : Object
DictionaryInspector is the helper that answers whether a Tesseract trained-data file works with a given engine mode before a read is attempted. A .traineddata language pack may carry an LSTM model, a legacy model, or both, and pairing the wrong pack with the wrong engine mode is a common cause of a failed or empty OCR run. This type lets interop code check that compatibility up front.
Construct one and call TrainedDataSupportsLtsm, passing the trained-data path and a TesseractVersion, to confirm the pack contains the LSTM model the modern neural engine needs. TrainedDataSupportsOem performs the matching check for the legacy Tesseract OEM path. Each returns a simple yes or no for that combination, which sits in the validation step that runs before a custom or downloaded language pack is loaded. It lives in the DynamicTesseract interop layer beneath IronOCR; most projects rely on IronOCR's bundled language packs and never need it, but code that ships its own trained data can use it to fail fast with a clear message.
The custom language how-to covers loading your own trained data, and the custom font training how-to walks through producing a pack.
Constructors
DictionaryInspector()
Declaration
public DictionaryInspector()
Methods
TrainedDataSupportsLtsm(String, TesseractVersion)
Declaration
public static bool TrainedDataSupportsLtsm(string TrainedDataPath, TesseractVersion TesseractVersion)
Parameters
| Type |
Name |
Description |
| System.String |
TrainedDataPath |
|
| TesseractVersion |
TesseractVersion |
|
Returns
| Type |
Description |
| System.Boolean |
|
TrainedDataSupportsOem(String, TesseractVersion)
Declaration
public static bool TrainedDataSupportsOem(string TrainedDataPath, TesseractVersion TesseractVersion)
Parameters
| Type |
Name |
Description |
| System.String |
TrainedDataPath |
|
| TesseractVersion |
TesseractVersion |
|
Returns
| Type |
Description |
| System.Boolean |
|