Activities
latest
false
Document Understanding Activities
Last updated Jul 15, 2024

Load Taxonomy

UiPath.IntelligentOCR.Activities.TaxonomyManagement.LoadTaxonomy

Turns the taxonomy.json file created with the help of the Taxonomy Manager into a variable that can be further used with other activities.

Properties

Common
  • DisplayName - The display name of the activity.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Output
  • Taxonomy - The taxonomy you want to load, stored in a DocumentTaxonomy variable. This output can be later used in activities that receive a taxonomy as input.
    Important: In case you use an Intel Xe GPU and Taxonomy Manager is not displayed properly, we recommend updating the graphics driver to the latest version. For more information, please visit this page.

Taxonomy Extension Methods

Serialize()
Called on a DocumentTaxonomy object, the Serialize() method returns a JSON representation of the object, so that it can be stored and retrieved for later usage.
Deserialize(String)
The DocumentTaxonomy.Deserialize(jsonString) static extension returns a DocumentTaxonomy object, hydrated with the JSON encoded data passed as a parameter.
GetFields(String)
Called on a DocumentTaxonomy object, the GetFields() method called with a DocumentTypeId string returns a list of fields defined within that document type.

The Taxonomy Manager can be used to create and edit a Taxonomy file specific to your current automation project. This Taxonomy file contains user-defined document types, organized in Groups and Categories.

You can further use the Taxonomy file by converting it into a .NET data type with the Load Taxonomy activity, and then passing it as input for activities such as:

The Taxonomy Manager can be accessed only after installing a UiPath.IntelligentOCR.Activities package higher or equal to v1.6.0 as a dependency for your project. Once the package is installed, a Taxonomy Manager button appears on the Ribbon, in the Wizards section.



Using Taxonomy Manager

The Taxonomy Manager window lets you create document types, organized by groups and categories. When opened for the first time in a project, no groups, categories, or document types are defined.



Establishing the structure

The first step is to create a group or a document type. The difference between the two of them is that a group involves a hierarchical structure while a document type can be created as a single file. A complex project implies creating groups, categories, and document types, while a simple project can only require one or two document types.

Creating a Group

When a group is created, a category is also necessary for the document type you want to create inside the group. This is done by using the Group button. Once you have chosen a name for your group, you can save it by using the Save button or by simply hitting Enter.



Creating a Category

Once a group is defined and selected, you can create a Category and/or a Document Type within the group, by using their defined buttons.



Creating a Document Type

A Document Type can be created either by part of a group or as a single document. When created inside a group, make sure that the group is selected, then click the Document Type button.

If the Document Type is created as a single file, then make sure that no group is selected and click the Document Type button. After clicking the Document Type button, input a name for the file and click the Save button.



Note: When a Document Understanding Action is submitted from Orchestrator while using Studio v20.10, make sure that the taxonomy has no document types created without category.

Selecting an already created Document Type lets you change its name, copy its unique ID to clipboard, reassign it to another group or category, or none of them. You can also input a code for the document type.

Once a document type is saved, a Document Type ID is generated for it. Opening the document for editing displays the ID next to the Document Type Name tab. The Document Type ID has a structure of the type Group.Category.Document and can be copied to the clipboard. The Document Type ID code is an optional functionality and it can be used to find your documents or map your documents to the Document Types that you define in the taxonomy.


Creating Fields

When the Document Type is selected, the Field button becomes available for you to create a new field. Once the Field button is clicked, you can enter a name for it and select its type from the drop-down list.

The Field category has two tabs, Details and Rules. The Details tab provides information about the selected field, such as Field Name, assigned hotkey, or field type, while the Rules tab allows you to create rules that need to be fulfilled by the extraction result for the field.

The available field types are:

  • Text
  • Number
  • Date - Choosing this type also lets you specify an expected format, which is optional.
    Note:

    If you want to add an expected format, use an MSDN-compliant format.

    This format may be used by extractors and is used by the Data Extraction Scope activity when trying to parse a Date into its constituent Day, Month, and Year parts.

  • Name
  • Address
  • Set - Choosing this type lets you add multiple values to the field from a preestablished list.
  • Boolean
  • Table - Choosing this type lets you edit the structure of the table, as you can add columns and edit their name and type.


