Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
The AsposeAI class integrates external AI models (e.g., from Hugging Face) into OCR recognition results for spell-check correction and intelligent postprocessing.
public AsposeAI();
public AsposeAI(ILogger? logger);
You can also pass optional logging and customization callbacks.
IOcrAIPostProcessorAsposeAI.SetPostProcessor(new SpellCheckAIProcessor())AsposeAI
Core class to load, configure, and apply AI models (e.g., for spell correction) to OCR results.
SpellCheckAIProcessor
Built-in AI postprocessor that uses a language model to fix spelling mistakes in recognized text.
ILogger logger = new ConsoleLogger(); // can be null
AsposeAIModelConfig modelConfig = new AsposeAIModelConfig
{
AllowAutoDownload = true,
DirectoryModelPath = "D://test",
};
AsposeAI ai = new AsposeAI(logger);
SpellCheckAIProcessor processor = new SpellCheckAIProcessor()
ai.SetPostProcessor(processor, modelConfig);
ai.RunPostprocessor(res);
Console.WriteLine("CORRECTED RESULT\n");
Console.WriteLine(processor.GetResult()[0].RecognitionText)
ai.Dispose();
POWER SUPPLY THE CALCULATOR IS POWERED BY SOLAR CELL AND A BATTERY FOR BACKUP.THE DIS LAY WILL DIM WHEN THE BATERY NEEDSTO BEREPLACED THE"+"SIGN OF EACH BATTERY MUST SHOW UPWARD WHEN INSERTEDI
POWER SUPPLY THE CALCULATOR IS POWERED BY SOLAR CELL AND A BATTERY FOR BACKUP THE DISPLAY WILL DIM WHEN THE BATTERY NEEDS TO BE REPLACED THE"+"SIGN OF EACH BATTERY MUST SHOW UPRIGHT WHEN INSERTED
Pass ILogger to constructor to track loading and inference.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.