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 keyword and numeric value search in OCR-recognized text.
public AsposeAI();
public AsposeAI(ILogger? logger);
You can also pass optional logging and customization callbacks.
IOcrAIPostProcessorAsposeAI.SetPostProcessor(new KeywordsAIProcessor())AsposeAI
Core class to load, configure, and apply AI models (e.g., for keywords detection) to OCR results.
KeywordsAIProcessor
Built-in AI postprocessor that uses a language model to keyword and numeric value search in OCR-recognized text
ILogger logger = new ConsoleLogger(); // can be null
AsposeAIModelConfig modelConfig = new AsposeAIModelConfig
{
AllowAutoDownload = true,
DirectoryModelPath = "D://test",
};
AsposeAI ai = new AsposeAI(logger);
KeywordsAIProcessor processor = new KeywordsAIProcessor()
processor.SetKeywords(new string[] {"Total", "Subtotal" });
ai.SetPostProcessor(processor, modelConfig);
ai.RunPostprocessor(res);
Console.WriteLine("JSON RESULT\n");
Console.WriteLine(processor.GetResult()[0].Result)
ai.Dispose();
Burger King R #501 1500 Johnston St LafayetteLA 70503 0RDER66 TAKE OUT WHOPPER 4.99 WHOPPER JR 1.99 SUBTOTAL 6.98 9% TAX 0.63 TOTAL 7.6 CREDIT CARD 7.61 CHANGE 0.00 Check on reverse for fur ther orders. Fr+ May 42018 11:32 AM
[
{
"keyword": "Total",
"value": "7.6",
"number": "7.6"
},
{
"keyword": "Subtotal",
"value": "6.98",
"number": "6.98"
}
]
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.