←Select platform

Run Method

Summary

Runs the readers on their corresponding data elements, getting the results, and optionally performing actions (like redaction) when needed.

Syntax
C#
VB
C++
Public Function Run( 
   ByVal document As LEADDocument, 
   ByVal options As DocumentAnalyzerRunOptions 
) As List(Of ElementSetResult) 

Parameters

document

Document in interest.

options

Run options containing the elements to perform processing on and, optionally, actions to run afterward.

Return Value

List of result sets. Each result set corresponds to an element set that was passed through the command.

Example

This example shows how to load and run analysis.

C#
using Leadtools; 
using Leadtools.Document.Analytics; 
using Leadtools.Document; 
using Leadtools.Document.Unstructured; 
using Leadtools.Document.Data; 
 
 
public void Sample() 
{ 
   using (var engines = UnstructuredOcrEngines.Defaults(@"D:\OcrLEADRuntime")) 
   { 
      var analyzer = new DocumentAnalyzer() 
      { 
         Reader = new UnstructuredDataReader() 
         { 
            OcrEngines = engines.Engines 
         }, 
         QueryContext = new FileRepositoryContext(@"D:\ruleset.json") 
      }; 
 
      var options = new DocumentAnalyzerRunOptions() 
      { 
         ElementQuery = new RepositoryQuery(), 
         ActionQuery = new RepositoryQuery() 
      }; 
 
      using (var document = DocumentFactory.LoadFromFile(@"c:\test.docx", new LoadDocumentOptions())) 
      { 
         var results = analyzer.Run(document, options); 
      } 
   } 
} 
Requirements
Target Platforms
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Analytics Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.