Details Tab

After the new Field is created, click on it to view more information. By default, when you open a field, the Details tab is displayed allowing you to modify the name, color, or hotkey of the field. You can also specify whether it is multi-value (Is multi-value) or if it allows for values with no evidence in the document to be processed (Requires reference). The multi-value option allows for a field to have multiple values, without being restricted to a specific list.

For more information on how to use the two fields, check the following descriptions:
  • Is Multi-Value: if a field is set as multi-value, you can have more than one value reported for that particular field. Example: you want to extract a "List of Directors" where you can have variable number of entries. Imagine a multi-value field like a single-column table.
  • Requires reference: when a field requires reference, you can add a value to it only if you select something from the document you see in Validation Station. For special fields in which you want to capture values that are maybe not visible in the document, you can switch Requires Reference to off. Effect will be that user can add a value without specifying a place in the document where that values comes from.


You can choose to enable Validator notes from the Details tab. By setting up validator notes, human validator can add notes about the decision they have taken during validation. You can configure the following settings:
  • Read-only: If enabled, the human validator can view any validator notes set on the ExtractionResult field in Validation Station, as a message. If disabled (default state), the human validator can also edit that note in Validation Station and thus communicate back to the robot information about the decision taken.
  • Text: If Text is selected, the validator note is displayed as a text message (or editable text when editing is enabled) in Validation Station. The human validator can view, edit, or add a maximum of 200 characters message in Validation Station.
  • Options: If you select Options, you can configure a series of radio buttons that the human validator can view and, if not read-only, select in Validation Station. You can add a maximum of 10 options.
Tip: Check the ExtractionResult Class page from the UiPath.DocumentProcessing.Contracts section for more information on the two methods related to validator notes, GetFieldValidatorNotes(<fieldId>) and SetFieldValidatorNotes(<fieldId>, <validatorNote>).

Created fields can be deleted by using the delete button that appears next to them or reordered by using the drag and drop function.



A field can also be deleted from the Details window, by selecting the Delete button.



Retracing these steps, you can create multiple groups, categories, and document types, which you can then filter by using the Search field.

Rules Tab

Field rules are here to help you optimize the extraction results and to automatically validate them when the running your workflow. Their role is to increase the extraction efficiency and to help you easily validate the fields that need attention in Validation Station, by highlighting them. You can create multiple rules that apply to one field.

You define a rule by setting the Evaluator type and the Criticality level.

Evaluator Type

Use the Evaluator Type to specify how the defined rules should be evaluated. There are two evaluator types that you can choose from: AND, OR.

Evaluator Type

Description

Example

AND

Use this evaluator type when all the rules need to be executed.

Rule : Invoice Number starts with A And ends with X.

  • Valid Result : The valid field value is A123X.
  • Invalid Result : The valid field value is A123.

OR

Only one of the rules needs to be executed.

Rule : Invoice number starts with A OR is 123.

  • Valid Result : The valid field value is A123, 123.
  • Invalid Result : The valid field value is 234, 1A23.

Criticality Level

Indicates the criticality of all rules defined for a field. You cannot set a MUST level if the rule is broken in the Validation Station session. There are two criticality levels that you can choose from: MUST, SHOULD.

The created rule is triggered once the set criticality level is identified.

When you want to submit a rule, a MUST rule requires 100% success, otherwise the Submit operation fails. A SHOULD rule allows you to Submit it even if the rule is broken.

You can always check if a rule is broken by using the helper method from the ExtractionResult Class class, that resides in the UiPath.DocumentProcessing.Contracts activity package.

Criticality Level

Description

MUST

Use this criticality level when the created rule is imperative to be included in the Extraction Result process.

SHOULD

Use this criticality level when the created rule is optional.

