# Classes

> The DocumentProcessing.Contracts package contains classes for various types of objects and operation used in a document processing framework.

The DocumentProcessing.Contracts package contains classes for various types of objects and operation used in a document processing framework.

## Contracts

This section includes the class definitions for all objects used and exposed throughout the document processing framework. You can find the class definitions from the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts`. The following classes are available:

* [Box Class](https://docs.uipath.com/activities/other/latest/document-understanding/box-class "Box is a public class representing a rectangle, employed for highlighting and positional referencing.")
* [IPersistedActivity Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-persisted-activity-interface "IPersistedActivityInterface is an interface that helps with accurately tracking child activities and their configurations.")
* [PrettyBoxConverter Class](https://docs.uipath.com/activities/other/latest/document-understanding/pretty-box-converter-class "PrettyBoxConverter is a public class manipulating the JSON serialization and de-serialization of Box objects by overriding certain methods in the Newtonsoft.Json.JsonConverter class.")

## Classification

This section includes the public contracts for building your own classifier, found in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.Classification`. The following classes are available:

* [IClassifierActivity Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-classifier-activity-interface "IClassifierActivity outlines all instances of InArgument and OutArgument expected from a classifier activity.")
* [ClassifierDocumentType Class](https://docs.uipath.com/activities/other/latest/document-understanding/classifier-document-type-class "ClassifierDocumentType is a public class representing a document type, used for conveying document type details to classifier activities.")
* [ClassifierResult Class](https://docs.uipath.com/activities/other/latest/document-understanding/classifier-result-class "ClassifierResult, a public class, signifies the output of a classifier activity, detailing the document types with the highest confidence for each section of the inputted document.")
* [ClassifierCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/classifier-code-activity-class "ClassifierCodeActivity is an abstract class that implements both the IClassifierActivity interface and the CodeActivity abstract class, vital for creating a compatible CodeActivity for document classification.")
* [ClassifierNativeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/classifier-native-activity-class "ClassifierNativeActivity is an abstract class, implementing both the IClassifierActivity interface and the NativeActivity abstract class, essential for creating a NativeActivity that classifies documents.")
* [ClassifierAsyncCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/classifier-async-code-activity-class "The ClassifierAsyncCodeActivity abstract class, pivotal for establishing a CodeActivity for document classification, implements the IClassifierActivity interface and the Async.CodeActivity abstract class.")

## DataExtraction

This section includes the public contracts for building your own extractor, found in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.DataExtraction`. The following classes are available.

* [ExtractorAsyncCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-async-code-activity-class "ExtractorAsyncCodeActivity abstract class, essential for creating an AsyncCodeActivity for data extraction, implements the IExtractorActivity interface and AsyncCodeActivity abstract class.")
* [ExtractorCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-code-activity-class "ExtractorCodeActivity abstract class, a combination of the IExtractorActivity interface and the CodeActivity abstract class, is cardinal for constructing a CodeActivity for document data extraction.")
* [ExtractorDocumentType Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-document-type-class "ExtractorDocumentType is a class representing the target document type information for an extractor along with the list of fields to be processed.")
* [ExtractorDocumentTypeCapabilities Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-document-type-capabilities-class "ExtractorDocumentTypeCapabilities class represents both document type and field level data that an extractor can process for declaring capabilities using the GetCapabilities() method.")
* [ExtractorFieldCapability Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-field-capability-class "ExtractorFieldCapability is a class signifying the field information that an extractor can process, used in declaring capabilities when the GetCapabilities() method of the IExtractorActivity interface is initiated.")
* [ExtractorNativeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-native-activity-class "The ExtractorNativeActivity abstract class adds functionality to the IExtractorActivity interface and the NativeActivity abstract class, crucial for creating a NativeActivity for document data extraction.")
* [ExtractorResult Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-result-class "ExtractorResult is a class that embodies the output of an extractor activity, aiming to report a list of results pertaining to individually requested fields.")
* [ICapabilitiesProvider Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-capabilities-provider-interface "The ICapabilitiesProvider Interface, essential for declaring an extractor activity's capabilities such as document types processed and targeted fields, must be implemented.")
* [IExtractorActivity Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-extractor-activity-interface "IExtractorActivity is a public interface inheriting the IPersistedActivity interface, that defines the InArguments and the OutArguments expected from an extractor activity.")

## Dom

This section includes the class definitions for the Text Projection option, allowing access to a line-based text representation of the DOM (Document Object Model). You can find the class definitions in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.Dom`. The following classes are available.

* [Document Class](https://docs.uipath.com/activities/other/latest/document-understanding/document-class "Document is a public class that represents a digitized document.")
* [DomExtensions Class](https://docs.uipath.com/activities/other/latest/document-understanding/dom-extensions-class "DomExtensions is a public static class that represents a document object model.")
* [Page Class](https://docs.uipath.com/activities/other/latest/document-understanding/page-class "Page is a public class that represents a page in a document.")
* [PageSection Class](https://docs.uipath.com/activities/other/latest/document-understanding/page-section-class "PageSection is a public class that represents a page section.")
* [WordGroup Class](https://docs.uipath.com/activities/other/latest/document-understanding/word-group-class "WordGroupis a public class that represents a word group.")
* [Word Class](https://docs.uipath.com/activities/other/latest/document-understanding/word-class "Word is a public class that represents a word.")
* [ProcessingSource Enum](https://docs.uipath.com/activities/other/latest/document-understanding/processing-source-enum "ProcessingSource is a public enumeration that contains the supported page processing sources.")
* [Rotation Enum](https://docs.uipath.com/activities/other/latest/document-understanding/rotation-enum "Rotation is a public enumeration that contains the supported page rotation types.")
* [SectionType Enum](https://docs.uipath.com/activities/other/latest/document-understanding/section-type-enum "SectionType is a public enumeration that contains the supported section types.")
* [WordGroupType Enum](https://docs.uipath.com/activities/other/latest/document-understanding/word-group-type-enum "WordGroupType is a public enumeration that contains the supported word group types.")

## Extensions.TextProjection

This section includes the class definitions for the DOM found in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.Extensions.TextProjection`.

The following class is available: [IDocumentTextProjection Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-document-text-projection-interface "IDocumentTextProjection is a public interface that provides text projections based on an exact match with the names of the listed properties.")

## Results

This section includes class definitions for the extraction and classification results found in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.Results`. The following classes are available:

* [ClassificationResult Class](https://docs.uipath.com/activities/other/latest/document-understanding/classification-result-class "ClassificationResult is a public class that represents a classification result for a part of a document.")
* [ExtractorResult Class](https://docs.uipath.com/activities/other/latest/document-understanding/extractor-result-class "ExtractorResult is a class that embodies the output of an extractor activity, aiming to report a list of results pertaining to individually requested fields.")
* [ResultsDocument Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-document-class)
* [ResultsDocumentBounds Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-document-bounds-class)
* [ResultsDataPoint Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-data-point-class)
* [ResultsValue Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-value-class)
* [ResultsContentReference Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-content-reference-class)
* [ResultsValueTokens Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-value-tokens-class)
* [ResultsDerivedField Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-derived-field-class)
* [ResultsDataSource Enum](https://docs.uipath.com/activities/other/latest/document-understanding/results-data-source-enum)
* [ResultsContentReference Class](https://docs.uipath.com/activities/other/latest/document-understanding/results-content-reference-class)
* [SimpleFieldValue Class](https://docs.uipath.com/activities/other/latest/document-understanding/simple-field-value-class) [TableFieldValue Class](https://docs.uipath.com/activities/other/latest/document-understanding/table-field-value-class)

## Taxonomy

This section includes the class definitions for the `Taxonomy` object generated by using the . The definitions can be found in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.Taxonomy`. The following classes are available:

* [DocumentGroup Class](https://docs.uipath.com/activities/other/latest/document-understanding/document-group-class)
* [DocumentTaxonomy Class](https://docs.uipath.com/activities/other/latest/document-understanding/document-taxonomy-class)
* [DocumentType Class](https://docs.uipath.com/activities/other/latest/document-understanding/document-type-class)
* [Field Class](https://docs.uipath.com/activities/other/latest/document-understanding/field-class)
* [FieldType Enum](https://docs.uipath.com/activities/other/latest/document-understanding/field-type-enum)
* [LanguageInfo Class](https://docs.uipath.com/activities/other/latest/document-understanding/language-info-class)
* [MetadataEntry Class](https://docs.uipath.com/activities/other/latest/document-understanding/metadata-entry-class)
* [TypeField Class](https://docs.uipath.com/activities/other/latest/document-understanding/type-field-class "The TypeField class represents the identifiedr from a DocumentType object.")

## Training

This section includes the classes you use when you build your own classifier or extractor trainer activities. You can find the classes in the **UiPath.DocumentProcessing.Contracts** package under `UiPath.DocumentProcessing.Contracts.Training`. The following classes are available:

* [ITrainableClassifierActivity Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-trainable-classifier-activity-interface "ITrainableClassifierActivity is a public interface that defines the InArguments available for a classifier training activity.")
* [ITrainableExtractorActivity Interface](https://docs.uipath.com/activities/other/latest/document-understanding/i-trainable-extractor-activity-interface "ITrainableExtractorActivity is a public interface that defines the InArguments available an extractor training activity.")
* [TrainableClassifierAsyncCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/trainableclassifierasynccodeactivity-class "The TrainableClassifierAsyncCodeActivity class constructs an AsyncCodeActivity for extractors training.")
* [TrainableClassifierCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/trainable-classifier-code-activity-class "TrainableClassifierCodeActivity is an abstract class that implements the UiPath.DocumentProcessing.Contracts.Training.ITrainableClassifierActivity interface and the System.Activities.CodeActivity abstract class.")
* [TrainableClassifierNativeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/trainable-classifier-native-activity-class "TrainableClassifierNativeActivity is an abstract class that implements the UiPath.DocumentProcessing.Contracts.Training.ITrainableClassifierActivity interface and the System.Activities.NativeActivity abstract class.")
* [TrainableExtractorAsyncCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/trainable-extractor-async-code-activity-class "TrainableExtractorAsyncCodeActivity is an abstract class that implements the UiPath.DocumentProcessing.Contracts.Training.ITrainableExtractorActivity interface and the System.Activities.AsyncCodeActivity abstract class.")
* [TrainableExtractorCodeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/trainable-extractor-code-activity-class "TrainableExtractorCodeActivity is an abstract class that implements the UiPath.DocumentProcessing.Contracts.Training.ITrainableExtractorActivity interface and the System.Activities.CodeActivity abstract class.")
* [TrainableExtractorNativeActivity Class](https://docs.uipath.com/activities/other/latest/document-understanding/trainable-extractor-native-activity-class "TrainableExtractorNativeActivity is an abstract class that implements the UiPath.DocumentProcessing.Contracts.Training.ITrainableExtractorActivity interface and the System.Activities.NativeActivity abstract class.")
