Class that organizes the operations to load and execute document analysis steps.
public class DocumentAnalyzer This example shows how to load and run document analysis.
using Leadtools;using Leadtools.Document.Analytics;using Leadtools.Document;using Leadtools.Document.Unstructured;using Leadtools.Document.Data;using Leadtools.Ocr;public void Sample(){// Initialize the OCR Engineusing (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD)){// Load the document to be analyzedusing (LEADDocument document = DocumentFactory.LoadFromFile(@"C:\Desktop\test.docx", new LoadDocumentOptions())){document.Text.OcrEngine = ocrEngine;// Initialize the Document Analyzervar analyzer = new DocumentAnalyzer(){Reader = new UnstructuredDataReader(),QueryContext = new FileRepositoryContext(@"C:\Desktop\test.json")};// Initialize the Document Optionsvar options = new DocumentAnalyzerRunOptions(){ElementQuery = new RepositoryQuery()};// Create the list of resultsList<ElementSetResult> results = analyzer.Run(document, options);string resultsMessage = string.Empty;// Parse the results and output text to consoleforeach (ElementSetResult result in results)foreach (ElementResult item in result.Items)Console.Write($"{(item.Value)} ");}}}