# Keyword Based Classifier Trainer

> `UiPath.IntelligentOCR.Activities.DocumentClassification.KeywordBasedClassifierTrainer`

`UiPath.IntelligentOCR.Activities.DocumentClassification.KeywordBasedClassifierTrainer`

## Description

Incorporates a keyword-based document classification algorithm, targeting classification for files that have repeatable titles.

Enhances the training set to be used for classification, by writing learning data in a specified file.

This activity can only be used together with the [Train Classifiers Scope](https://docs.uipath.com/activities/other/latest/document-understanding/train-classifiers-scope) activity.

## Project compatibility

**Windows-Legacy | Windows**

## Configuration

#### Designer panel

* **LearningFilePath** - The full path to the file containing the classifier data. The information is retrieved from the specified path, processed and updated. This field supports only strings and `String` variables.

#### Properties panel

**Common**
* **DisplayName** - The display name of the activity.

**Input**
* **LearningFilePath** - The full path to the file containing the classifier data. The information is retrieved from the specified path, processed and updated. This field supports only strings and `String` variables.

**Input/Output**
* **LearningData** - The string containing the serialized classifier data. Within the same string, the information is read, processed, and updated. This field supports only strings and `String` variables.
  :::note
  Only one of the parameters can be set. You can use either the **LearningData** string or the **LearningFilePath** string.

  The **LearningFilePath** specifies the locations from where to retrieve the classifier data while the **LearningData** contains the actual information of that classifier.
  :::

**Misc**
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.
  :::note
  The best practice is to create an **empty** `.json` file at that location, then use its name in the **LearningFilePath** field.
  :::

## Learn More

A wizard is available for this activity, helping you to configure and manage the keywords used for this activity. Visit [Keyword Based Classifier](https://docs.uipath.com/activities/other/latest/document-understanding/keyword-based-classifier) to learn how to set up the wizard.