Once you have selected the Evaluator Type and the Criticality Level, you must set a type applicable for your newly created rule. There are several options you can choose from. Here's a complete list with all the available ones:

  • Is not empty
  • Possible values
  • Starts with
  • Ends with
  • Contains
  • Fixed length
  • Is email
  • RegEx
    Note: The field type for which you created a rule dictates the number of possible rule types from which you can select one. For example, a field of type Text displays all the possible rule types, while a field of type Date displays only two rule types, Is not empty and Possible values.

Type of Rules

Here's a list with all the available rule types, classified depending on the criticality level:
Rule TypeDescriptionField typeCriticality levelEvaluator Type
Is not emptyThe extracted value cannot be empty, meaning that the field is mandatory. If the value is missing, it requires validation/manual input. Applicable to fields of type:
  • number
  • text
  • date
  • address
  • name
  • set
  • boolean

MUST

SHOULD

AND

OR

Possible valuesUser defines all possible values and the extracted data is one of the values added as input while creating the rule (e.g. Employer Type is either "full-time", "part-time", or "internship"). Applicable to fields of type:
  • number
  • text
  • date

MUST

SHOULD

AND

OR

ExpressionDefine mathematical expressions that act as a rule for extracting data. Applicable to fields of type:
  • number
A condition is required while configuring the rule. Choose one of the following options:
  • Is equal to
  • Is not equal to
  • Is greater than
  • Is greater than or equal to
  • Is less than or equal to
A mathematical expression is required. Use the predefined operators to define your expression. Here are some examples:
  • Sum Quantity * Net unit price\n- Total = Subtotal + Delivery
  • Discount - the Sum operator gathers all values from a table's column.

MUST

SHOULD

AND

OR

Starts withThis is a fixed rule meaning that the extracted value needs to start with one of the values added by the user. Applicable to fields of type:
  • text
  • address
  • name

MUST

SHOULD

AND

OR

Ends withThis is a fixed rule meaning that the extracted value needs to end with one of the values added by the user. Applicable to fields of type:
  • text
  • address
  • name

MUST

SHOULD

AND

OR

ContainsThis is a fixed rule meaning that the extracted value needs to contain one of the values added by the user. Applicable to fields of type:
  • text
  • address
  • name

MUST

SHOULD

AND

OR

Fixed lengthThis is a fixed rule meaning that the extracted value needs to have a certain fixed length. Applicable to fields of type:
  • text
  • address
  • name

MUST

SHOULD

AND

OR

Is emailThis is a fixed rule meaning that the extracted value needs to be written in an email format. Applicable to fields of type:
  • text
  • address
  • name

MUST

SHOULD

AND

OR

RegExThis is a fixed rule meaning that the extracted value needs to contain a regular expression similar to one of the values added by the user. Applicable to fields of type:
  • text
  • address
  • name

MUST

SHOULD

AND

OR

Using Rules

Let's take a practical example to better understand the applicability of these rules. Here's how you can create a new rule or a set of rules for a field:


docs image
Other Options

Editing

You can Edit the name of any group, category, or document type that you have created. This can be done by selecting one of the three levels of configuration and editing the Name field.


docs image

Deleting

Groups, categories, and document types can also be deleted. There are two available options:

  • click the docs image button


  • click the docs image Delete button from the upper right side of the window.


In both cases, a popup is displayed asking you to confirm the deleting action. Click Delete to approve the action as shown in the above GIFs.

Customization and Accessibility

A hotkey and color are automatically allocated to the newly created field. You can use them for better visibility and faster navigation through your taxonomy. Customize them by clicking on the hotkey or the color code field.

A customized field with color and hotkey can instruct the Validation Station and the Template Manager to use the assigned color when displaying the field and to use the assigned hotkey as a shortcut for providing values to fields. Here you can find more information about how to use the field shortcuts to assign values to a field.



Navigate through the Taxonomy Manager by using the keyboard shortcuts. Activate the Toggle keyboard shortcuts option to avoid the accidental triggering of the keyboard shortcuts. Nodes can also be collapsed with only one click.



Here's a better view of all available keyboard shortcuts.



Note: The changes you make in the Taxonomy Manager are automatically saved into the taxonomy.json file specific to your project.

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.