Class KeywordsAIProcessor
Namespace: Aspose.OCR.AI
Assembly: Aspose.OCR.dll (26.2.0)
AI post-processor that analyzes OCR results and extracts keywords and values.
public class KeywordsAIProcessor : IOcrAIPostProcessorInheritance
Implements
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
KeywordsAIProcessor()
public KeywordsAIProcessor()Methods
GetResult()
Returns the AI-processed recognition results. The recognition output is returned as a JSON-formatted string with the following structure:
[
{
"keyword": "string",
"value": "string",
"number": "string"
}
]public List<AIResult> GetResult()Returns
A list of Aspose.OCR.AI.AIResult objects containing the JSON-formatted string.
SaveMd(string)
Saves the extracted structured tables into a Markdown (.md) file.
public void SaveMd(string filename)Parameters
filename string
The full path where the Markdown file will be saved.
SaveTxt(string)
Saves the extracted tables and processed text results into a TXT file.
public void SaveTxt(string filename)Parameters
filename string
The full path where the TXT file will be saved.
SaveXlsx(string)
Saves the extracted structured tables into an XLSX (Excel) file.
public void SaveXlsx(string filename)Parameters
filename string
The full path where the XLSX file will be saved.
SetKeywords(string[])
Sets the keywords used for searching OCR-recognized text.
public void SetKeywords(string[] keywords)Parameters
keywords string
[]
Keywords to search for. Matching is case-insensitive and order-independent.
Examples
var processor = new KeywordsAIProcessor();
processor.SetKeywords(new[] { "Total", "Subtotal", "Discount", "Quantity" });