activities
latest
false
Document Understanding Activities
Last updated Aug 30, 2024

ClassifierAsyncCodeActivity Class

The ClassifierAsyncCodeActivity abstract class, pivotal for establishing a CodeActivity for document classification, implements the IClassifierActivity interface and the Async.CodeActivity abstract class.

Definition

  • Namespace: UiPath.DocumentProcessing.Contracts.Classification
  • Assembly: UiPath.DocumentProcessing.Contracts

Description

An abstract class that implements the UiPath.DocumentProcessing.Contracts.Classification.IClassifierActivity interface and the System.Activities.Async.CodeActivity abstract class.
This class must be implemented in order to construct a CodeActivity for document classification that is compatible with the Classify Document Scope activity and the document processing infrastructure.
In order to implement this abstract class, the BeginExecute() and EndExecute() methods need to be overridden.

Document classification parameters and results

Each InArgument defined is auto-populated by the Classify Document Scope activity for its other child activities. The InArguments contain the following data:

  • Data about the document ready for classification, including the file path, the text format, and the document model.
  • Data concerning the document types the classifier activity must comprehend and handle, configured via Classify Document Scope in the Configure Classifiers wizard.
The OutArgument holds a list of classification outcomes in a ClassifierResult. Take the following examples:
  • A classifier distinguishing a full file as either contract or annex should have one entry in Classifications, representative of the highest confidence classification.
  • If a classifier identifies file parts as contract or annex, the ClassifierResult should hold disjunctive classifications and associated ResultsDocumentBounds.

Members

Constructors
ClassifierAsyncCodeActivity() - The protected default constructor.
Methods
  • GetCapabilities() - Retrieves, at design time, a list of document types the classifier is capable of classifying. This method is called only at design time, and as such it should not use any InArgument(s).
  • ProvidesCapabilities() - Returns true if the classifier is able to provide a list of capabilities.
Properties
  • DocumentPath InArgument<string> - The path to the document file.
  • DocumentText InArgument<string> - The text version of the document.
  • DocumentObjectModel InArgument<UiPath.DocumentProcessing.Contracts.Dom.Document> - The document object model of the document.
  • DocumentTypes InArgument<UiPath.DocumentProcessing.Contracts.Classification.ClassifierDocumentType[]> - The document type information that you want the classifier to take into account.
  • PersistenceId string - The unique, opaque ID that is used by the scope activities in order to correctly track and configure the classifier activity.
  • ClassifierResult OutArgument<UiPath.DocumentProcessing.Contracts.Classification.ClassifierResult> - The output of the classifier activity.
  • PredictionId InArgument<string> - Identifies that the same document is processed in a workflow. It's composed of DocumentId+ JobId.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.